Support -Winternal-linkage-in-inline in C++ code.
This includes treating anonymous namespaces like internal linkage, and allowing
const variables to be used even if internal. The whole thing's been broken out
into a separate function to avoid nested ifs.
llvm-svn: 158683
diff --git a/clang/test/Sema/inline.c b/clang/test/Sema/inline.c
index 23eedd6..99df8b1 100644
--- a/clang/test/Sema/inline.c
+++ b/clang/test/Sema/inline.c
@@ -1,4 +1,5 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -x c++ %s
#if defined(INCLUDE)
// -------
@@ -40,7 +41,7 @@
// Check that the warnings from the "header file" aren't on by default in
// the main source file.
-inline int useStaticMain () {
+inline int useStaticMainFile () {
staticFunction(); // no-warning
return staticVar; // no-warning
}