diff options
author | Douglas Gregor <dgregor@apple.com> | 2012-02-10 16:13:20 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2012-02-10 16:13:20 +0000 |
commit | 04bbab586beb522a27d6e10529c7c6f50189570e (patch) | |
tree | 5bc485e454ea4ebde69b01d9b1855406009d29da /clang/test/CXX/expr/expr.prim/expr.prim.lambda/p7.cpp | |
parent | c7f4841769bb92a20e16564ff6918992dd75e1f2 (diff) | |
download | bcm5719-llvm-04bbab586beb522a27d6e10529c7c6f50189570e.tar.gz bcm5719-llvm-04bbab586beb522a27d6e10529c7c6f50189570e.zip |
Don't introduce a lambda's operator() into the class until after we
have finished parsing the body, so that name lookup will never find
anything within the closure type. Then, add this operator() and the
conversion function (if available) before completing the class.
llvm-svn: 150252
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 | 9 |
1 files changed, 9 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 index 21c8e22092b..8fa3837214d 100644 --- a/clang/test/CXX/expr/expr.prim/expr.prim.lambda/p7.cpp +++ b/clang/test/CXX/expr/expr.prim/expr.prim.lambda/p7.cpp @@ -43,3 +43,12 @@ void test_capture_constness(int i, const int ic) { } +struct S1 { + int x, y; + int operator()(int); + void f() { + [&]()->int { + return operator()(this->x + y); + }(); + } +}; |