[PATCH] D71791: [CFG] Fix an assertion failure with static initializers

Csaba Dabis via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 20 17:44:10 PST 2019


Charusso added inline comments.


================
Comment at: clang/lib/Analysis/CFG.cpp:5923
+  if (isa<ObjCForCollectionStmt>(Cond) || isa<DeclStmt>(Cond))
     return nullptr;
 
----------------
What about the following?:
```lang=c
if (const auto *E = dyn_cast<Expr>(StmtElem->getStmt()))
  return E->IgnoreParens();
return nullptr;
```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D71791





More information about the cfe-commits mailing list