Hi,

First time poster here, Please advise...

Can I contribute these patches for clang-tidy modernize-use-override addressing 
two problems:

1: missing spaces on pure function decls

Orig:
void pure() const=0
Problem:
void pure() constoverride =0
Fixed:
void pure() const override =0

2: This is ms-extension specific, but possibly applies to other attribute types 
as I see incorrect placement of override for Inherited Attributes and atts 
located before the method

Orig:
class __declspec(dllexport) X : public Y
  {
void p(); //inherits decl att
  };
Problem:
class override __declspec(dllexport) class X : public Y
  {
  void p();
  };
Fixed:
class __declspec(dllexport) class X : public Y
  {
  void p() override;
  };

I added test/clang-tidy/modernize-use-override-ms.cpp and modified 
modernize-use-override.cpp to test these fixes.


I've also added a -quiet option to clang-tidy/tool/run-clang-tidy.py  and a 
progress countdown which I personally find useful :)


Thanks,
Rob.


________________________________

Autodesk Limited
Registered Office: One Discovery Place, Columbus Drive, Farnborough, Hampshire 
GU14 0NZ
Registered in England and Wales, No. 1839239

Attachment: 0001-run-clang-tidy-Adding-a-quiet-option-to-suppress-out.patch
Description: 0001-run-clang-tidy-Adding-a-quiet-option-to-suppress-out.patch

Attachment: 0001-modernize-use-override-fix-for-const-0-without-space.patch
Description: 0001-modernize-use-override-fix-for-const-0-without-space.patch

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to