aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/inline.cpp
diff options
context:
space:
mode:
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