forked from OSchip/llvm-project
27da23464f
Summary: This check flags all calls to c-style vararg functions and all use of va_list, va_start and va_arg. Passing to varargs assumes the correct type will be read. This is fragile because it cannot generally be enforced to be safe in the language and so relies on programmer discipline to get it right. This rule is part of the "Type safety" profile of the C++ Core Guidelines, see https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#-type8-avoid-reading-from-varargs-or-passing-vararg-arguments-prefer-variadic-template-parameters-instead This commits also reverts "[clang-tidy] add cert's VariadicFunctionDefCheck as cppcoreguidelines-pro-type-vararg-def" because that check makes the SFINAE use of vararg functions impossible. Reviewers: alexfh, sbenza, bkramer, aaron.ballman Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D13787 llvm-svn: 250939 |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
CppCoreGuidelinesTidyModule.cpp | ||
Makefile | ||
ProBoundsPointerArithmeticCheck.cpp | ||
ProBoundsPointerArithmeticCheck.h | ||
ProTypeConstCastCheck.cpp | ||
ProTypeConstCastCheck.h | ||
ProTypeReinterpretCastCheck.cpp | ||
ProTypeReinterpretCastCheck.h | ||
ProTypeStaticCastDowncastCheck.cpp | ||
ProTypeStaticCastDowncastCheck.h | ||
ProTypeUnionAccessCheck.cpp | ||
ProTypeUnionAccessCheck.h | ||
ProTypeVarargCheck.cpp | ||
ProTypeVarargCheck.h |