diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2014-05-17 04:36:39 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2014-05-17 04:36:39 +0000 |
commit | 5027d6f10a9e7c2afa88ce6dc6560f8f4c4ff47c (patch) | |
tree | 9e87b17ded2c663243cd7879edda8ce6fe0af4f3 /test/CXX/expr/expr.prim/expr.prim.lambda | |
parent | 0c6c783d89b0d82ab0e5b0f7c5f7034669578f4e (diff) | |
download | clang-5027d6f10a9e7c2afa88ce6dc6560f8f4c4ff47c.tar.gz |
More fixes for isBetterOverloadCandidate not being a strict weak ordering. The
bug was obvious from inspection, figuring out a way to test it was... less so.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209060 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CXX/expr/expr.prim/expr.prim.lambda')
-rw-r--r-- | test/CXX/expr/expr.prim/expr.prim.lambda/blocks.mm | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/CXX/expr/expr.prim/expr.prim.lambda/blocks.mm b/test/CXX/expr/expr.prim/expr.prim.lambda/blocks.mm index 345ea9bb2d..96e8fcd8d3 100644 --- a/test/CXX/expr/expr.prim/expr.prim.lambda/blocks.mm +++ b/test/CXX/expr/expr.prim/expr.prim.lambda/blocks.mm @@ -85,6 +85,24 @@ namespace overloading { void call_with_lambda() { int &ir = accept_lambda_conv([](int x) { return x + 1; }); } + + template<typename T> using id = T; + + auto a = [](){}; + struct C : decltype(a) { + using decltype(a)::operator id<void(*)()>; + private: + using decltype(a)::operator id<void(^)()>; + } extern c; + + struct D : decltype(a) { + using decltype(a)::operator id<void(^)()>; + private: + using decltype(a)::operator id<void(*)()>; // expected-note {{here}} + } extern d; + + bool r1 = c; + bool r2 = d; // expected-error {{private}} } namespace PR13117 { |