Don't consider all local variables in C++ to mandate scope-checking, just
those with initializers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109964 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaCXX/scope-check.cpp b/test/SemaCXX/scope-check.cpp
index cef64f6..dd70d97 100644
--- a/test/SemaCXX/scope-check.cpp
+++ b/test/SemaCXX/scope-check.cpp
@@ -121,3 +121,15 @@
   }
 }
 
+// C++0x says it's okay to skip non-trivial initializers on static
+// locals, and we implement that in '03 as well.
+namespace test7 {
+  struct C { C(); };
+
+  void test() {
+    goto foo;
+    static C c;
+  foo:
+    return;
+  }
+}