r285543 - Make output of ast-print closer to C++ code
Serge Pavlov via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 9 08:35:01 PST 2016
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 <richard at metafoo.co.uk>:
> Test?
>
> On 30 Oct 2016 10:20 pm, "Serge Pavlov via cfe-commits" <
> cfe-commits at 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 at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161109/a1ee5e7f/attachment.html>
More information about the cfe-commits
mailing list