The patch https://reviews.llvm.org/D26452 implements testing for output made with -ast-print, it fixes problems which this commit addressed (file declare_simd_ast_print.cpp) and tests them.
Thanks, --Serge 2016-11-02 23:39 GMT+07:00 Richard Smith <rich...@metafoo.co.uk>: > 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/DeclPr >> inter.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)->getB >> ody()) >> + else if (isa<ObjCMethodDecl>(*D) && cast<ObjCMethodDecl>(*D)->hasB >> ody()) >> 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