diff options
Diffstat (limited to 'test/SemaCXX/warn-unused-filescoped.cpp')
-rw-r--r-- | test/SemaCXX/warn-unused-filescoped.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/SemaCXX/warn-unused-filescoped.cpp b/test/SemaCXX/warn-unused-filescoped.cpp index 0ad2362779..9b4f9ae203 100644 --- a/test/SemaCXX/warn-unused-filescoped.cpp +++ b/test/SemaCXX/warn-unused-filescoped.cpp @@ -25,3 +25,19 @@ namespace { } void S::m3() { } // expected-warning{{unused}} + +static int x1; // expected-warning{{unused}} + +namespace { + int x2; // expected-warning{{unused}} + + struct S2 { + static int x; // expected-warning{{unused}} + }; + + template <typename T> + struct TS2 { + static int x; + }; + template <> int TS2<int>::x; // expected-warning{{unused}} +} |