NoQ added a comment.

> I am not sure what would be the best way to test this change here.

A unittest, if you're brave :)



================
Comment at: clang/lib/Analysis/CFG.cpp:5923
+  if (isa<ObjCForCollectionStmt>(Cond) || isa<DeclStmt>(Cond))
     return nullptr;
 
----------------
Charusso wrote:
> What about the following?:
> ```lang=c
> if (const auto *E = dyn_cast<Expr>(StmtElem->getStmt()))
>   return E->IgnoreParens();
> return nullptr;
> ```
Not [[ https://llvm.org/docs/CodingStandards.html#assert-liberally | fail-fast 
]] enough.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D71791



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to