[clang] cc4e774 - [Analysis] Fix use-after-scope in CFGElement dump
Sam McCall via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 24 20:33:21 PDT 2023
Author: Sam McCall
Date: 2023-03-25T04:32:57+01:00
New Revision: cc4e774d5b4539d62f1fed97d3844b403ea43229
URL: https://github.com/llvm/llvm-project/commit/cc4e774d5b4539d62f1fed97d3844b403ea43229
DIFF: https://github.com/llvm/llvm-project/commit/cc4e774d5b4539d62f1fed97d3844b403ea43229.diff
LOG: [Analysis] Fix use-after-scope in CFGElement dump
Added:
Modified:
clang/lib/Analysis/CFG.cpp
Removed:
################################################################################
diff --git a/clang/lib/Analysis/CFG.cpp b/clang/lib/Analysis/CFG.cpp
index 7e93247ba83f..4c8ceb792d2a 100644
--- a/clang/lib/Analysis/CFG.cpp
+++ b/clang/lib/Analysis/CFG.cpp
@@ -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);
}
More information about the cfe-commits
mailing list