aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/inline.cpp
diff options
context:
space:
mode:
authorJordan Rose <jordan_rose@apple.com>2012-06-18 23:58:49 +0000
committerJordan Rose <jordan_rose@apple.com>2012-06-18 23:58:49 +0000
commitc4429b9ee5045525f532d00e820a81b7eeac28f8 (patch)
tree4a367b1b72b58ad3519845a3a12e2b22903afc9c /test/SemaCXX/inline.cpp
parent3d157514d70172fe9b99cbe44f3e8fdef9a4fc21 (diff)
Change -Winternal-linkage-in-inline from ExtWarn to Warning in C++.
Per post-commit review, it's not appropriate to use ExtWarn in C++, because we can't prove that the inline function will actually be defined in more than one place (and thus we can't prove that this violates the ODR). This removes the warning entirely from uses in the main source file in C++. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158689 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/inline.cpp')
-rw-r--r--test/SemaCXX/inline.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/SemaCXX/inline.cpp b/test/SemaCXX/inline.cpp
index 9ef0229c99..6f3570e3ca 100644
--- a/test/SemaCXX/inline.cpp
+++ b/test/SemaCXX/inline.cpp
@@ -95,14 +95,14 @@ inline int useStaticMainFile () {
return staticVar; // no-warning
}
-// Check that the warnings show up when explicitly requested.
+// Check that the warnings don't show up even when explicitly requested in C++.
#pragma clang diagnostic push
#pragma clang diagnostic warning "-Winternal-linkage-in-inline"
-inline int useStaticAgain () { // expected-note 2 {{use 'static' to give inline function 'useStaticAgain' internal linkage}}
- anonFunction(); // expected-warning{{function 'anonFunction' is in an anonymous namespace but is used in an inline function with external linkage}}
- return staticVar; // expected-warning{{variable 'staticVar' has internal linkage but is used in an inline function with external linkage}}
+inline int useStaticAgain () {
+ anonFunction(); // no-warning
+ return staticVar; // no-warning
}
#pragma clang diagnostic pop