[llvm-commits] Remove warning "adding bool to string".

Bill Wendling wendling at apple.com
Mon Mar 5 11:34:25 PST 2012


Committed. Thanks! :)

-bw

On Mar 5, 2012, at 11:32 AM, Sean Silva <silvas at purdue.edu> wrote:

> I don't have commit access.
> 
> --Sean Silva
> 
> On Mon, Mar 5, 2012 at 2:04 PM, Bill Wendling <wendling at apple.com> wrote:
> Wow! The original code is wicked ugly. Your patch seems fine. If you have commit access, you can commit it.
> 
> -bw
> 
> On Mar 4, 2012, at 8:23 AM, Sean Silva <silvas at purdue.edu> wrote:
> 
> > The attached patch fixes these two warnings from clang:
> >
> > /home/sean/pg/others/llvm/source/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:4506:21: warning: adding 'bool' to a string does not append to the string [-Wstring-plus-int]
> >     return "_setjmp"+!TLI.usesUnderscoreSetJmp();
> >            ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > /home/sean/pg/others/llvm/source/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:4506:21: note: use array indexing to silence this warning
> >     return "_setjmp"+!TLI.usesUnderscoreSetJmp();
> >                     ^
> >            &        [                           ]
> > /home/sean/pg/others/llvm/source/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:4508:22: warning: adding 'bool' to a string does not append to the string [-Wstring-plus-int]
> >     return "_longjmp"+!TLI.usesUnderscoreLongJmp();
> >            ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > /home/sean/pg/others/llvm/source/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:4508:22: note: use array indexing to silence this warning
> >     return "_longjmp"+!TLI.usesUnderscoreLongJmp();
> >                      ^
> >            &         [                            ]
> > 2 warnings generated.
> >
> >
> > --Sean Silva
> > <unwarn.patch>_______________________________________________
> > llvm-commits mailing list
> > llvm-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> 
> 




More information about the llvm-commits mailing list