diff options
author | Taewook Oh <twoh@fb.com> | 2016-06-13 17:03:18 +0000 |
---|---|---|
committer | Taewook Oh <twoh@fb.com> | 2016-06-13 17:03:18 +0000 |
commit | e8533670bf22cda6339664618b2b0bfd76f83661 (patch) | |
tree | 268b16d618cd14c2c87f34ad0bab4b9ab4f063ac /clang/lib/Basic/FileManager.cpp | |
parent | 34c72c4773989d65460542f6425fda8b5d509586 (diff) | |
download | llvm-e8533670bf22cda6339664618b2b0bfd76f83661.zip llvm-e8533670bf22cda6339664618b2b0bfd76f83661.tar.gz llvm-e8533670bf22cda6339664618b2b0bfd76f83661.tar.bz2 |
Use the name of the file on disk to issue a new diagnostic about non-portable #include and #import paths.
Differential Revision: http://reviews.llvm.org/D19843
Corresponding LLVM change: http://reviews.llvm.org/D19842
Re-commit after addressing issues with of generating too many warnings for Windows and asan test failures.
Patch by Eric Niebler
llvm-svn: 272562
Diffstat (limited to 'clang/lib/Basic/FileManager.cpp')
-rw-r--r-- | clang/lib/Basic/FileManager.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Basic/FileManager.cpp b/clang/lib/Basic/FileManager.cpp index c4cc8dc..ce9b7e1 100644 --- a/clang/lib/Basic/FileManager.cpp +++ b/clang/lib/Basic/FileManager.cpp @@ -312,6 +312,9 @@ const FileEntry *FileManager::getFile(StringRef Filename, bool openFile, UFE.InPCH = Data.InPCH; UFE.File = std::move(F); UFE.IsValid = true; + if (UFE.File) + if (auto RealPathName = UFE.File->getName()) + UFE.RealPathName = *RealPathName; return &UFE; } |