[clang] [Clang] [analyzer] replace Stmt* with ConstCFGElementRef in SymbolConjured (PR #128251)

via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 21 17:15:26 PST 2025


================
@@ -102,7 +104,12 @@ class SymbolConjured : public SymbolData {
 
 public:
   /// It might return null.
-  const Stmt *getStmt() const { return S; }
+  const Stmt *getStmt() const {
+    if (auto Stmt = ElemRef->getAs<CFGStmt>()) {
+      return Stmt->getStmt();
+    }
+    return nullptr;
+  }
----------------
isuckatcs wrote:

I think we no longer want to return a `Stmt`, but the `CFGElementRef` instead. I don't know what that API change will break though.

https://github.com/llvm/llvm-project/pull/128251


More information about the cfe-commits mailing list