compilerplugins/clang/unnecessaryvirtual.cxx |   37 ---------------------------
 1 file changed, 37 deletions(-)

New commits:
commit cbb7b10b6b2748db088ae2f78b54711639a7eb2d
Author: Stephan Bergmann <sberg...@redhat.com>
Date:   Fri Nov 4 09:20:49 2016 +0100

    -Werror=unused-function
    
    Change-Id: I33790862cfe40693921d07182ccf4645c3ef28a3

diff --git a/compilerplugins/clang/unnecessaryvirtual.cxx 
b/compilerplugins/clang/unnecessaryvirtual.cxx
index 82f91c7..ee3d8ec 100644
--- a/compilerplugins/clang/unnecessaryvirtual.cxx
+++ b/compilerplugins/clang/unnecessaryvirtual.cxx
@@ -76,7 +76,6 @@ public:
 
     bool VisitCXXMethodDecl( const CXXMethodDecl* decl );
 private:
-    std::string fullyQualifiedName(const FunctionDecl* functionDecl);
     std::string toString(SourceLocation loc);
 };
 
@@ -97,42 +96,6 @@ std::string niceName(const CXXMethodDecl* functionDecl)
     return s;
 }
 
-std::string UnnecessaryVirtual::fullyQualifiedName(const FunctionDecl* 
functionDecl)
-{
-    if (functionDecl->getInstantiatedFromMemberFunction())
-        functionDecl = functionDecl->getInstantiatedFromMemberFunction();
-    else if (functionDecl->getClassScopeSpecializationPattern())
-        functionDecl = functionDecl->getClassScopeSpecializationPattern();
-// workaround clang-3.5 issue
-#if CLANG_VERSION >= 30600
-    else if (functionDecl->getTemplateInstantiationPattern())
-        functionDecl = functionDecl->getTemplateInstantiationPattern();
-#endif
-
-    std::string ret = 
compat::getReturnType(*functionDecl).getCanonicalType().getAsString();
-    ret += " ";
-    if (isa<CXXMethodDecl>(functionDecl)) {
-        const CXXRecordDecl* recordDecl = 
dyn_cast<CXXMethodDecl>(functionDecl)->getParent();
-        ret += recordDecl->getQualifiedNameAsString();
-        ret += "::";
-    }
-    ret += functionDecl->getNameAsString() + "(";
-    bool bFirst = true;
-    for (const ParmVarDecl *pParmVarDecl : compat::parameters(*functionDecl)) {
-        if (bFirst)
-            bFirst = false;
-        else
-            ret += ",";
-        ret += pParmVarDecl->getType().getCanonicalType().getAsString();
-    }
-    ret += ")";
-    if (isa<CXXMethodDecl>(functionDecl) && 
dyn_cast<CXXMethodDecl>(functionDecl)->isConst()) {
-        ret += " const";
-    }
-
-    return ret;
-}
-
 bool UnnecessaryVirtual::VisitCXXMethodDecl( const CXXMethodDecl* methodDecl )
 {
     if (ignoreLocation(methodDecl)) {
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to