summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/test/redundantinline.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'compilerplugins/clang/test/redundantinline.cxx')
-rw-r--r--compilerplugins/clang/test/redundantinline.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/compilerplugins/clang/test/redundantinline.cxx b/compilerplugins/clang/test/redundantinline.cxx
index 038a1497d98e..f69e0a3b80cf 100644
--- a/compilerplugins/clang/test/redundantinline.cxx
+++ b/compilerplugins/clang/test/redundantinline.cxx
@@ -11,4 +11,14 @@
S1::~S1() = default;
+static inline int f8() { return 0; } // expected-error {{function has no external linkage but is explicitly declared 'inline' [loplugin:redundantinline]}}
+
+namespace {
+
+static inline int f9() { return 0; } // expected-error {{function has no external linkage but is explicitly declared 'inline' [loplugin:redundantinline]}}
+
+}
+
+int main() { return f8() + f9(); }
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */