]> granicus.if.org Git - clang/commitdiff
avoid issues with the new scope protector. Previously we'd error
authorChris Lattner <sabre@nondot.org>
Mon, 1 Mar 2010 20:56:44 +0000 (20:56 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 1 Mar 2010 20:56:44 +0000 (20:56 +0000)
with "address taken of label in protected scope, jump to it would have unknown effect on scope"

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97495 91177308-0d34-0410-b5e6-96231b3b80d8

test/SemaTemplate/instantiate-function-1.cpp

index 543b3cc1975995f07a2f7f47533880038baab34c..144c630fce51c95f4e546525397b7bbbbbf1d894 100644 (file)
@@ -177,9 +177,11 @@ template<typename T> struct IndirectGoto0 {
     goto *x; // expected-error{{incompatible}}
 
   prior:
-    T prior_label = &&prior;
+    T prior_label;
+    prior_label = &&prior;
 
-    T later_label = &&later;
+    T later_label;
+    later_label = &&later;
 
   later:
     (void)(1+1);