From: Richard Smith Date: Tue, 1 Nov 2011 21:48:46 +0000 (+0000) Subject: Fix r143463 to test what it was intended to test. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0b4072f42f4c94c6c396b43ed3db4d1deecef9c3;p=clang 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 --- 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.