diff options
author | Douglas Gregor <dgregor@apple.com> | 2012-02-08 20:17:14 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2012-02-08 20:17:14 +0000 |
commit | 21f4692c622fedfecab3571c12b37ce6d72a4c0e (patch) | |
tree | 7ef454ac96de782a2e69463642b7d51c787ad2d1 /clang/test/CXX/expr/expr.prim/expr.prim.lambda/p7.cpp | |
parent | c68bf4c036a51c3d1e686b94d2567eb61a766b02 (diff) | |
download | bcm5719-llvm-21f4692c622fedfecab3571c12b37ce6d72a4c0e.tar.gz bcm5719-llvm-21f4692c622fedfecab3571c12b37ce6d72a4c0e.zip |
When completing a lambda expression, make sure to check and attach the
body of the lambda to the function call operator.
llvm-svn: 150087
Diffstat (limited to 'clang/test/CXX/expr/expr.prim/expr.prim.lambda/p7.cpp')
-rw-r--r-- | clang/test/CXX/expr/expr.prim/expr.prim.lambda/p7.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/test/CXX/expr/expr.prim/expr.prim.lambda/p7.cpp b/clang/test/CXX/expr/expr.prim/expr.prim.lambda/p7.cpp new file mode 100644 index 00000000000..239b6d4f469 --- /dev/null +++ b/clang/test/CXX/expr/expr.prim/expr.prim.lambda/p7.cpp @@ -0,0 +1,12 @@ +// RUN: %clang_cc1 -fsyntax-only -std=c++11 %s -verify + +// Check that analysis-based warnings work in lambda bodies. +void analysis_based_warnings() { + []() -> int { }; // expected-warning{{control reaches end of non-void function}} \ + // expected-error{{lambda expressions are not supported yet}} +} + +// FIXME: Also check translation of captured vars to data members, +// most of which isn't in the AST. + + |