diff --git a/clang/lib/Frontend/ASTConsumers.cpp b/clang/lib/Frontend/ASTConsumers.cpp --- a/clang/lib/Frontend/ASTConsumers.cpp +++ b/clang/lib/Frontend/ASTConsumers.cpp @@ -92,7 +92,7 @@ } else Out << "Not a DeclContext\n"; } else if (OutputKind == Print) { - PrintingPolicy Policy(D->getASTContext().getLangOpts()); + const PrintingPolicy &Policy = D->getASTContext().getPrintingPolicy(); D->print(Out, Policy, /*Indentation=*/0, /*PrintInstantiation=*/true); } else if (OutputKind != None) { D->dump(Out, OutputKind == DumpFull, OutputFormat);