summaryrefslogtreecommitdiff
path: root/compilerplugins
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-10-18 09:12:27 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-10-18 09:12:27 +0200
commit7eea236a24f3be13c04a6e922a62475e27863b99 (patch)
tree1a7ca705646c5549c859b5ae5c701b810bcb53b3 /compilerplugins
parentae0dddd473ccaf8101b7df5b369e0506a5b4f30a (diff)
-Werror=unused-function
Change-Id: I9e0585460d908024f75a1134bc1cd20d12ea3b4e
Diffstat (limited to 'compilerplugins')
-rw-r--r--compilerplugins/clang/unusedmethods.cxx27
1 files changed, 0 insertions, 27 deletions
diff --git a/compilerplugins/clang/unusedmethods.cxx b/compilerplugins/clang/unusedmethods.cxx
index c26538122c6a..d3345d8f8b6a 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)