[llvm-commits] Remove warning "adding bool to string".
Bill Wendling
wendling at apple.com
Mon Mar 5 11:04:00 PST 2012
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