diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-07-15 18:18:57 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-07-15 18:18:57 +0200 |
commit | 574db10513be6b25f24c8cab49cbc9e63aca87d3 (patch) | |
tree | f56f03a03a935daf09adf5c7a8540b12d37e6a29 /compilerplugins/clang/staticmethods.cxx | |
parent | 48480d4f19d2fb92ca4ae0527eec4753cdc439c0 (diff) |
Revert "convert some plugins to use the sharedplugin infrastructure"
This reverts commit fc1b213d157afa57704cec5a0fb65ae8c11d7822.
I didn't convert these correctly, the Traverse calls need
adjusting.
Diffstat (limited to 'compilerplugins/clang/staticmethods.cxx')
-rw-r--r-- | compilerplugins/clang/staticmethods.cxx | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/compilerplugins/clang/staticmethods.cxx b/compilerplugins/clang/staticmethods.cxx index 0d82170a4b3e..bc37189eb64b 100644 --- a/compilerplugins/clang/staticmethods.cxx +++ b/compilerplugins/clang/staticmethods.cxx @@ -7,8 +7,6 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#ifndef LO_CLANG_SHARED_PLUGINS - #include "clang/AST/Attr.h" #include "check.hxx" @@ -30,7 +28,7 @@ public: void run() override { TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); } - bool TraverseCXXMethodDecl(CXXMethodDecl * decl); + bool TraverseCXXMethodDecl(const CXXMethodDecl * decl); bool VisitCXXThisExpr(const CXXThisExpr *) { bVisitedThis = true; return true; } // these two indicate that we hit something that makes our analysis unreliable @@ -69,7 +67,7 @@ bool startsWith(const std::string& rStr, const char* pSubStr) { return rStr.compare(0, strlen(pSubStr), pSubStr) == 0; } -bool StaticMethods::TraverseCXXMethodDecl(CXXMethodDecl * pCXXMethodDecl) { +bool StaticMethods::TraverseCXXMethodDecl(const CXXMethodDecl * pCXXMethodDecl) { if (ignoreLocation(pCXXMethodDecl)) { return true; } @@ -233,10 +231,8 @@ bool StaticMethods::TraverseCXXMethodDecl(CXXMethodDecl * pCXXMethodDecl) { return true; } -loplugin::Plugin::Registration<StaticMethods> staticmethods("staticmethods"); - -} // namespace +loplugin::Plugin::Registration<StaticMethods> X("staticmethods"); -#endif // LO_CLANG_SHARED_PLUGINS +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |