[PATCH] D46293: [clang-tidy/google-runtime-int] Allow passing non-bitwidth types to printf()-style APIs

Alexander Kornienko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 30 16:09:56 PDT 2018


alexfh added inline comments.


================
Comment at: clang-tidy/google/IntegerTypesCheck.cpp:66
+  Finder->addMatcher(typeLoc(loc(isInteger()),
+                             unless(hasAncestor(callExpr(
+                                 callee(functionDecl(hasAttr(attr::Format)))))))
----------------
I vaguely remember that there were some problems matching ancestors of TypeLocs. I hope this has been solved since then, but making a test more robust would be useful. See the other comment.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D46293





More information about the cfe-commits mailing list