Test? On 30 Oct 2016 10:20 pm, "Serge Pavlov via cfe-commits" < cfe-commits@lists.llvm.org> wrote:
> Author: sepavloff > Date: Mon Oct 31 00:11:12 2016 > New Revision: 285543 > > URL: http://llvm.org/viewvc/llvm-project?rev=285543&view=rev > Log: > Make output of ast-print closer to C++ code > > Put semicolon after non-defining method declaration and a class > specialization body. > > Modified: > cfe/trunk/lib/AST/DeclPrinter.cpp > > Modified: cfe/trunk/lib/AST/DeclPrinter.cpp > URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ > DeclPrinter.cpp?rev=285543&r1=285542&r2=285543&view=diff > ============================================================ > ================== > --- cfe/trunk/lib/AST/DeclPrinter.cpp (original) > +++ cfe/trunk/lib/AST/DeclPrinter.cpp Mon Oct 31 00:11:12 2016 > @@ -337,10 +337,9 @@ void DeclPrinter::VisitDeclContext(DeclC > const char *Terminator = nullptr; > if (isa<OMPThreadPrivateDecl>(*D) || isa<OMPDeclareReductionDecl>(* > D)) > Terminator = nullptr; > - else if (isa<FunctionDecl>(*D) && > - cast<FunctionDecl>(*D)->isThisDeclarationADefinition()) > + else if (isa<FunctionDecl>(*D) && cast<FunctionDecl>(*D)->hasBody()) > Terminator = nullptr; > - else if (isa<ObjCMethodDecl>(*D) && cast<ObjCMethodDecl>(*D)-> > getBody()) > + else if (isa<ObjCMethodDecl>(*D) && cast<ObjCMethodDecl>(*D)-> > hasBody()) > Terminator = nullptr; > else if (isa<NamespaceDecl>(*D) || isa<LinkageSpecDecl>(*D) || > isa<ObjCImplementationDecl>(*D) || > @@ -984,7 +983,7 @@ void DeclPrinter::VisitClassTemplateDecl > for (auto *I : D->specializations()) { > PrintTemplateParameters(Params, &I->getTemplateArgs()); > Visit(I); > - Out << '\n'; > + Out << ";\n"; > } > } > > > > _______________________________________________ > cfe-commits mailing list > cfe-commits@lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits >
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits