summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/unicodetochar.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-07-15 18:18:57 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-07-15 18:18:57 +0200
commit574db10513be6b25f24c8cab49cbc9e63aca87d3 (patch)
treef56f03a03a935daf09adf5c7a8540b12d37e6a29 /compilerplugins/clang/unicodetochar.cxx
parent48480d4f19d2fb92ca4ae0527eec4753cdc439c0 (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/unicodetochar.cxx')
-rw-r--r--compilerplugins/clang/unicodetochar.cxx16
1 files changed, 4 insertions, 12 deletions
diff --git a/compilerplugins/clang/unicodetochar.cxx b/compilerplugins/clang/unicodetochar.cxx
index 14a59e35f462..e1e381ad2c71 100644
--- a/compilerplugins/clang/unicodetochar.cxx
+++ b/compilerplugins/clang/unicodetochar.cxx
@@ -7,8 +7,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#ifndef LO_CLANG_SHARED_PLUGINS
-
#include <stack>
#include "check.hxx"
@@ -74,24 +72,18 @@ public:
return true;
}
- bool preRun() override {
- return compiler.getLangOpts().CPlusPlus;
- }
-
+private:
void run() override {
- if (preRun()) {
+ if (compiler.getLangOpts().CPlusPlus) {
TraverseDecl(compiler.getASTContext().getTranslationUnitDecl());
}
}
-private:
std::stack<Expr const *> subExprs_;
};
-static loplugin::Plugin::Registration<UnicodeToChar> unicodetochar("unicodetochar");
-
-} // namespace
+static loplugin::Plugin::Registration<UnicodeToChar> reg("unicodetochar");
-#endif // LO_CLANG_SHARED_PLUGINS
+}
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */