aboutsummaryrefslogtreecommitdiff
path: root/test/Preprocessor/mi_opt2.c
diff options
context:
space:
mode:
authorRoman Divacky <rdivacky@FreeBSD.org>2010-02-16 09:31:36 +0000
committerRoman Divacky <rdivacky@FreeBSD.org>2010-02-16 09:31:36 +0000
commitecb7e5c8afe929ee38155db94de6b084ec32a645 (patch)
tree53010172e19c77ea447bcd89e117cda052ab52e0 /test/Preprocessor/mi_opt2.c
parent5044f5c816adfd5cba17f1adee1a10127296d0bf (diff)
Notes
Diffstat (limited to 'test/Preprocessor/mi_opt2.c')
-rw-r--r--test/Preprocessor/mi_opt2.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/Preprocessor/mi_opt2.c b/test/Preprocessor/mi_opt2.c
new file mode 100644
index 0000000000000..198d19fdb7acf
--- /dev/null
+++ b/test/Preprocessor/mi_opt2.c
@@ -0,0 +1,15 @@
+// RUN: %clang_cc1 -E %s | FileCheck %s
+// PR6282
+// This test should not trigger the include guard optimization since
+// the guard macro is defined on the first include.
+
+#define ITERATING 1
+#define X 1
+#include "mi_opt2.h"
+#undef X
+#define X 2
+#include "mi_opt2.h"
+
+// CHECK: b: 1
+// CHECK: b: 2
+