diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-02-10 07:41:06 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-02-10 07:41:06 +0000 |
commit | 864b1cf13b288c5099911e1265431ffdcac060a4 (patch) | |
tree | 52920fb94183ea3fb19c3f01f379d2771e3f9c94 /test/CXX/expr | |
parent | b880609697b3db5ae3df77387532f8b0cec89274 (diff) |
Update to new resolution for DR1458. When taking the address of an object of
incomplete class type which has an overloaded operator&, it's now just
unspecified whether the overloaded operator or the builtin is used.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150234 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CXX/expr')
-rw-r--r-- | test/CXX/expr/expr.const/p2-0x.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/test/CXX/expr/expr.const/p2-0x.cpp b/test/CXX/expr/expr.const/p2-0x.cpp index 43d683aeca..2d4f4fb62e 100644 --- a/test/CXX/expr/expr.const/p2-0x.cpp +++ b/test/CXX/expr/expr.const/p2-0x.cpp @@ -111,9 +111,10 @@ namespace RecursionLimits { // DR1458: taking the address of an object of incomplete class type namespace IncompleteClassTypeAddr { - struct S; // expected-note {{forward}} + struct S; extern S s; - constexpr S *p = &s; // expected-error {{constant expression}} expected-note {{cannot take address of object of incomplete class type 'IncompleteClassTypeAddr::S' in a constant expression}} + constexpr S *p = &s; // ok + static_assert(p, ""); extern S sArr[]; constexpr S (*p2)[] = &sArr; // ok @@ -121,7 +122,7 @@ namespace IncompleteClassTypeAddr { struct S { constexpr S *operator&() { return nullptr; } }; - constexpr S *q = &s; + constexpr S *q = &s; // ok static_assert(!q, ""); } |