[cfe-commits] Fix clang warning "adding bool to string".

Sean Silva silvas at purdue.edu
Sun Mar 4 08:32:41 PST 2012


Fixes the following warning from Clang:

/home/sean/pg/others/llvm/source/tools/clang/lib/Rewrite/RewriteMacros.cpp:170:40:
warning: adding 'bool' to a string does not append to the string
[-Wstring-plus-int]
      RB.InsertTextAfter(RawOffs, " /*"+HasSpace);
                                  ~~~~~^~~~~~~~~
/home/sean/pg/others/llvm/source/tools/clang/lib/Rewrite/RewriteMacros.cpp:170:40:
note: use array indexing to silence this warning
      RB.InsertTextAfter(RawOffs, " /*"+HasSpace);
                                       ^
                                  &    [        ]
1 warning generated.

--Sean Silva
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120304/6f487309/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: unwarn.patch
Type: text/x-patch
Size: 608 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120304/6f487309/attachment.bin>


More information about the cfe-commits mailing list