Szelethus marked an inline comment as done.
Szelethus added inline comments.


================
Comment at: clang/lib/StaticAnalyzer/Core/Environment.cpp:193
+
+    assert((isa<Expr>(BlkExpr.getStmt()) || !IsBlkExprLive) &&
+           "Only Exprs can be live, LivenessAnalysis argues about the liveness 
"
----------------
>>! In D82122#2103638, @NoQ wrote:
> I think you're right, this entire thing only makes sense for expressions. I 
> think `Environment` occasionally carries values of `ReturnStmt`s (by which it 
> means values of their sub-expressions) but even then liveness analysis 
> doesn't need to be aware of that flex.
> 
>> no lit tests crashed on the added asserts
> 
>> the only non-expression statement it queries are `ObjCForCollectionStmt`s
> 
> Wait, how did you figure that out if not through crashing tests?

```lang=c++
if (IsBlkExprLive && !isa<Expr>(BlkExpr.getStmt()) {
  BlkExpr.getStmt()->dump();
  llvm_unreachable("Gotcha!");
}



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D82122



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

Reply via email to