repo.or.cz
/
llvm-project.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
history
|
raw
|
HEAD
[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git]
/
clang
/
test
/
SemaObjCXX
/
cxx1y-lambda.mm
blob
589e66db51ac8079388f14084780f1a83104bda1
1
// RUN: %clang_cc1 -std=c++1y -Wno-unused-value -fsyntax-only -verify -fobjc-arc %s
2
3
// expected-no-diagnostics
4
__attribute__((objc_root_class))
5
@interface NSString
6
@end
7
8
void testResultTypeDeduction(int i) {
9
auto x = [i] {
10
switch (i) {
11
case 0:
12
return @"foo";
13
14
default:
15
return @"bar";
16
}
17
};
18
}