[clang] [Clang][analyzer] replace Stmt* with ConstCFGElementRef in SymbolConjured (PR #128251)
Fangyi Zhou via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 24 12:43:46 PST 2025
================
@@ -171,19 +172,11 @@ class SValBuilder {
// Forwarding methods to SymbolManager.
- const SymbolConjured* conjureSymbol(const Stmt *stmt,
- const LocationContext *LCtx,
- QualType type,
- unsigned visitCount,
- const void *symbolTag = nullptr) {
- return SymMgr.conjureSymbol(stmt, LCtx, type, visitCount, symbolTag);
- }
-
- const SymbolConjured* conjureSymbol(const Expr *expr,
- const LocationContext *LCtx,
- unsigned visitCount,
- const void *symbolTag = nullptr) {
- return SymMgr.conjureSymbol(expr, LCtx, visitCount, symbolTag);
+ const SymbolConjured *
+ conjureSymbol(const CFGBlock::ConstCFGElementRef ElemRef,
----------------
fangyi-zhou wrote:
We can try to downcast the `ElemRef` for a statement, and try to downcast as an expression to obtain the type in those cases. I guess it would work in the callsites in the deleted overload if the `ElemRef` are statements.
https://github.com/llvm/llvm-project/pull/128251
More information about the cfe-commits
mailing list