summaryrefslogtreecommitdiff
path: root/compilerplugins
diff options
context:
space:
mode:
Diffstat (limited to 'compilerplugins')
-rw-r--r--compilerplugins/clang/finalclasses.cxx4
-rwxr-xr-xcompilerplugins/clang/finalclasses.py2
2 files changed, 3 insertions, 3 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) {
diff --git a/compilerplugins/clang/finalclasses.py b/compilerplugins/clang/finalclasses.py
index dfaa402f9513..05a1d0c43c8c 100755
--- a/compilerplugins/clang/finalclasses.py
+++ b/compilerplugins/clang/finalclasses.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import re
import sys