summaryrefslogtreecommitdiffstats
path: root/clang/test/Preprocessor/has_include.c
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2013-03-18 23:22:28 +0000
committerDavid Blaikie <dblaikie@gmail.com>2013-03-18 23:22:28 +0000
commit1dc4a3dfd6f99f28d73a3d7ebd6285fe6dd7187f (patch)
tree4b475aa58cd4555c8f7b367fe5e28b1d82ad0edc /clang/test/Preprocessor/has_include.c
parent008322f2b071412798ec74c79d1987a7cc317225 (diff)
downloadbcm5719-llvm-1dc4a3dfd6f99f28d73a3d7ebd6285fe6dd7187f.tar.gz
bcm5719-llvm-1dc4a3dfd6f99f28d73a3d7ebd6285fe6dd7187f.zip
PR15539: Record "evaluating if/elif condition" flag in the right place
The previous implementation missed the case where the elif condition was evaluated from the context of an #ifdef that was false causing PR15539. llvm-svn: 177345
Diffstat (limited to 'clang/test/Preprocessor/has_include.c')
-rw-r--r--clang/test/Preprocessor/has_include.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/test/Preprocessor/has_include.c b/clang/test/Preprocessor/has_include.c
index 7cc67fac031..131e51919f7 100644
--- a/clang/test/Preprocessor/has_include.c
+++ b/clang/test/Preprocessor/has_include.c
@@ -176,3 +176,12 @@ __has_include
#else
#error "__has_include failed (9)."
#endif
+
+#if FOO
+#elif __has_include(<foo>)
+#endif
+
+// PR15539
+#ifdef FOO
+#elif __has_include(<foo>)
+#endif
OpenPOWER on IntegriCloud