[PATCH] D110493: [clang-tidy] Fix bug 51790 in readability-uppercase-literal-suffix
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 27 05:15:04 PDT 2021
aaron.ballman added a comment.
Thank you for the fix!
================
Comment at: clang-tools-extra/clang-tidy/readability/UppercaseLiteralSuffixCheck.cpp:137-138
+ // Make sure the first character is actually a digit
+ // https://bugs.llvm.org/show_bug.cgi?id=51790
+ if (!std::isdigit(static_cast<unsigned char>(LiteralSourceText.front())))
----------------
================
Comment at: clang-tools-extra/test/clang-tidy/checkers/readability-uppercase-literal-suffix-integer.cpp:286
+ int x = Vector<10>::kCapacity;
+}
----------------
Can you add a `// CHECK-MESSAGES-NOT:` line to the places where we used to diagnose but no longer do? That helps make the test more explicit.
Another test to add is a nontype template parameter whose identifier ends in a digit just before the `i`. e.g., `foo1i`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110493/new/
https://reviews.llvm.org/D110493
More information about the cfe-commits
mailing list