forked from OSchip/llvm-project
969d63ea8c
Summary: The `google-runtime-int` check currently fires on calls like: printf("%lu", (unsigned long)foo); However, the style guide says: > Where possible, avoid passing arguments of types specified by > bitwidth typedefs to printf-based APIs. http://google.github.io/styleguide/cppguide.html#64-bit_Portability This diff relaxes the check to not fire on parameters to functions with the `__format__` attribute. (I didn't specifically check for `__printf__` since there are a few variations.) Test Plan: New tests added. Ran tests with: % make -j16 check-clang-tools Reviewers: alexfh, bkramer Reviewed By: alexfh Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D46293 llvm-svn: 331268 |
||
---|---|---|
.. | ||
AvoidCStyleCastsCheck.cpp | ||
AvoidCStyleCastsCheck.h | ||
AvoidThrowingObjCExceptionCheck.cpp | ||
AvoidThrowingObjCExceptionCheck.h | ||
CMakeLists.txt | ||
DefaultArgumentsCheck.cpp | ||
DefaultArgumentsCheck.h | ||
ExplicitConstructorCheck.cpp | ||
ExplicitConstructorCheck.h | ||
ExplicitMakePairCheck.cpp | ||
ExplicitMakePairCheck.h | ||
GlobalNamesInHeadersCheck.cpp | ||
GlobalNamesInHeadersCheck.h | ||
GlobalVariableDeclarationCheck.cpp | ||
GlobalVariableDeclarationCheck.h | ||
GoogleTidyModule.cpp | ||
IntegerTypesCheck.cpp | ||
IntegerTypesCheck.h | ||
NonConstReferences.cpp | ||
NonConstReferences.h | ||
OverloadedUnaryAndCheck.cpp | ||
OverloadedUnaryAndCheck.h | ||
TodoCommentCheck.cpp | ||
TodoCommentCheck.h | ||
UnnamedNamespaceInHeaderCheck.cpp | ||
UnnamedNamespaceInHeaderCheck.h | ||
UsingNamespaceDirectiveCheck.cpp | ||
UsingNamespaceDirectiveCheck.h |