llvm-project/clang-tools-extra/clang-tidy/modernize
Alexander Kornienko 09464e63d8 [clang-tidy] fix a couple of modernize-use-override bugs
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
2016-04-04 14:31:36 +00:00
..
CMakeLists.txt clang-tidy: Add check modernize-raw-string-literal 2016-03-27 16:43:44 +00:00
DeprecatedHeadersCheck.cpp [clang-tidy] Another attempt to fix MSVC build 2016-02-25 00:39:11 +00:00
DeprecatedHeadersCheck.h [clang-tidy] introduce modernize-deprecated-headers check 2016-02-24 13:36:34 +00:00
LoopConvertCheck.cpp Fix another case where loop-convert wasn't handling correctly data members. 2015-11-06 09:59:14 +00:00
LoopConvertCheck.h Handle correctly containers that are data members in modernize-loop-convert. 2015-11-03 16:38:31 +00:00
LoopConvertUtils.cpp [clang-tidy] Fix "Name is not a simple identifier" assertion in `modernize-loop-convert` check. 2016-03-14 12:41:24 +00:00
LoopConvertUtils.h Handle correctly containers that are data members in modernize-loop-convert. 2015-11-03 16:38:31 +00:00
MakeUniqueCheck.cpp Improve modernize-make-unique matcher. 2015-11-04 10:27:51 +00:00
MakeUniqueCheck.h Create modernize-make-unique check. 2015-09-29 09:36:41 +00:00
ModernizeTidyModule.cpp clang-tidy: Add check modernize-raw-string-literal 2016-03-27 16:43:44 +00:00
PassByValueCheck.cpp [clang-tidy] Make 'modernize-pass-by-value' fix work on header files. 2016-03-02 09:01:25 +00:00
PassByValueCheck.h
RawStringLiteralCheck.cpp clang-tidy: Add check modernize-raw-string-literal 2016-03-27 16:43:44 +00:00
RawStringLiteralCheck.h clang-tidy: Add check modernize-raw-string-literal 2016-03-27 16:43:44 +00:00
RedundantVoidArgCheck.cpp Fix crashes from delayed template parsing code that assumed getBody() would return non-null. 2016-03-22 13:37:44 +00:00
RedundantVoidArgCheck.h Add modernize-redundant-void-arg check to clang-tidy 2015-10-28 01:36:20 +00:00
ReplaceAutoPtrCheck.cpp Make string constants in the modernize module static. 2015-10-22 09:48:23 +00:00
ReplaceAutoPtrCheck.h [clang-tidy] Updated docs. 2015-09-08 09:44:04 +00:00
ShrinkToFitCheck.cpp Make a bunch of static arrays const. 2015-10-18 05:14:41 +00:00
ShrinkToFitCheck.h [clang-tidy] Move misc-use-override and readability-shrink-to-fit to "modernize/" 2015-08-31 13:17:43 +00:00
UseAutoCheck.cpp Make a bunch of static arrays const. 2015-10-18 05:14:41 +00:00
UseAutoCheck.h [clang-tidy] Migrate UseAuto from clang-modernize to clang-tidy. 2015-08-21 15:08:51 +00:00
UseDefaultCheck.cpp Make modernize-use-default tolerant of delayed template parsing; this code was previously causing failed assertions because dyn_cast was being passed a null pointer due to the delay-parsed body. 2016-01-20 22:14:10 +00:00
UseDefaultCheck.h Add modernize-use-default check to clang-tidy. 2015-10-21 12:58:15 +00:00
UseNullptrCheck.cpp [clang-tidy] Make 'modernize-use-nullptr' check ignores NULL marcos used in other macros. 2016-03-11 11:40:08 +00:00
UseNullptrCheck.h [clang-tidy] Fix use-after-free in UseNullptrCheck. 2015-08-19 23:57:34 +00:00
UseOverrideCheck.cpp [clang-tidy] fix a couple of modernize-use-override bugs 2016-04-04 14:31:36 +00:00
UseOverrideCheck.h [clang-tidy] Move misc-use-override and readability-shrink-to-fit to "modernize/" 2015-08-31 13:17:43 +00:00