[PATCH] D13446: [PATCH] Add checker discouraging definition of variadic function definitions in C++

Samuel Benzaquen via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 5 13:07:59 PDT 2015


sbenza accepted this revision.
sbenza added a comment.
This revision is now accepted and ready to land.

See comment regarding //CHECKs


================
Comment at: test/clang-tidy/cert-variadic-function-def.cpp:4
@@ +3,3 @@
+// Variadic function definitions are diagnosed.
+// CHECK-MESSAGES: :[[@LINE+1]]:6: warning: do not define a C-style variadic function; consider using a function parameter pack or currying instead [cert-dcl50-cpp]
+void f1(int, ...) {}
----------------
All other tests I've read/written put the //CHECK after the matched lines.
We should be consistent with that.


http://reviews.llvm.org/D13446





More information about the cfe-commits mailing list