summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/overrideparam.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'compilerplugins/clang/overrideparam.cxx')
-rw-r--r--compilerplugins/clang/overrideparam.cxx15
1 files changed, 7 insertions, 8 deletions
diff --git a/compilerplugins/clang/overrideparam.cxx b/compilerplugins/clang/overrideparam.cxx
index 43ba2f74b9a1..27aecb82615f 100644
--- a/compilerplugins/clang/overrideparam.cxx
+++ b/compilerplugins/clang/overrideparam.cxx
@@ -6,6 +6,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
+#ifndef LO_CLANG_SHARED_PLUGINS
#include <string>
#include <set>
@@ -41,12 +42,8 @@ private:
void OverrideParam::run()
{
- /*
- StringRef fn(handler.getMainFileName());
- if (fn == SRCDIR "/include/svx/checklbx.hxx")
- return;
-*/
- TraverseDecl(compiler.getASTContext().getTranslationUnitDecl());
+ if (preRun())
+ TraverseDecl(compiler.getASTContext().getTranslationUnitDecl());
}
bool OverrideParam::VisitCXXMethodDecl(const CXXMethodDecl * methodDecl) {
@@ -164,8 +161,10 @@ bool OverrideParam::hasSameDefaultParams(const ParmVarDecl * parmVarDecl, const
// that would probably have unwanted side-effects)
}
-loplugin::Plugin::Registration< OverrideParam > X("overrideparam");
+loplugin::Plugin::Registration< OverrideParam > overrideparam("overrideparam");
-}
+} // namespace
+
+#endif // LO_CLANG_SHARED_PLUGINS
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */