diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-06-29 11:31:13 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-06-29 11:31:13 +0200 |
commit | 5d88bf766c8951b15010c8080c3cb56d52321fb2 (patch) | |
tree | aba541d3b06bee03ad2cfc18941aebc1c3342183 /compilerplugins/clang/passstuffbyref.cxx | |
parent | Move accessibility relations to .ui files, Part 12: tdf#87026 (diff) | |
download | core-5d88bf766c8951b15010c8080c3cb56d52321fb2.tar.gz core-5d88bf766c8951b15010c8080c3cb56d52321fb2.zip |
Further clean-up
Change-Id: Ice5fcb8f598b079afde3346f569d9619f1383506
Diffstat (limited to 'compilerplugins/clang/passstuffbyref.cxx')
-rw-r--r-- | compilerplugins/clang/passstuffbyref.cxx | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/compilerplugins/clang/passstuffbyref.cxx b/compilerplugins/clang/passstuffbyref.cxx index 168550bcdcbb..1d9339a31c48 100644 --- a/compilerplugins/clang/passstuffbyref.cxx +++ b/compilerplugins/clang/passstuffbyref.cxx @@ -73,10 +73,6 @@ private: std::vector<FDecl> functionDecls_; }; -bool startswith(const std::string& rStr, const char* pSubStr) { - return rStr.compare(0, strlen(pSubStr), pSubStr) == 0; -} - bool PassStuffByRef::TraverseFunctionDecl(FunctionDecl * decl) { return traverseAnyFunctionDecl( decl, &RecursiveASTVisitor::TraverseFunctionDecl); @@ -207,8 +203,10 @@ void PassStuffByRef::checkParams(const FunctionDecl * functionDecl) { return; } // these functions are passed as parameters to another function - std::string aFunctionName = functionDecl->getQualifiedNameAsString(); - if (startswith(aFunctionName, "slideshow::internal::ShapeAttributeLayer")) { + if (loplugin::DeclCheck(functionDecl).MemberFunction() + .Class("ShapeAttributeLayer").Namespace("internal") + .Namespace("slideshow").GlobalNamespace()) + { return; } assert(!functionDecls_.empty()); |