aboutsummaryrefslogtreecommitdiff
path: root/test/Sema/return-noreturn.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Sema/return-noreturn.c')
-rw-r--r--test/Sema/return-noreturn.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/Sema/return-noreturn.c b/test/Sema/return-noreturn.c
index e2452f407f4f..8868c9ee0aeb 100644
--- a/test/Sema/return-noreturn.c
+++ b/test/Sema/return-noreturn.c
@@ -27,3 +27,11 @@ __attribute__((__noreturn__)) void* test3(int arg) {
__attribute__((__noreturn__)) void* test3_positive(int arg) {
while (0) foo_test_3();
} // expected-warning{{function declared 'noreturn' should not return}}
+
+
+// PR5298 - -Wmissing-noreturn shouldn't warn if the function is already
+// declared noreturn.
+void __attribute__((noreturn))
+test4() {
+ test2_positive();
+}