[PATCH] D112916: Confusable identifiers detection
Fangrui Song via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 13 11:12:06 PDT 2022
MaskRay added a comment.
> Subject: Confusable identifiers detection
Add `[clang-tidy] `
================
Comment at: clang-tools-extra/clang-tidy/misc/ConfusableTable/build_confusable_table.cpp:30
+
+ SmallVector<StringRef> Values;
+ Line.split(Values, ';');
----------------
Place SmallVector outside the loop and use `clear`. It is more efficient than repeatedly constructing/destroying a SmallVector.
================
Comment at: clang-tools-extra/clang-tidy/misc/ConfusableTable/build_confusable_table.cpp:60
+ "ConfusableEntries[] = {\n";
+ for (auto const &Values : Entries) {
+ os << " { ";
----------------
`const auto`
================
Comment at: clang-tools-extra/clang-tidy/misc/ConfusableTable/build_confusable_table.cpp:65
+ for (auto CP : Values.second) {
+ os << CP << ", ";
+ }
----------------
drop braces
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D112916/new/
https://reviews.llvm.org/D112916
More information about the cfe-commits
mailing list