[PATCH] D13787: [clang-tidy] add check cppcoreguidelines-pro-type-vararg-use

Samuel Benzaquen via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 16 10:12:12 PDT 2015


sbenza added inline comments.

================
Comment at: clang-tidy/cppcoreguidelines/ProTypeVarargUseCheck.cpp:20
@@ +19,3 @@
+void ProTypeVarargUseCheck::registerMatchers(MatchFinder *Finder) {
+  Finder->addMatcher(callExpr(callee(functionDecl(isVariadic()))).bind("expr"), this);
+}
----------------
The guideline says that we should also issue a diagnostics for uses of va_list/va_start/va_arg.

================
Comment at: test/clang-tidy/cppcoreguidelines-pro-type-vararg-use.cpp:14
@@ +13,3 @@
+
+void check() {
+  f_vararg(1, 7, 9);
----------------
how does this handle SFINAE style ... uses?
The guideline mentions this case as "useful" so we should try to avoid warning on it.


http://reviews.llvm.org/D13787





More information about the cfe-commits mailing list