[llvm] r207452 - Add (...) around && clause to appeace gcc 4.8's warning

Richard Smith richard at metafoo.co.uk
Mon Apr 28 16:06:14 PDT 2014


On Mon, Apr 28, 2014 at 3:32 PM, Eli Bendersky <eliben at google.com> wrote:
>
> On Mon, Apr 28, 2014 at 3:28 PM, Eric Christopher <echristo at gmail.com>wrote:
>
>> Uh, that'd be the wrong grouping I imagine?
>>
>
> Good catch, will fix. The original was wrong too, so the gcc warning was
> spot on here ;-)
>

Actually, the code is correct either way. Clang has special case handling
to avoid the false positive for this pattern. =)

Eli
>
>
>
>> -eric
>>
>> On Mon, Apr 28, 2014 at 3:19 PM, Eli Bendersky <eliben at google.com> wrote:
>> > Author: eliben
>> > Date: Mon Apr 28 17:19:12 2014
>> > New Revision: 207452
>> >
>> > URL: http://llvm.org/viewvc/llvm-project?rev=207452&view=rev
>> > Log:
>> > Add (...) around && clause to appeace gcc 4.8's warning
>> >
>> > Modified:
>> >     llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
>> >
>> > Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
>> > URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=207452&r1=207451&r2=207452&view=diff
>> >
>> ==============================================================================
>> > --- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
>> > +++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Mon Apr 28
>> 17:19:12 2014
>> > @@ -591,9 +591,9 @@ std::unique_ptr<DIE> DwarfDebug::constru
>> >    DIScope DS(Scope->getScopeNode());
>> >
>> >    assert(Scope->getInlinedAt() ||
>> > -         !DS.isSubprogram() && "Only handle inlined subprograms here,
>> use "
>> > -                               "constructSubprogramScopeDIE for
>> non-inlined "
>> > -                               "subprograms");
>> > +         (!DS.isSubprogram() && "Only handle inlined subprograms here,
>> use "
>> > +                                "constructSubprogramScopeDIE for
>> non-inlined "
>> > +                                "subprograms"));
>> >
>> >    SmallVector<std::unique_ptr<DIE>, 8> Children;
>> >
>> >
>> >
>> > _______________________________________________
>> > llvm-commits mailing list
>> > llvm-commits at cs.uiuc.edu
>> > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140428/8b3c31c7/attachment.html>


More information about the llvm-commits mailing list