summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/finalclasses.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'compilerplugins/clang/finalclasses.cxx')
-rw-r--r--compilerplugins/clang/finalclasses.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/compilerplugins/clang/finalclasses.cxx b/compilerplugins/clang/finalclasses.cxx
index e7704ca8fc0c..10948790697f 100644
--- a/compilerplugins/clang/finalclasses.cxx
+++ b/compilerplugins/clang/finalclasses.cxx
@@ -93,8 +93,6 @@ bool FinalClasses::VisitCXXRecordDecl(const CXXRecordDecl* decl)
decl = decl->getCanonicalDecl();
if (!decl->hasDefinition())
return true;
- if (decl->hasAttr<FinalAttr>())
- return true;
for (auto it = decl->bases_begin(); it != decl->bases_end(); ++it)
{
@@ -107,6 +105,8 @@ bool FinalClasses::VisitCXXRecordDecl(const CXXRecordDecl* decl)
checkBase(spec.getType());
}
+ if (decl->hasAttr<FinalAttr>())
+ return true;
bool bFoundVirtual = false;
bool bFoundProtected = false;
for (auto it = decl->method_begin(); it != decl->method_end(); ++it) {