[PATCH] D98635: [libtooling][clang-tidy] Fix diagnostics not respecting and highlighting fed SourceRanges
Nathan James via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 16 11:36:51 PDT 2021
njames93 added a comment.
Again LGTM, but see what alex says.
================
Comment at: clang-tools-extra/clang-tidy/ClangTidy.cpp:135-137
+ for (const FileByteRange &FBR : Error.Message.Ranges) {
+ Diag << getRange(FBR);
+ }
----------------
nit: Elide braces.
================
Comment at: clang-tools-extra/clang-tidy/ClangTidy.cpp:279-281
+ for (const FileByteRange &FBR : Message.Ranges) {
+ Diag << getRange(FBR);
+ }
----------------
nit: Elide braces.
================
Comment at: clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp:81-84
+ for (const CharSourceRange &SourceRange : Ranges) {
+ Error.Notes.back().Ranges.emplace_back(Loc.getManager(),
+ ToCharRange(SourceRange));
+ }
----------------
nit: Elide braces.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98635/new/
https://reviews.llvm.org/D98635
More information about the cfe-commits
mailing list