}
static void dumpProgramPoint(ProgramPoint Loc,
- const PrintingPolicy &PP,
+ const ASTContext &Context,
llvm::raw_string_ostream &Out) {
switch (Loc.getKind()) {
case ProgramPoint::BlockEntranceKind:
case ProgramPoint::PreImplicitCallKind: {
ImplicitCallPoint PC = Loc.castAs<ImplicitCallPoint>();
Out << "PreCall: ";
-
- // FIXME: Get proper printing options.
- PC.getDecl()->print(Out, LangOptions());
+ PC.getDecl()->print(Out, Context.getLangOpts());
printLocation(Out, PC.getLocation());
break;
}
case ProgramPoint::PostImplicitCallKind: {
ImplicitCallPoint PC = Loc.castAs<ImplicitCallPoint>();
Out << "PostCall: ";
-
- // FIXME: Get proper printing options.
- PC.getDecl()->print(Out, LangOptions());
+ PC.getDecl()->print(Out, Context.getLangOpts());
printLocation(Out, PC.getLocation());
break;
}
else {
QualType Ty = Init->getTypeSourceInfo()->getType();
Ty = Ty.getLocalUnqualifiedType();
- LangOptions LO; // FIXME.
- Ty.print(Out, LO);
+ Ty.print(Out, Context.getLangOpts());
}
break;
}
SourceLocation SLoc = T->getBeginLoc();
Out << "\\|Terminator: ";
- LangOptions LO; // FIXME.
- E.getSrc()->printTerminator(Out, LO);
+ E.getSrc()->printTerminator(Out, Context.getLangOpts());
if (SLoc.isFileID()) {
Out << "\\lline="
if (Label) {
if (const auto *C = dyn_cast<CaseStmt>(Label)) {
Out << "\\lcase ";
- LangOptions LO; // FIXME.
if (C->getLHS())
- C->getLHS()->printPretty(Out, nullptr, PrintingPolicy(LO));
+ C->getLHS()->printPretty(Out, nullptr,
+ Context.getPrintingPolicy());
if (const Stmt *RHS = C->getRHS()) {
Out << " .. ";
- RHS->printPretty(Out, nullptr, PrintingPolicy(LO));
+ RHS->printPretty(Out, nullptr, Context.getPrintingPolicy());
}
Out << ":";
const Stmt *S = Loc.castAs<StmtPoint>().getStmt();
assert(S != nullptr && "Expecting non-null Stmt");
- Out << S->getStmtClassName() << ' ' << (const void *)S << ' ';
- S->printPretty(Out, nullptr, PP);
+ Out << S->getStmtClassName() << ' '
+ << S->getID(Context) << " (" << (const void *)S << ") ";
+ S->printPretty(Out, nullptr, Context.getPrintingPolicy());
printLocation(Out, S->getBeginLoc());
if (Loc.getAs<PreStmt>())
}
ProgramStateRef State = N->getState();
- const auto &PP = State->getStateManager().getContext().getPrintingPolicy();
+ const ASTContext &Context = State->getStateManager().getContext();
// Dump program point for all the previously skipped nodes.
const ExplodedNode *OtherNode = FirstHiddenNode;
while (true) {
- dumpProgramPoint(OtherNode->getLocation(), PP, Out);
+ dumpProgramPoint(OtherNode->getLocation(), Context, Out);
if (const ProgramPointTag *Tag = OtherNode->getLocation().getTag())
Out << "\\lTag:" << Tag->getTagDescription();