From b498cf62624b842b81a26872a14fa62f8fe3a12e Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Thu, 23 Jun 2016 15:03:04 +0200 Subject: -Werror=unused-function Change-Id: Ib579e8896a751383d31c1dbf7e6ebf5c0774a976 --- compilerplugins/clang/singlevalfields.cxx | 27 --------------------------- 1 file changed, 27 deletions(-) (limited to 'compilerplugins') diff --git a/compilerplugins/clang/singlevalfields.cxx b/compilerplugins/clang/singlevalfields.cxx index 368b767fc65c..1a511abc333a 100644 --- a/compilerplugins/clang/singlevalfields.cxx +++ b/compilerplugins/clang/singlevalfields.cxx @@ -96,7 +96,6 @@ public: bool VisitCXXConstructorDecl( const CXXConstructorDecl* ); private: void niceName(const FieldDecl*, MyFieldInfo&); - std::string fullyQualifiedName(const FunctionDecl*); std::string getExprValue(const Expr*); bool isInterestingType(const QualType&); const FunctionDecl* get_top_FunctionDecl_from_Stmt(const Stmt&); @@ -112,32 +111,6 @@ void SingleValFields::niceName(const FieldDecl* fieldDecl, MyFieldInfo& aInfo) aInfo.sourceLocation = std::string(name.substr(strlen(SRCDIR)+1)) + ":" + std::to_string(compiler.getSourceManager().getSpellingLineNumber(expansionLoc)); } -std::string SingleValFields::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 : functionDecl->params()) { - if (bFirst) - bFirst = false; - else - ret += ","; - ret += pParmVarDecl->getType().getCanonicalType().getAsString(); - } - ret += ")"; - if (isa(functionDecl) && dyn_cast(functionDecl)->isConst()) { - ret += " const"; - } - - return ret; -} - bool SingleValFields::VisitFieldDecl( const FieldDecl* fieldDecl ) { fieldDecl = fieldDecl->getCanonicalDecl(); -- cgit