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

Alexander Riccio via cfe-dev cfe-dev at lists.llvm.org
Wed May 4 09:33:16 PDT 2016


That syntax is valid??!? I think I remember reading something about that...


...god I hate this language

sent from my (stupid) windows phone

-----Original Message-----
From: "Anders Rönnholm via cfe-dev" <cfe-dev at lists.llvm.org>
Sent: ‎5/‎4/‎2016 3:11 AM
To: "cfe-dev at lists.llvm.org" <cfe-dev at lists.llvm.org>
Cc: "Daniel Marjamäki" <Daniel.Marjamaki at evidente.se>
Subject: [cfe-dev] [RFC][clang-tidy] Misplaced array index

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/7886864d/attachment.html>


More information about the cfe-dev mailing list