[cfe-commits] r165836 - /cfe/trunk/lib/Analysis/CFG.cpp
Ted Kremenek
kremenek at apple.com
Fri Oct 12 15:56:31 PDT 2012
Author: kremenek
Date: Fri Oct 12 17:56:31 2012
New Revision: 165836
URL: http://llvm.org/viewvc/llvm-project?rev=165836&view=rev
Log:
Fix potential null deference in CFG printer.
Modified:
cfe/trunk/lib/Analysis/CFG.cpp
Modified: cfe/trunk/lib/Analysis/CFG.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/CFG.cpp?rev=165836&r1=165835&r2=165836&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/CFG.cpp (original)
+++ cfe/trunk/lib/Analysis/CFG.cpp Fri Oct 12 17:56:31 2012
@@ -3865,8 +3865,8 @@
if (Helper) Helper->setBlockID(-1);
- CFGBlockTerminatorPrint TPrinter(OS, Helper,
- PrintingPolicy(Helper->getLangOpts()));
+ PrintingPolicy PP(Helper ? Helper->getLangOpts() : LangOptions());
+ CFGBlockTerminatorPrint TPrinter(OS, Helper, PP);
TPrinter.Visit(const_cast<Stmt*>(B.getTerminator().getStmt()));
OS << '\n';
More information about the cfe-commits
mailing list