This revision was automatically updated to reflect the committed changes.
Closed by commit rL342177: Diagnose likely typos in #include directives.
(authored by rsmith, committed by ).
Herald added a subscriber: llvm-commits.
Changed prior to commit:
https://reviews.llvm.org/D51333?vs=165361&id=
christylee updated this revision to Diff 165361.
christylee added a comment.
Added tests.
https://reviews.llvm.org/D51333
Files:
include/clang/Basic/DiagnosticLexKinds.td
lib/Lex/PPDirectives.cpp
test/Preprocessor/empty_file_to_include.h
test/Preprocessor/include-likely-typo.c
Index:
lebedev.ri added a comment.
The tests seem to have disappeared form the diff.
https://reviews.llvm.org/D51333
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
christylee added a comment.
@rsmith , thanks for the review, I fixed the variable capitalization. If you
could land it for me that'll be awesome!
In https://reviews.llvm.org/D51333#1233042, @sammccall wrote:
> One thing I'd like to do sometime is add code completion of filenames in
> #include
christylee updated this revision to Diff 165350.
https://reviews.llvm.org/D51333
Files:
include/clang/Basic/DiagnosticLexKinds.td
lib/Lex/PPDirectives.cpp
Index: lib/Lex/PPDirectives.cpp
===
--- lib/Lex/PPDirectives.cpp
+++ lib
christylee updated this revision to Diff 165349.
https://reviews.llvm.org/D51333
Files:
include/clang/Basic/DiagnosticLexKinds.td
lib/Lex/PPDirectives.cpp
Index: lib/Lex/PPDirectives.cpp
===
--- lib/Lex/PPDirectives.cpp
+++ lib
xbolva00 added a comment.
Where here, I would love to have a fixint hints for unknown functions.
E.g.
std::forward somewhere in code-> fixit: "try to add #include "
https://reviews.llvm.org/D51333
___
cfe-commits mailing list
cfe-commits@lists.llvm
rsmith accepted this revision.
rsmith added a comment.
This revision is now accepted and ready to land.
Looks good (with a couple of minor code style adjustments). Do you need someone
to commit this for you?
In https://reviews.llvm.org/D51333#1233042, @sammccall wrote:
> One thing I'd like to d
christylee updated this revision to Diff 165311.
christylee added a comment.
Addressed @rsmith 's comments.
https://reviews.llvm.org/D51333
Files:
include/clang/Basic/DiagnosticLexKinds.td
lib/Lex/PPDirectives.cpp
Index: lib/Lex/PPDirectives.cpp
===
christylee added inline comments.
Comment at: lib/Lex/PPDirectives.cpp:1901
+FilenameLoc,
+LangOpts.MSVCCompat ? NormalizedPath.c_str() : Filename, false,
+LookupFrom, LookupFromFile, CurDir,
rsmith wrote:
> You're passing in `
sammccall added a comment.
(No action needed, but curious on your thoughts)
One thing I'd like to do sometime is add code completion of filenames in
#include directives.
This would mean listing the relevant directories from the include path. (VFS is
slow for this today, but I have a patch out f
rsmith added a comment.
Thanks, some comments but the approach here looks great.
Comment at: include/clang/Basic/DiagnosticLexKinds.td:428-429
+def err_pp_file_not_found_typo_not_fatal
+: Error<"'%0' file not found due to leading or trailing non-alphanumeric "
+
christylee updated this revision to Diff 165162.
christylee edited the summary of this revision.
christylee added a comment.
Emit non-fatal error for typo if file exists.
https://reviews.llvm.org/D51333
Files:
include/clang/Basic/DiagnosticLexKinds.td
lib/Lex/PPDirectives.cpp
Index: lib/L
rsmith added a comment.
In https://reviews.llvm.org/D51333#1220878, @christylee wrote:
> In https://reviews.llvm.org/D51333#1219938, @rsmith wrote:
>
> > Instead of guessing whether the corrected filename would be valid, why not
> > strip off the leading and trailing non-alphanumeric characters,
christylee marked 2 inline comments as done.
christylee added a comment.
In https://reviews.llvm.org/D51333#1219938, @rsmith wrote:
> Instead of guessing whether the corrected filename would be valid, why not
> strip off the leading and trailing non-alphanumeric characters, look up the
> result
aaron.ballman added a comment.
In https://reviews.llvm.org/D51333#1219938, @rsmith wrote:
> Instead of guessing whether the corrected filename would be valid, why not
> strip off the leading and trailing non-alphanumeric characters, look up the
> resulting filename, and find out? If we did that
rsmith added a comment.
Instead of guessing whether the corrected filename would be valid, why not
strip off the leading and trailing non-alphanumeric characters, look up the
resulting filename, and find out? If we did that, then not only could we be a
lot more confident that we'd found the fil
aaron.ballman added a reviewer: rsmith.
aaron.ballman added inline comments.
Comment at: lib/Lex/PPDirectives.cpp:1876
+ "\"" + Filename.str() + "\"")
+ << isFileNotFoundLikelyTypo;
}
I'd pass `fa
christylee updated this revision to Diff 163132.
christylee edited the summary of this revision.
christylee added a comment.
Merged warning with existing file_not_found_error.
https://reviews.llvm.org/D51333
Files:
include/clang/Basic/DiagnosticLexKinds.td
lib/Lex/PPDirectives.cpp
lib/Lex
aaron.ballman added inline comments.
Comment at: include/clang/Basic/DiagnosticLexKinds.td:476
+ ExtWarn<"likely typo, expected \"FILENAME\" or "
+ "but filename is '%0'">, InGroup;
+
This seems like the wrong warning group for this diagnostic as it doesn't
r
modocache added subscribers: aaron.ballman, erikjv, modocache.
modocache added reviewers: aaron.ballman, erikjv.
modocache added a comment.
This looks good to me, but maybe some people who've modified this part of the
codebase before could review this as well? @aaron.ballman added a fix-it for
a
christylee created this revision.
Herald added a subscriber: cfe-commits.
When someone writes
#include ""
or
#include " some_file.h "
the compiler returns "file not fond..." with fonts and quotes that may make it
hard to see there are excess quotes or surprising bytes in the filename. Th
22 matches
Mail list logo