Received: from eggs.gnu.org ([2001:4830:134:3::10]:55527) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1kSz-0002g8-Am for qemu-devel@nongnu.org; Tue, 23 Jul 2013 17:50:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V1kSv-0007uI-0w for qemu-devel@nongnu.org; Tue, 23 Jul 2013 17:49:57 -0400 Received: from usindpps06.hds.com ([207.126.252.19]:53682) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1kSu-0007tb-SY for qemu-devel@nongnu.org; Tue, 23 Jul 2013 17:49:52 -0400 From: Tomoki Sekiyama Date: Tue, 23 Jul 2013 21:49:34 +0000 Message-ID: In-Reply-To: <20130722212117.16294.36600@loki> Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH v7 03/10] checkpatch.pl: Check .cpp files List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Roth , "qemu-devel@nongnu.org" Cc: "libaiqing@huawei.com" , "ghammer@redhat.com" , "stefanha@gmail.com" , "lcapitulino@redhat.com" , "vrozenfe@redhat.com" , "pbonzini@redhat.com" , Seiji Aguchi , "lersek@redhat.com" , "areis@redhat.com" On 7/22/13 17:21 , "Michael Roth" wrote: >Quoting Tomoki Sekiyama (2013-07-15 11:20:37) >> Enable checkpatch.pl to apply the same checks as C source files for >> C++ files with .cpp extensions. It also adds some exceptions for C++ >> sources to suppress errors for: >> - <> used in C++ template arguments (e.g. template ) >> - :: used to represent namespaces (e.g. SomeClass::method()) >> - : used in class declaration (e.g. class T : public Super) >> - ~ used in destructor method name (e.g. T::~T()) >> - spacing around 'catch' (e.g. catch (...)) >>=20 >> Signed-off-by: Tomoki Sekiyama > >One small nit below about documentation. Looks good otherwise. >>@@ -2066,7 +2069,8 @@ sub process { >> # -> >> # : when part of a bitfield >> } elsif ($op eq '->' || $opv eq ':B') { >> - if ($ctx =3D~ /Wx.|.xW/) { >> + if ($ctx =3D~ /Wx.|.xW/ && >> + !($opv eq ':B' && $line >>=3D~ /class/)) { > >Everything else seemed fairly obvious or was well commented, but I >couldn't >figure out what this change was for. Could you insert a small comment to >explain? Sure. This is suppressing errors for : used in class declaration. I will do some cleanups for this. Thanks, Tomoki Sekiyama