From c62002fb1677ea96ee95b4810106f15d0e7209e9 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. llvm-svn: 290443 --- clang/test/SemaCXX/warn-missing-variable-declarations.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/clang/test/SemaCXX/warn-missing-variable-declarations.cpp b/clang/test/SemaCXX/warn-missing-variable-declarations.cpp index ad23e0429bbd..5b882845f3c6 100644 --- a/clang/test/SemaCXX/warn-missing-variable-declarations.cpp +++ b/clang/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; +}