aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2011-11-01 21:48:46 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2011-11-01 21:48:46 +0000
commit0b4072f42f4c94c6c396b43ed3db4d1deecef9c3 (patch)
tree7a01fad75bf42a75cace4f64221e1775afd75718
parentea9f54aefc0cbf963df8b79028775a39bcf7393f (diff)
Fix r143463 to test what it was intended to test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143505 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/SemaCXX/constant-expression-cxx11.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/SemaCXX/constant-expression-cxx11.cpp b/test/SemaCXX/constant-expression-cxx11.cpp
index e65d1fa196..e57031b6cb 100644
--- a/test/SemaCXX/constant-expression-cxx11.cpp
+++ b/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.