diff options
Diffstat (limited to 'compilerplugins/clang/finalclasses.cxx')
-rw-r--r-- | compilerplugins/clang/finalclasses.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compilerplugins/clang/finalclasses.cxx b/compilerplugins/clang/finalclasses.cxx index 4271a0a76f1b..ff7b34925630 100644 --- a/compilerplugins/clang/finalclasses.cxx +++ b/compilerplugins/clang/finalclasses.cxx @@ -22,7 +22,7 @@ or In the case of (a), those members/fields can be made private. In the case of (b), making the class final means the compiler can devirtualise -some method class. +some method calls The process goes something like this: $ make check @@ -86,7 +86,6 @@ bool FinalClasses::VisitCXXRecordDecl(const CXXRecordDecl* decl) { if (ignoreLocation(decl)) return true; - decl = decl->getCanonicalDecl(); if (!decl->hasDefinition()) return true; @@ -114,6 +113,7 @@ bool FinalClasses::VisitCXXRecordDecl(const CXXRecordDecl* decl) if ( i->isVirtual() ) bFoundVirtual = true; } + if (!bFoundProtected) { for (auto it = decl->field_begin(); it != decl->field_end(); ++it) { |