summaryrefslogtreecommitdiff
path: root/compilerplugins
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-06-23 15:03:04 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-06-23 15:03:04 +0200
commitb498cf62624b842b81a26872a14fa62f8fe3a12e (patch)
treeda833f23a63610165808af51b47ead9c90c3aa7c /compilerplugins
parent20f58e790441bf62bd9e3ed575a1d97f7144e85c (diff)
-Werror=unused-function
Change-Id: Ib579e8896a751383d31c1dbf7e6ebf5c0774a976
Diffstat (limited to 'compilerplugins')
-rw-r--r--compilerplugins/clang/singlevalfields.cxx27
1 files changed, 0 insertions, 27 deletions
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<CXXMethodDecl>(functionDecl)) {
- const CXXRecordDecl* recordDecl = dyn_cast<CXXMethodDecl>(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<CXXMethodDecl>(functionDecl) && dyn_cast<CXXMethodDecl>(functionDecl)->isConst()) {
- ret += " const";
- }
-
- return ret;
-}
-
bool SingleValFields::VisitFieldDecl( const FieldDecl* fieldDecl )
{
fieldDecl = fieldDecl->getCanonicalDecl();