clang-tidy modernize-use-override

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 21 08:08:52 PDT 2016


You probably want to send this to cfe-commits instead of llvm-commits

On Mon, Mar 21, 2016 at 6:43 AM, Robert Bolter via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> 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 J
>
>
>
>
>
> Thanks,
>
> Rob.
>
>
>
> ------------------------------
>
> Autodesk Limited
> Registered Office: One Discovery Place, Columbus Drive, Farnborough,
> Hampshire GU14 0NZ
> Registered in England and Wales, No. 1839239
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160321/e21c1c6b/attachment.html>


More information about the llvm-commits mailing list