[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v7 03/10] checkpatch.pl: Check .cpp files
From: |
Tomoki Sekiyama |
Subject: |
Re: [Qemu-devel] [PATCH v7 03/10] checkpatch.pl: Check .cpp files |
Date: |
Tue, 23 Jul 2013 21:49:34 +0000 |
On 7/22/13 17:21 , "Michael Roth" <address@hidden> 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 <class T>)
>> - :: 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 (...))
>>
>> Signed-off-by: Tomoki Sekiyama <address@hidden>
>
>One small nit below about documentation. Looks good otherwise.
<snip>
>>@@ -2066,7 +2069,8 @@ sub process {
>> # ->
>> # : when part of a bitfield
>> } elsif ($op eq '->' || $opv eq ':B') {
>> - if ($ctx =~ /Wx.|.xW/) {
>> + if ($ctx =~ /Wx.|.xW/ &&
>> + !($opv eq ':B' && $line
>>=~ /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
- [Qemu-devel] [PATCH v7 00/10] qemu-ga: fsfreeze on Windows using VSS, Tomoki Sekiyama, 2013/07/15
- [Qemu-devel] [PATCH v7 03/10] checkpatch.pl: Check .cpp files, Tomoki Sekiyama, 2013/07/15
- [Qemu-devel] [PATCH v7 04/10] Add a script to extract VSS SDK headers on POSIX system, Tomoki Sekiyama, 2013/07/15
- [Qemu-devel] [PATCH v7 01/10] configure: Support configuring C++ compiler, Tomoki Sekiyama, 2013/07/15
- [Qemu-devel] [PATCH v7 02/10] Add c++ keywords to QAPI helper script, Tomoki Sekiyama, 2013/07/15
- [Qemu-devel] [PATCH v7 06/10] error: Add error_set_win32 and error_setg_win32, Tomoki Sekiyama, 2013/07/15
- [Qemu-devel] [PATCH v7 08/10] qemu-ga: Call Windows VSS requester in fsfreeze command handler, Tomoki Sekiyama, 2013/07/15