[clang-tools-extra] [clang-tidy] Ignore user-defined literals in google-runtime-int (PR #78859)
FĂ©lix-Antoine Constantin via cfe-commits
cfe-commits at lists.llvm.org
Sat Jan 20 18:03:30 PST 2024
================
@@ -56,11 +56,14 @@ void IntegerTypesCheck::registerMatchers(MatchFinder *Finder) {
// http://google.github.io/styleguide/cppguide.html#64-bit_Portability
// "Where possible, avoid passing arguments of types specified by
// bitwidth typedefs to printf-based APIs."
- Finder->addMatcher(typeLoc(loc(isInteger()),
- unless(hasAncestor(callExpr(
- callee(functionDecl(hasAttr(attr::Format)))))))
- .bind("tl"),
- this);
+ Finder->addMatcher(
+ typeLoc(loc(isInteger()),
+ unless(anyOf(hasAncestor(callExpr(
+ callee(functionDecl(hasAttr(attr::Format))))),
+ hasParent(parmVarDecl(hasAncestor(functionDecl(
+ matchesName("operator\"\".*$"))))))))
----------------
felix642 wrote:
Thank you, didn't think about this
https://github.com/llvm/llvm-project/pull/78859
More information about the cfe-commits
mailing list