[llvm] r220360 - Silence gcc's -Wcomment

Filipe Cabecinhas me at filcab.net
Wed Oct 22 00:23:25 PDT 2014


Do you mean checking if we're using gcc and adding -Wno-comment if so?

I'm okay with that option too. I'd like it if llvm/clang's build didn't
have any warnings by default on supported platforms (if possible). I
figured since it's a test, the C-style comments wouldn't be a big problem,
but it seems I was wrong ;-)

Chandler: is that solution acceptable, or would you prefer it if I left it
as it was before and just worked around on our Linux boxes?

Thanks,

  Filipe

P.S: I should only be able to revert it or change it tomorrow morning. If
that's not ok, please revert it.

On Wednesday, October 22, 2014, dblaikie <dblaikie at gmail.com> wrote:

>
>
> On Tue, Oct 21, 2014 at 7:16 PM, Filipe Cabecinhas <me at filcab.net
> <javascript:_e(%7B%7D,'cvml','me at filcab.net');>> wrote:
>
>> Author: filcab
>> Date: Tue Oct 21 21:16:06 2014
>> New Revision: 220360
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=220360&view=rev
>> Log:
>> Silence gcc's -Wcomment
>>
>> gcc's (4.7, I think) -Wcomment warning is not "as smart" as clang's and
>> warns even if the line right after the backslash-newline sequence only has
>> a line comment that starts at the beginning of the line.
>>
>
> Could we just disable GCC's warning in the LLVM build system?
>
>
>>
>> Modified:
>>     llvm/trunk/unittests/Analysis/LazyCallGraphTest.cpp
>>
>> Modified: llvm/trunk/unittests/Analysis/LazyCallGraphTest.cpp
>> URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Analysis/LazyCallGraphTest.cpp?rev=220360&r1=220359&r2=220360&view=diff
>>
>> ==============================================================================
>> --- llvm/trunk/unittests/Analysis/LazyCallGraphTest.cpp (original)
>> +++ llvm/trunk/unittests/Analysis/LazyCallGraphTest.cpp Tue Oct 21
>> 21:16:06 2014
>> @@ -37,21 +37,23 @@ std::unique_ptr<Module> parseAssembly(co
>>    return M;
>>  }
>>
>> -// IR forming a call graph with a diamond of triangle-shaped SCCs:
>> -//
>> -//         d1
>> -//        /  \
>> -//       d3--d2
>> -//      /     \
>> -//     b1     c1
>> -//   /  \    /  \
>> -//  b3--b2  c3--c2
>> -//       \  /
>> -//        a1
>> -//       /  \
>> -//      a3--a2
>> -//
>> -// All call edges go up between SCCs, and clockwise around the SCC.
>> +/*
>> +   IR forming a call graph with a diamond of triangle-shaped SCCs:
>> +
>> +           d1
>> +          /  \
>> +         d3--d2
>> +        /     \
>> +       b1     c1
>> +     /  \    /  \
>> +    b3--b2  c3--c2
>> +         \  /
>> +          a1
>> +         /  \
>> +        a3--a2
>> +
>> +   All call edges go up between SCCs, and clockwise around the SCC.
>> + */
>>  static const char DiamondOfTriangles[] =
>>       "define void @a1() {\n"
>>       "entry:\n"
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> <javascript:_e(%7B%7D,'cvml','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/20141022/db11338f/attachment.html>


More information about the llvm-commits mailing list