r290443 - Extend the tests for -Wmissing-variable-declarations.

Ed Schouten via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 23 11:20:07 PST 2016


Author: ed
Date: Fri Dec 23 13:20:07 2016
New Revision: 290443

URL: http://llvm.org/viewvc/llvm-project?rev=290443&view=rev
Log:
Extend the tests for -Wmissing-variable-declarations.

We shouldn't throw a warning when the static keyword is not present in
an anonymous namespace, just like we do for -Wmissing-prototypes.

Modified:
    cfe/trunk/test/SemaCXX/warn-missing-variable-declarations.cpp

Modified: cfe/trunk/test/SemaCXX/warn-missing-variable-declarations.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/warn-missing-variable-declarations.cpp?rev=290443&r1=290442&r2=290443&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/warn-missing-variable-declarations.cpp (original)
+++ cfe/trunk/test/SemaCXX/warn-missing-variable-declarations.cpp Fri Dec 23 13:20:07 2016
@@ -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;
+}




More information about the cfe-commits mailing list