aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/Preprocessor/if_warning.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/Preprocessor/if_warning.c b/test/Preprocessor/if_warning.c
index f07c88707e..acb6d5ea42 100644
--- a/test/Preprocessor/if_warning.c
+++ b/test/Preprocessor/if_warning.c
@@ -1,7 +1,8 @@
-// RUN: clang-cc %s -E -Wundef -Werror 2>&1 | grep error | count 1 &&
-// RUN: clang-cc %s -E -Werror 2>&1 | not grep error
+// RUN: clang-cc %s -Eonly -Werror=undef -verify
-#if foo // Should generate an warning
+extern int x;
+
+#if foo // expected-error {{'foo' is not defined, evaluates to 0}}
#endif
#ifdef foo