Store SourceManager pointer on PrintingPolicy in the case where we're dumping,
and remove ASTContext reference (which was frequently bound to a dereferenced null pointer) from the recursive lump of printPretty functions. In so doing, fix (at least) one case where we intended to use the 'dump' mode, but that failed because a null ASTContext reference had been passed in. llvm-svn: 162011
This commit is contained in:
@@ -214,7 +214,7 @@ void CallEvent::dump() const {
|
||||
void CallEvent::dump(raw_ostream &Out) const {
|
||||
ASTContext &Ctx = getState()->getStateManager().getContext();
|
||||
if (const Expr *E = getOriginExpr()) {
|
||||
E->printPretty(Out, Ctx, 0, Ctx.getPrintingPolicy());
|
||||
E->printPretty(Out, 0, Ctx.getPrintingPolicy());
|
||||
Out << "\n";
|
||||
return;
|
||||
}
|
||||
@@ -860,4 +860,3 @@ CallEventManager::getCaller(const StackFrameContext *CalleeCtx,
|
||||
return getCXXDestructorCall(Dtor, Trigger, ThisVal.getAsRegion(),
|
||||
State, CallerCtx);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user