summaryrefslogtreecommitdiffstats
path: root/test/Preprocessor/print_line_track.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Preprocessor/print_line_track.c')
-rw-r--r--test/Preprocessor/print_line_track.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/Preprocessor/print_line_track.c b/test/Preprocessor/print_line_track.c
new file mode 100644
index 0000000..539433d
--- /dev/null
+++ b/test/Preprocessor/print_line_track.c
@@ -0,0 +1,17 @@
+/* RUN: clang-cc -E %s | grep 'a 3' &&
+ * RUN: clang-cc -E %s | grep 'b 16' &&
+ * RUN: clang-cc -E -P %s | grep 'a 3' &&
+ * RUN: clang-cc -E -P %s | grep 'b 16' &&
+ * RUN: clang-cc -E %s | not grep '# 0 '
+ * PR1848
+ * PR3437
+*/
+
+#define t(x) x
+
+t(a
+3)
+
+t(b
+__LINE__)
+
OpenPOWER on IntegriCloud