diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-12-25 20:00:17 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-12-25 20:00:17 +0000 |
commit | eba05b2e396e1474f7bd6e8e8e1bd7752effef4d (patch) | |
tree | 84bb8feaaebede1ff2c5a9ff768c43df2c495927 /test/CXX/expr/expr.const | |
parent | 19b4a714de8841aed2727031674597f7efb62ce2 (diff) |
constexpr: perform zero-initialization prior to / instead of performing a
constructor call when appropriate. Thanks to Eli for spotting this.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147271 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CXX/expr/expr.const')
-rw-r--r-- | test/CXX/expr/expr.const/p2-0x.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/CXX/expr/expr.const/p2-0x.cpp b/test/CXX/expr/expr.const/p2-0x.cpp index 157645fc52..727f441dab 100644 --- a/test/CXX/expr/expr.const/p2-0x.cpp +++ b/test/CXX/expr/expr.const/p2-0x.cpp @@ -33,11 +33,11 @@ struct NonConstexpr3 { int m : NonConstexpr2().n; // expected-error {{constant expression}} expected-note {{undefined constructor 'NonConstexpr2'}} }; struct NonConstexpr4 { - NonConstexpr4(); + NonConstexpr4(); // expected-note {{declared here}} int n; }; struct NonConstexpr5 { - int n : NonConstexpr4().n; // expected-error {{constant expression}} expected-note {{non-literal type 'NonConstexpr4' cannot be used in a constant expression}} + int n : NonConstexpr4().n; // expected-error {{constant expression}} expected-note {{non-constexpr constructor 'NonConstexpr4' cannot be used in a constant expression}} }; // - an invocation of an undefined constexpr function or an undefined |