summaryrefslogtreecommitdiff
path: root/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
commit0184cc719f06d2c5da6ae0725847ef875c6128cd (patch)
treef851b5133a4ba4968ecb1c48918a1f2638d928ad /test
parent29db75ceec7a6c726fc95245f9522a4dba72299a (diff)
downloadclang-0184cc719f06d2c5da6ae0725847ef875c6128cd.tar.gz
Fix PR2086.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47551 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/Preprocessor/pr2086.c11
-rw-r--r--test/Preprocessor/pr2086.h6
2 files changed, 17 insertions, 0 deletions
diff --git a/test/Preprocessor/pr2086.c b/test/Preprocessor/pr2086.c
new file mode 100644
index 0000000000..ddf2c166cd
--- /dev/null
+++ b/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/test/Preprocessor/pr2086.h b/test/Preprocessor/pr2086.h
new file mode 100644
index 0000000000..b98b996d6c
--- /dev/null
+++ b/test/Preprocessor/pr2086.h
@@ -0,0 +1,6 @@
+#ifndef test
+#endif
+
+#ifdef test
+#undef test
+#endif