[PATCH] D25092: [analyzer] Add "Assuming..." diagnostic pieces for short-circuit logical operators.

Anna Zaks via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 30 09:19:03 PDT 2016

zaks.anna added a comment.

Looks good overall. Very minor nits.

> BugReporterVisitors.cpp:1274
> +  // In the code below, Term is a CFG terminator, and Cond is a branch
> +  // condition expression upon which the decision is made on this terminator.

nit: no comma before "and".

> BugReporterVisitors.cpp:1288
>    switch (Term->getStmtClass()) {
> +  // FIXME: Come up with something for switch statements?
>    default:

It is not clear what the FIXME is for.

> BugReporterVisitors.cpp:1302
> +    const auto *BO = cast<BinaryOperator>(Term);
> +    if (!BO->isLogicalOp())
> +      return nullptr;

Is this expected to ever trigger?


More information about the cfe-commits mailing list