summaryrefslogtreecommitdiffstats
path: root/clang/test/Preprocessor/Inputs
diff options
context:
space:
mode:
authorVolodymyr Sapsai <vsapsai@apple.com>2019-05-27 19:15:30 +0000
committerVolodymyr Sapsai <vsapsai@apple.com>2019-05-27 19:15:30 +0000
commite32ff096858578f526b6d05ab97c8f083f2e1834 (patch)
tree5d29321aa293c805bb59fd1f8b7b81abb1ce4e73 /clang/test/Preprocessor/Inputs
parente13ae3e4d82b95ca1086f658de00402ffb6b128e (diff)
downloadbcm5719-llvm-e32ff096858578f526b6d05ab97c8f083f2e1834.tar.gz
bcm5719-llvm-e32ff096858578f526b6d05ab97c8f083f2e1834.zip
[Preprocessor] Fix crash emitting note with framework location for "file not found" error.
A filename can be remapped with a header map to point to a framework header and we can find the corresponding framework without the header. But if the original filename doesn't have a remapped framework name, we'll fail to find its location and will dereference a null pointer during diagnostics emission. Fix by tracking remappings better and emit the note only if a framework is found before any of the remappings. rdar://problem/48883447 Reviewers: arphaman, erik.pilkington, jkorous Reviewed By: arphaman Subscribers: dexonsmith, cfe-commits Differential Revision: https://reviews.llvm.org/D61707 llvm-svn: 361779
Diffstat (limited to 'clang/test/Preprocessor/Inputs')
-rw-r--r--clang/test/Preprocessor/Inputs/include-header-missing-in-framework/TestFramework.hmap.json7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/test/Preprocessor/Inputs/include-header-missing-in-framework/TestFramework.hmap.json b/clang/test/Preprocessor/Inputs/include-header-missing-in-framework/TestFramework.hmap.json
new file mode 100644
index 00000000000..193c7a779c6
--- /dev/null
+++ b/clang/test/Preprocessor/Inputs/include-header-missing-in-framework/TestFramework.hmap.json
@@ -0,0 +1,7 @@
+{
+ "mappings" :
+ {
+ "RemappedHeader.h" : "TestFramework/RemappedHeader.h",
+ "TestFramework/BeforeRemapping.h" : "TestFramework/AfterRemapping.h"
+ }
+}
OpenPOWER on IntegriCloud