diff options
author | Douglas Gregor <dgregor@apple.com> | 2012-02-18 05:51:20 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2012-02-18 05:51:20 +0000 |
commit | 68932845a432d2a1dbbc57a84fd85bbb37c90487 (patch) | |
tree | 135bedbb565cfe47f8fc84749b471eae7821f674 /test/CXX/expr/expr.prim/expr.prim.lambda/p18.cpp | |
parent | b78ae9716576399145786b93f687943f8b197170 (diff) |
Unify our computation of the type of a captured reference to a
variable; it was previously duplicated, and one of the copies failed
to account for outer non-mutable lambda captures.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150872 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CXX/expr/expr.prim/expr.prim.lambda/p18.cpp')
-rw-r--r-- | test/CXX/expr/expr.prim/expr.prim.lambda/p18.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/CXX/expr/expr.prim/expr.prim.lambda/p18.cpp b/test/CXX/expr/expr.prim/expr.prim.lambda/p18.cpp index 03cbe32ef4..e9356136c7 100644 --- a/test/CXX/expr/expr.prim/expr.prim.lambda/p18.cpp +++ b/test/CXX/expr/expr.prim/expr.prim.lambda/p18.cpp @@ -17,12 +17,12 @@ void f3() { const int &irc = i; [=,&irc,&ir] { + static_assert(is_same<decltype(((r))), float const&>::value, + "should be const float&"); static_assert(is_same<decltype(x), float>::value, "should be float"); static_assert(is_same<decltype((x)), const float&>::value, "should be const float&"); static_assert(is_same<decltype(r), float&>::value, "should be float&"); - static_assert(is_same<decltype(((r))), float const&>::value, - "should be const float&"); static_assert(is_same<decltype(ir), int&>::value, "should be int&"); static_assert(is_same<decltype((ir)), int&>::value, "should be int&"); static_assert(is_same<decltype(irc), const int&>::value, |