[PATCH] [StaticAnalyzer] New checker StringPlusChar

Anders Rönnholm Anders.Ronnholm at evidente.se
Thu Sep 19 07:46:04 PDT 2013


Hi,

This is a new check i want to get reviewed. It checks for char literal additions on strings.

Example:
char* str;
str = str + 'c';

This is a suspicious pointer arithmetic, probably string addition was intended.

Thanks,
Anders

.......................................................................................................................
Anders Rönnholm Senior Engineer
Evidente ES East AB  Warfvinges väg 34  SE-112 51 Stockholm  Sweden

Mobile:                    +46 (0)70 912 42 54
E-mail:                    Anders.Ronnholm at evidente.se

www.evidente.se
-------------- next part --------------
A non-text attachment was scrubbed...
Name: stringpluschar.diff
Type: text/x-patch
Size: 5799 bytes
Desc: stringpluschar.diff
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130919/d9eb3f2d/attachment.bin>


More information about the cfe-commits mailing list