From 28cd12f26533cf7ab6e21c20aaebe153c6a53ccf Mon Sep 17 00:00:00 2001 From: Jordan Rose Date: Mon, 18 Jun 2012 22:09:19 +0000 Subject: 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 --- clang/test/Sema/inline.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'clang/test/Sema/inline.c') 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 } -- cgit v1.2.3