summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2017-07-31 17:00:55 +0000
committerHans Wennborg <hans@hanshq.net>2017-07-31 17:00:55 +0000
commit6f5e1cc9f728bac74f436943ed9dab704c426ef5 (patch)
tree649aca8b3c7b37f6b3f4ee837cb79642fa810a05 /test
parent36c4419a8ff1c6ff223dad5cc42ec220d8d4413e (diff)
Merging r309503:
------------------------------------------------------------------------ r309503 | rsmith | 2017-07-29 23:31:29 -0700 (Sat, 29 Jul 2017) | 6 lines PR33902: Invalidate line number cache when adding more text to existing buffer. This led to crashes as the line number cache would report a bogus line number for a line of code, and we'd try to find a nonexistent column within the line when printing diagnostics. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_50@309580 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/Misc/caret-diags-multiline.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/Misc/caret-diags-multiline.cpp b/test/Misc/caret-diags-multiline.cpp
index 4826d9beaa..90b50ff398 100644
--- a/test/Misc/caret-diags-multiline.cpp
+++ b/test/Misc/caret-diags-multiline.cpp
@@ -232,3 +232,8 @@ void multiple_ranges(int a, int b) {
b
);
}
+
+#define pr33902_a(b) #b
+#define pr33902_c(d) _Pragma(pr33902_a(d))
+#define pr33902_e(f) pr33902_c(GCC warning #f)
+pr33902_e() pr33902_e()