[PATCH] D57747: [Sema] SequenceChecker: Fix handling of operator ||, && and ?:

Bruno Ricci via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 5 08:51:08 PST 2019


riccibruno added a comment.

Looking at git blame, this change means that we will warn on `(b && x++) + (!b && x++)`. However we will also warn on an expression like `(x > some_constant && y++) + (x < some_constant && y++)`. This seems to be the job of a static analyser which is able to do some control flow analysis. Moreover for this warning it seems to me that having some false negatives is worse than having some false positive. As a data point I ran this on the entire LLVM codebase and on all of Boost, and did not find any additional warning.


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57747/new/

https://reviews.llvm.org/D57747





More information about the cfe-commits mailing list