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);
 }
 


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to