[PATCH] D15636: Reduce false positives in printf/scanf format checker

Richard Trieu via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 3 15:29:59 PST 2016


rtrieu added a comment.

Oops, forget to hit send on my last comment.

My concern is something like:

  printf(condition ? "first message: %d" : "second message: %d", 5, 10);

There's nothing in the code implying that either message is the one that should be using two arguments, so which one will be highlighted?  At that point, we may need to consider rewriting the message to indicate that multiple format strings would be affected.


http://reviews.llvm.org/D15636





More information about the cfe-commits mailing list