summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/inline.c
diff options
context:
space:
mode:
authorJordan Rose <jordan_rose@apple.com>2012-06-18 22:09:19 +0000
committerJordan Rose <jordan_rose@apple.com>2012-06-18 22:09:19 +0000
commit28cd12f26533cf7ab6e21c20aaebe153c6a53ccf (patch)
tree664956a1543d354d72c8d60d4755467a07ffb75e /clang/test/Sema/inline.c
parent2fa69ef9349008aa0a7376a3bf6587e188488dd0 (diff)
downloadbcm5719-llvm-28cd12f26533cf7ab6e21c20aaebe153c6a53ccf.tar.gz
bcm5719-llvm-28cd12f26533cf7ab6e21c20aaebe153c6a53ccf.zip
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
Diffstat (limited to 'clang/test/Sema/inline.c')
-rw-r--r--clang/test/Sema/inline.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/test/Sema/inline.c b/clang/test/Sema/inline.c
index 23eedd6b226..99df8b1106b 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 @@ int d(inline int a); // expected-error{{'inline' can only appear on functions}}
// 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
}
OpenPOWER on IntegriCloud