From 7eea236a24f3be13c04a6e922a62475e27863b99 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 18 Oct 2016 09:12:27 +0200 Subject: -Werror=unused-function Change-Id: I9e0585460d908024f75a1134bc1cd20d12ea3b4e --- compilerplugins/clang/unusedmethods.cxx | 27 --------------------------- 1 file changed, 27 deletions(-) (limited to 'compilerplugins/clang/unusedmethods.cxx') 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& 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(functionDecl)) { - const CXXRecordDecl* recordDecl = dyn_cast(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(functionDecl) && dyn_cast(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& funcSet) -- cgit