[clang] [Clang] [analyzer] replace Stmt* with ConstCFGElementRef in SymbolConjured (PR #128251)
Fangyi Zhou via cfe-commits
cfe-commits at lists.llvm.org
Sat Feb 22 02:41:39 PST 2025
================
@@ -111,8 +111,13 @@ class SValExplainer : public FullSValVisitor<SValExplainer, std::string> {
}
std::string VisitSymbolConjured(const SymbolConjured *S) {
- return "symbol of type '" + S->getType().getAsString() +
- "' conjured at statement '" + printStmt(S->getStmt()) + "'";
+ std::string Str;
+ llvm::raw_string_ostream OS(Str);
+ OS << "symbol of type '" + S->getType().getAsString() +
+ "' conjured at statement '";
+ S->getCFGElementRef()->dumpToStream(OS);
----------------
fangyi-zhou wrote:
Q: Do we have a way to pretty print a CFGElementRef instead of `dumpToStream`?
https://github.com/llvm/llvm-project/pull/128251
More information about the cfe-commits
mailing list