summaryrefslogtreecommitdiffstats
path: root/test/SemaCXX/warn-unused-filescoped.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/warn-unused-filescoped.cpp')
-rw-r--r--test/SemaCXX/warn-unused-filescoped.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/SemaCXX/warn-unused-filescoped.cpp b/test/SemaCXX/warn-unused-filescoped.cpp
index e12668b..9fb6011 100644
--- a/test/SemaCXX/warn-unused-filescoped.cpp
+++ b/test/SemaCXX/warn-unused-filescoped.cpp
@@ -133,6 +133,27 @@ namespace test6 {
};
}
+namespace test7
+{
+ template<typename T>
+ static inline void foo(T) { }
+
+ // This should not emit an unused-function warning since it inherits
+ // the static storage type from the base template.
+ template<>
+ inline void foo(int) { }
+
+ // Partial specialization
+ template<typename T, typename U>
+ static inline void bar(T, U) { }
+
+ template<typename U>
+ inline void bar(int, U) { }
+
+ template<>
+ inline void bar(int, int) { }
+};
+
namespace pr14776 {
namespace {
struct X {};
OpenPOWER on IntegriCloud