diff options
Diffstat (limited to 'test/SemaCXX/warn-missing-noreturn.cpp')
-rw-r--r-- | test/SemaCXX/warn-missing-noreturn.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/SemaCXX/warn-missing-noreturn.cpp b/test/SemaCXX/warn-missing-noreturn.cpp index 32d020f..8016c3d 100644 --- a/test/SemaCXX/warn-missing-noreturn.cpp +++ b/test/SemaCXX/warn-missing-noreturn.cpp @@ -22,3 +22,17 @@ struct B { }; template void B::g<int>(int); // expected-note {{in instantiation of function template specialization 'B::g<int>' requested here}} + +// We don't want a warning here. +struct X { + virtual void g() { f(); } +}; + +namespace test1 { + bool condition(); + + // We don't want a warning here. + void foo() { + while (condition()) {} + } +} |