[PATCH] D52280: Don't trim non-alphanumeric characters in 'file not found' errors for include directives.
Eric Christopher via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 20 10:23:32 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL342667: r342177 introduced a hint in cases where an #included file is not found. It… (authored by echristo, committed by ).
Herald added a subscriber: llvm-commits.
Changed prior to commit:
https://reviews.llvm.org/D52280?vs=166184&id=166326#toc
Repository:
rL LLVM
https://reviews.llvm.org/D52280
Files:
cfe/trunk/lib/Lex/PPDirectives.cpp
Index: cfe/trunk/lib/Lex/PPDirectives.cpp
===================================================================
--- cfe/trunk/lib/Lex/PPDirectives.cpp
+++ cfe/trunk/lib/Lex/PPDirectives.cpp
@@ -1887,8 +1887,8 @@
// Check for likely typos due to leading or trailing non-isAlphanumeric
// characters
+ StringRef OriginalFilename = Filename;
if (!File) {
- StringRef OriginalFilename = Filename;
while (!isAlphanumeric(Filename.front())) {
Filename = Filename.drop_front();
}
@@ -1915,7 +1915,7 @@
// If the file is still not found, just go with the vanilla diagnostic
if (!File)
- Diag(FilenameTok, diag::err_pp_file_not_found) << Filename
+ Diag(FilenameTok, diag::err_pp_file_not_found) << OriginalFilename
<< FilenameRange;
}
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52280.166326.patch
Type: text/x-patch
Size: 885 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180920/65bc3b41/attachment.bin>
More information about the llvm-commits
mailing list