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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158683 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/inline.c b/test/Sema/inline.c
index 23eedd6..99df8b1 100644
--- a/test/Sema/inline.c
+++ b/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
}