summaryrefslogtreecommitdiffstats
path: root/test/Preprocessor/warning_tests.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Preprocessor/warning_tests.c')
-rw-r--r--test/Preprocessor/warning_tests.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/Preprocessor/warning_tests.c b/test/Preprocessor/warning_tests.c
index 96b96ef..3f2865c 100644
--- a/test/Preprocessor/warning_tests.c
+++ b/test/Preprocessor/warning_tests.c
@@ -6,14 +6,16 @@
#if __has_warning("not valid") // expected-warning {{__has_warning expected option name}}
#endif
+// expected-warning@+2 {{Should have -Wparentheses}}
#if __has_warning("-Wparentheses")
-#warning Should have -Wparentheses // expected-warning {{Should have -Wparentheses}}
+#warning Should have -Wparentheses
#endif
#if __has_warning(-Wfoo) // expected-error {{builtin warning check macro requires a parenthesized string}}
#endif
+// expected-warning@+3 {{Not a valid warning flag}}
#if __has_warning("-Wnot-a-valid-warning-flag-at-all")
#else
-#warning Not a valid warning flag // expected-warning {{Not a valid warning flag}}
-#endif \ No newline at end of file
+#warning Not a valid warning flag
+#endif
OpenPOWER on IntegriCloud