Skip to content

Commit

Permalink
[Analysis] Fix use-after-scope in CFGElement dump
Browse files Browse the repository at this point in the history
  • Loading branch information
sam-mccall committed Mar 25, 2023
1 parent d630134 commit cc4e774
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion clang/lib/Analysis/CFG.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5747,7 +5747,8 @@ static void print_elem(raw_ostream &OS, StmtPrinterHelper &Helper,
const CFGElement &E);

void CFGElement::dumpToStream(llvm::raw_ostream &OS) const {
StmtPrinterHelper Helper(nullptr, {});
LangOptions LangOpts;
StmtPrinterHelper Helper(nullptr, LangOpts);
print_elem(OS, Helper, *this);
}

Expand Down

0 comments on commit cc4e774

Please sign in to comment.