[Libreoffice-commits] core.git: compilerplugins/clang

Stephan Bergmann sbergman at redhat.com
Tue Oct 18 07:12:55 UTC 2016


 compilerplugins/clang/unusedmethods.cxx |   27 ---------------------------
 1 file changed, 27 deletions(-)

New commits:
commit 7eea236a24f3be13c04a6e922a62475e27863b99
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Oct 18 09:12:27 2016 +0200

    -Werror=unused-function
    
    Change-Id: I9e0585460d908024f75a1134bc1cd20d12ea3b4e

diff --git a/compilerplugins/clang/unusedmethods.cxx b/compilerplugins/clang/unusedmethods.cxx
index c265381..d3345d8 100644
--- a/compilerplugins/clang/unusedmethods.cxx
+++ b/compilerplugins/clang/unusedmethods.cxx
@@ -114,7 +114,6 @@ public:
 private:
     void logCallToRootMethods(const FunctionDecl* functionDecl, std::set<MyFuncInfo>& funcSet);
     MyFuncInfo niceName(const FunctionDecl* functionDecl);
-    std::string fullyQualifiedName(const FunctionDecl* functionDecl);
     std::string toString(SourceLocation loc);
     void functionTouchedFromExpr( const FunctionDecl* calleeFunctionDecl, const Expr* expr );
 };
@@ -178,32 +177,6 @@ std::string UnusedMethods::toString(SourceLocation loc)
     return sourceLocation;
 }
 
-std::string UnusedMethods::fullyQualifiedName(const FunctionDecl* functionDecl)
-{
-    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;
-}
-
 // For virtual/overriding methods, we need to pretend we called the root method(s),
 // so that they get marked as used.
 void UnusedMethods::logCallToRootMethods(const FunctionDecl* functionDecl, std::set<MyFuncInfo>& funcSet)


More information about the Libreoffice-commits mailing list