fix rdar://6505352 - Bogus warning with -WUndef, a case
Anders noticed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62472 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Preprocessor/expr_liveness.c b/test/Preprocessor/expr_liveness.c
index 3f4003e..d9e5d7c 100644
--- a/test/Preprocessor/expr_liveness.c
+++ b/test/Preprocessor/expr_liveness.c
@@ -1,4 +1,4 @@
-/* RUN: clang -E %s -DNO_ERRORS &&
+/* RUN: clang -E %s -DNO_ERRORS -Werror -Wundef &&
RUN: not clang -E %s
*/
@@ -44,3 +44,9 @@
#endif
+
+// rdar://6505352
+// -Wundef should not warn about use of undefined identifier if not live.
+#if (!defined(XXX) || XXX > 42)
+#endif
+