summaryrefslogtreecommitdiff
path: root/test/Preprocessor
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-12-09 21:11:08 +0000
committerChris Lattner <sabre@nondot.org>2007-12-09 21:11:08 +0000
commit5f1803210b24b79c1a20f88aa8b0c62191e9d1cb (patch)
treed52a1947d1bd197f4cf3cf31f3d0c5af2f6372d4 /test/Preprocessor
parent5c0887c1be978f4288cba5afcf93d0bdf2bd22f5 (diff)
downloadclang-5f1803210b24b79c1a20f88aa8b0c62191e9d1cb.tar.gz
The flags on tokens indicate whether they are the start of a *physical* line,
not the start of a logical line. Be careful about this distinction, which affects when newlines are printed and when paste-avoidance happens, etc. This fixes PR1848, thanks to Neil for noticing this! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44743 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Preprocessor')
-rw-r--r--test/Preprocessor/print_line_track.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/Preprocessor/print_line_track.c b/test/Preprocessor/print_line_track.c
new file mode 100644
index 0000000000..4fbef7407c
--- /dev/null
+++ b/test/Preprocessor/print_line_track.c
@@ -0,0 +1,15 @@
+/* RUN: clang -E %s | grep 'a 3'
+ * RUN: clang -E %s | grep 'b 14'
+ * RUN: clang -E -P %s | grep 'a 3'
+ * RUN: clang -E -P %s | grep 'b 14'
+ * PR1848
+*/
+
+#define t(x) x
+
+t(a
+3)
+
+t(b
+__LINE__)
+