summaryrefslogtreecommitdiffstats
path: root/clang/test/Parser/objcxx0x-lambda-expressions.mm
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2012-01-07 04:59:52 +0000
committerEli Friedman <eli.friedman@gmail.com>2012-01-07 04:59:52 +0000
commit73a040906d0cbf2240ed2bf19523fc0d73651bf8 (patch)
tree198a38b41b513ab3d34691846ac4fd27a3c45d52 /clang/test/Parser/objcxx0x-lambda-expressions.mm
parent11c99162c41f6c788b2535779915a70319dc3510 (diff)
downloadbcm5719-llvm-73a040906d0cbf2240ed2bf19523fc0d73651bf8.tar.gz
bcm5719-llvm-73a040906d0cbf2240ed2bf19523fc0d73651bf8.zip
More lambda work: semantic analysis of capturing 'this'. It's a bit complicated, but we have to be careful about when exactly captures are marked given PotentiallyPotentiallyEvaluated contexts. (Actually, it's not 100% correct yet, but it's close enough for the moment.)
llvm-svn: 147723
Diffstat (limited to 'clang/test/Parser/objcxx0x-lambda-expressions.mm')
-rw-r--r--clang/test/Parser/objcxx0x-lambda-expressions.mm3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/test/Parser/objcxx0x-lambda-expressions.mm b/clang/test/Parser/objcxx0x-lambda-expressions.mm
index 5cfb4f8c5a7..06573b94467 100644
--- a/clang/test/Parser/objcxx0x-lambda-expressions.mm
+++ b/clang/test/Parser/objcxx0x-lambda-expressions.mm
@@ -14,7 +14,8 @@ class C {
[] {}; // expected-error {{lambda expressions are not supported yet}}
[=] (int i) {}; // expected-error {{lambda expressions are not supported yet}}
[&] (int) mutable -> void {}; // expected-error {{lambda expressions are not supported yet}}
- [foo,bar] () { return 3; }; // expected-error {{lambda expressions are not supported yet}}
+ // FIXME: Implicit return type deduction doesn't work yet.
+ [foo,bar] () { return 3; }; // expected-error {{void function 'f' should not return a value}} expected-error {{lambda expressions are not supported yet}}
[=,&foo] () {}; // expected-error {{lambda expressions are not supported yet}}
[this] () {}; // expected-error {{lambda expressions are not supported yet}}
}
OpenPOWER on IntegriCloud