]> granicus.if.org Git - clang/commitdiff
Extend the tests for -Wmissing-variable-declarations.
authorEd Schouten <ed@nuxi.nl>
Fri, 23 Dec 2016 19:20:07 +0000 (19:20 +0000)
committerEd Schouten <ed@nuxi.nl>
Fri, 23 Dec 2016 19:20:07 +0000 (19:20 +0000)
We shouldn't throw a warning when the static keyword is not present in
an anonymous namespace, just like we do for -Wmissing-prototypes.

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

test/SemaCXX/warn-missing-variable-declarations.cpp

index ad23e0429bbdf26a62b8bb70417d1e1ed4b37c16..5b882845f3c6e31fc85acd73def551d108521c32 100644 (file)
@@ -47,3 +47,8 @@ class C {
     static int x = 0; // no-warn
   }
 };
+
+// There is also no need to use static in anonymous namespaces.
+namespace {
+  int vgood4;
+}