]> granicus.if.org Git - clang/commitdiff
Fix r143463 to test what it was intended to test.
authorRichard Smith <richard-llvm@metafoo.co.uk>
Tue, 1 Nov 2011 21:48:46 +0000 (21:48 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Tue, 1 Nov 2011 21:48:46 +0000 (21:48 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143505 91177308-0d34-0410-b5e6-96231b3b80d8

test/SemaCXX/constant-expression-cxx11.cpp

index e65d1fa19643065d45a181ed3c24185fa83cc671..e57031b6cb6e41d4d534f85b0a9921a089ea1236 100644 (file)
@@ -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.