summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/modernize/UseOverrideCheck.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [clang-tidy] fix a couple of modernize-use-override bugsAlexander Kornienko2016-04-041-7/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix for __declspec attributes and const=0 without space This patch is to address 2 problems I found with Clang-tidy:modernize-use-override. 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. The override is placed before the attribute which doesn’t work well with declspec as this attribute can be inherited or placed before the method identifier. Orig: class __declspec(dllexport) X : public Y { void p(); }; Problem: class override __declspec(dllexport) class X : public Y { void p(); }; Fixed: class __declspec(dllexport) class X : public Y { void p() override; }; Patch by Robert Bolter! Differential Revision: http://reviews.llvm.org/D18396 llvm-svn: 265298
* Refactors AST matching code to use the new AST matcher names. This patch ↵Aaron Ballman2015-09-171-1/+1
| | | | | | correlates to r247885 which performs the AST matcher rename in Clang. llvm-svn: 247886
* [clang-tidy] Move misc-use-override and readability-shrink-to-fit to ↵Alexander Kornienko2015-08-311-0/+197
"modernize/" These checks are focusing on migrating the code from C++98/03 to C++11, so they belong to the modernize module. llvm-svn: 246437
OpenPOWER on IntegriCloud