[PATCH] D15227: [analyzer] Valist checkers.

Anna Zaks via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 5 16:54:05 PST 2016


zaks.anna added inline comments.

================
Comment at: lib/StaticAnalyzer/Checkers/ValistChecker.cpp:31
@@ +30,3 @@
+struct VAListAcceptingFunc {
+  mutable IdentifierInfo *II;
+  StringRef FuncName;
----------------
It does not support ObjC methods.

I think this is most useful to checker writes, so how about placing it in CheckerContext? (I am fine with CallEven as well if you think it has wider applicability.)

================
Comment at: lib/StaticAnalyzer/Checkers/ValistChecker.cpp:205
@@ +204,3 @@
+  if (!TReg)
+    return nullptr;
+  return TReg;
----------------
How about we commit your implementation as a general utility and point the other review to it? You can make it as a separate commit for clarity.

================
Comment at: test/Analysis/valist-uninitialized.c:135
@@ +134,3 @@
+}
+
+// NOTE: this is invalid, as the man page of va_end requires that "Each invocation of va_start()
----------------
Please, make that clear in the comment, for example, you can say "We should produce a warning here..".


http://reviews.llvm.org/D15227





More information about the cfe-commits mailing list