summaryrefslogtreecommitdiffstats
path: root/test/PCH/format-strings.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/PCH/format-strings.c')
-rw-r--r--test/PCH/format-strings.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/PCH/format-strings.c b/test/PCH/format-strings.c
new file mode 100644
index 0000000..7198c4d
--- /dev/null
+++ b/test/PCH/format-strings.c
@@ -0,0 +1,18 @@
+// RUN: %clang_cc1 -D FOOBAR="\"\"" %s -emit-pch -o %t.pch
+// RUN: %clang_cc1 -D FOOBAR="\"\"" %s -include-pch %t.pch
+
+// rdar://11418366
+
+#ifndef HEADER
+#define HEADER
+
+extern int printf(const char *restrict, ...);
+#define LOG printf(FOOBAR "%f", __LINE__)
+
+#else
+
+void foo() {
+ LOG;
+}
+
+#endif
OpenPOWER on IntegriCloud