diff options
Diffstat (limited to 'test/SemaCXX/warn-unused-filescoped.cpp')
-rw-r--r-- | test/SemaCXX/warn-unused-filescoped.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/SemaCXX/warn-unused-filescoped.cpp b/test/SemaCXX/warn-unused-filescoped.cpp index b0af5b3322706..df4c47e71787d 100644 --- a/test/SemaCXX/warn-unused-filescoped.cpp +++ b/test/SemaCXX/warn-unused-filescoped.cpp @@ -32,6 +32,13 @@ namespace test7 inline void bar(int, int) { } }; +namespace pr19713 { +#if __cplusplus >= 201103L + static constexpr int constexpr1() { return 1; } + constexpr int constexpr2() { return 2; } +#endif +} + #else #define HEADER #include "warn-unused-filescoped.cpp" @@ -193,4 +200,12 @@ void bar() { void func() __attribute__((used)); } static void func() {} } +namespace pr19713 { +#if __cplusplus >= 201103L + // FIXME: We should warn on both of these. + static constexpr int constexpr3() { return 1; } // expected-warning {{unused}} + constexpr int constexpr4() { return 2; } +#endif +} + #endif |