summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorLauro Ramos Venancio <lauro.venancio@gmail.com>2008-02-25 19:03:15 +0000
committerLauro Ramos Venancio <lauro.venancio@gmail.com>2008-02-25 19:03:15 +0000
commit89838915313258721f2c0b9e06341c2534b4d985 (patch)
tree190af6eb9cc545100215847dad9b983e3975c4f3 /clang/test
parenteb079dc502c6939edd8b2082643e6cd948d30c2d (diff)
downloadbcm5719-llvm-89838915313258721f2c0b9e06341c2534b4d985.tar.gz
bcm5719-llvm-89838915313258721f2c0b9e06341c2534b4d985.zip
Fix PR2086.
llvm-svn: 47551
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/Preprocessor/pr2086.c11
-rw-r--r--clang/test/Preprocessor/pr2086.h6
2 files changed, 17 insertions, 0 deletions
diff --git a/clang/test/Preprocessor/pr2086.c b/clang/test/Preprocessor/pr2086.c
new file mode 100644
index 00000000000..ddf2c166cdd
--- /dev/null
+++ b/clang/test/Preprocessor/pr2086.c
@@ -0,0 +1,11 @@
+// RUN: clang -E %s
+
+#define test
+#include "pr2086.h"
+#define test
+#include "pr2086.h"
+
+#ifdef test
+#error
+#endif
+
diff --git a/clang/test/Preprocessor/pr2086.h b/clang/test/Preprocessor/pr2086.h
new file mode 100644
index 00000000000..b98b996d6cc
--- /dev/null
+++ b/clang/test/Preprocessor/pr2086.h
@@ -0,0 +1,6 @@
+#ifndef test
+#endif
+
+#ifdef test
+#undef test
+#endif
OpenPOWER on IntegriCloud