]> granicus.if.org Git - clang/commitdiff
Prep for new warning.
authorMike Stump <mrs@apple.com>
Tue, 21 Jul 2009 19:02:55 +0000 (19:02 +0000)
committerMike Stump <mrs@apple.com>
Tue, 21 Jul 2009 19:02:55 +0000 (19:02 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76627 91177308-0d34-0410-b5e6-96231b3b80d8

test/CXX/class/class.local/p1.cpp

index 8a84f5dbed8afeec6f3b9bf95a447d2095b5e789..565ddb85886229ad6beed39d23f3aac812e7d185 100644 (file)
@@ -8,7 +8,10 @@ void f()
   extern int g();
   
   struct local {
-    int g() { return x; } // expected-error{{reference to local variable 'x' declared in enclosed function 'f'}}
+    int g() {
+      return x; // expected-error{{reference to local variable 'x' declared in enclosed function 'f'}}
+      return 1;
+    }
     int h() { return s; }
     int k() { return :: x; }
     int l() { return g(); }