diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-11-01 21:48:46 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-11-01 21:48:46 +0000 |
commit | 1a77e8d10dffd7c10d90a77693bd13d717839bfb (patch) | |
tree | 93c94cf8bc282880f716a0dc6412b421ab266df8 | |
parent | fe0055e6c879f8bf1b1a7fc2858f3d422dffa514 (diff) | |
download | bcm5719-llvm-1a77e8d10dffd7c10d90a77693bd13d717839bfb.tar.gz bcm5719-llvm-1a77e8d10dffd7c10d90a77693bd13d717839bfb.zip |
Fix r143463 to test what it was intended to test.
llvm-svn: 143505
-rw-r--r-- | clang/test/SemaCXX/constant-expression-cxx11.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/test/SemaCXX/constant-expression-cxx11.cpp b/clang/test/SemaCXX/constant-expression-cxx11.cpp index e65d1fa1964..e57031b6cb6 100644 --- a/clang/test/SemaCXX/constant-expression-cxx11.cpp +++ b/clang/test/SemaCXX/constant-expression-cxx11.cpp @@ -107,8 +107,8 @@ namespace ParameterScopes { // constant expression even though 'a' is still in scope. return ObscureTheTruth(b ? a : k); } - constexpr int n1a = MaybeReturnJunk(false, 0); // ok - constexpr int n2a = MaybeReturnJunk(true, 0); // expected-error {{must be initialized by a constant expression}} + constexpr int n1a = MaybeReturnNonstaticRef(false, 0); // ok + constexpr int n2a = MaybeReturnNonstaticRef(true, 0); // expected-error {{must be initialized by a constant expression}} constexpr int InternalReturnJunk(int n) { // FIXME: We should reject this: it never produces a constant expression. |