diff options
| author | Jordan Rose <jordan_rose@apple.com> | 2013-10-25 16:52:00 +0000 |
|---|---|---|
| committer | Jordan Rose <jordan_rose@apple.com> | 2013-10-25 16:52:00 +0000 |
| commit | 02debf605cd904edac8dceb196e5f142ce3d14eb (patch) | |
| tree | 2207ae26281829204f0d21c7baca8b5317f74b52 /lib/CodeGen/CGExpr.cpp | |
| parent | a0cbcabb1beaee6c0cd5d4aa30cd9450ff5331ea (diff) | |
| download | clang-02debf605cd904edac8dceb196e5f142ce3d14eb.tar.gz clang-02debf605cd904edac8dceb196e5f142ce3d14eb.tar.bz2 clang-02debf605cd904edac8dceb196e5f142ce3d14eb.tar.xz | |
Add -Wstring-plus-char, which warns when adding char literals to C strings.
Specifically, this warns when a character literal is added (using '+') to a
variable with type 'char *' (or any other pointer to character type). Like
-Wstring-plus-int, there is a fix-it to change "foo + 'a'" to "&foo['a']"
iff the character literal is on the right side of the string.
Patch by Anders Rönnholm!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193418 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExpr.cpp')
0 files changed, 0 insertions, 0 deletions
