[cfe-dev] [RFC][clang-tidy] Misplaced array index

Anders Rönnholm via cfe-dev cfe-dev at lists.llvm.org
Wed May 4 00:11:30 PDT 2016


Hi!



I am working on a new clang-tidy checker. It will warn on misplaced array indexes. This syntax is valid but unusual.



Example code:

   char x = 1["abc"];



Fixit "abc"[1].



I have attached a proof of concept patch.



Any comments on this?

//Anders
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20160504/dd947ad6/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: misplaced_array.diff
Type: application/octet-stream
Size: 6860 bytes
Desc: misplaced_array.diff
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20160504/dd947ad6/attachment.obj>


More information about the cfe-dev mailing list