mirror of
https://github.com/intel/llvm.git
synced 2026-02-07 16:11:27 +08:00
clang-tidy: Only add 'override' before inlined bodies.
llvm-svn: 209505
This commit is contained in:
@@ -96,7 +96,8 @@ void UseOverride::check(const MatchFinder::MatchResult &Result) {
|
||||
}
|
||||
}
|
||||
|
||||
if (InsertLoc.isInvalid() && Method->getBody()) {
|
||||
if (InsertLoc.isInvalid() && Method->doesThisDeclarationHaveABody() &&
|
||||
Method->getBody()) {
|
||||
InsertLoc = Method->getBody()->getLocStart();
|
||||
}
|
||||
|
||||
|
||||
@@ -59,6 +59,9 @@ public:
|
||||
void SimpleCases::i() {}
|
||||
// CHECK: {{^void SimpleCases::i\(\) {}}}
|
||||
|
||||
SimpleCases::~SimpleCases() {}
|
||||
// CHECK: {{^SimpleCases::~SimpleCases\(\) {}}}
|
||||
|
||||
struct InlineDefinitions : public Base {
|
||||
public:
|
||||
virtual ~InlineDefinitions() {}
|
||||
|
||||
Reference in New Issue
Block a user