[Libreoffice-commits] core.git: compilerplugins/clang
Stephan Bergmann
sbergman at redhat.com
Thu Jun 23 13:03:32 UTC 2016
compilerplugins/clang/singlevalfields.cxx | 27 ---------------------------
1 file changed, 27 deletions(-)
New commits:
commit b498cf62624b842b81a26872a14fa62f8fe3a12e
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Jun 23 15:03:04 2016 +0200
-Werror=unused-function
Change-Id: Ib579e8896a751383d31c1dbf7e6ebf5c0774a976
diff --git a/compilerplugins/clang/singlevalfields.cxx b/compilerplugins/clang/singlevalfields.cxx
index 368b767..1a511ab 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();
More information about the Libreoffice-commits
mailing list