From 04d0827ce598578a3cd298f2834352198b5c3285 Mon Sep 17 00:00:00 2001 From: Ed Schouten Date: Fri, 23 Dec 2016 19:20:07 +0000 Subject: [PATCH] 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290443 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/SemaCXX/warn-missing-variable-declarations.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/SemaCXX/warn-missing-variable-declarations.cpp b/test/SemaCXX/warn-missing-variable-declarations.cpp index ad23e0429b..5b882845f3 100644 --- a/test/SemaCXX/warn-missing-variable-declarations.cpp +++ b/test/SemaCXX/warn-missing-variable-declarations.cpp @@ -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; +} -- 2.40.0