[cfe-dev] [analyzer] Calling SymbolReaper::markInUse on BinarySymExprs are ignored

Balázs Benics via cfe-dev cfe-dev at lists.llvm.org
Wed Aug 5 03:29:16 PDT 2020


Why does the SymbolReaper::markInUse only work on SymbolMetadata symbols?

void SymbolReaper::markInUse(SymbolRef sym) {
  if (isa<SymbolMetadata>(sym))
    MetadataInUse.insert(sym);
}

I think it is flawed if the Symbol is a SymIntExpr holding an expression
tree referring to SymbolMetadata symbols. In such case, those symbols would
not be kept alive - causing some confusion on the checker developers' side
and potentially losing some information about the analysis.

Should we walk the expression tree instead of the current implementation?
What performance impact should we expect by doing so?

Any ideas?

Balazs.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20200805/e6f53a75/attachment.html>


More information about the cfe-dev mailing list