On 7/22/13 17:21 , "Michael Roth" <mdr...@linux.vnet.ibm.com> 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 <tomoki.sekiy...@hds.com> > >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