qemu-devel
[Top][All Lists]
Advanced

[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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]