[clang-tools-extra] [clang-tidy] Speed up `readability-uppercase-literal-suffix` (PR #178149)

Victor Chernyakin via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 27 02:51:25 PST 2026


================
@@ -191,43 +190,38 @@ void UppercaseLiteralSuffixCheck::registerMatchers(MatchFinder *Finder) {
   // Sadly, we can't check whether the literal has suffix or not.
   // E.g. i32 suffix still results in 'BuiltinType::Kind::Int'.
   // And such an info is not stored in the *Literal itself.
-  Finder->addMatcher(
-      stmt(eachOf(integerLiteral().bind(IntegerLiteralCheck::Name),
-                  floatLiteral().bind(FloatingLiteralCheck::Name)),
-           unless(anyOf(hasParent(userDefinedLiteral()),
-                        hasAncestor(substNonTypeTemplateParmExpr())))),
----------------
localspook wrote:

I deleted the `hasAncestor(substNonTypeTemplateParmExpr())` part and no tests failed, so I guess it's not needed.

https://github.com/llvm/llvm-project/pull/178149


More information about the cfe-commits mailing list