projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
451c4d5
)
Fix potential null deference in CFG printer.
author
Ted Kremenek
<kremenek@apple.com>
Fri, 12 Oct 2012 22:56:31 +0000
(22:56 +0000)
committer
Ted Kremenek
<kremenek@apple.com>
Fri, 12 Oct 2012 22:56:31 +0000
(22:56 +0000)
llvm-svn: 165836
clang/lib/Analysis/CFG.cpp
patch
|
blob
|
history
diff --git
a/clang/lib/Analysis/CFG.cpp
b/clang/lib/Analysis/CFG.cpp
index
4d63345
..
94c005f
100644
(file)
--- a/
clang/lib/Analysis/CFG.cpp
+++ b/
clang/lib/Analysis/CFG.cpp
@@
-3865,8
+3865,8
@@
static void print_block(raw_ostream &OS, const CFG* cfg,
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';