diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2019-11-16 15:39:12 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2019-11-16 16:48:33 +0100 |
commit | ab8fc2603c647754d7954b77c1347123402c8b7b (patch) | |
tree | 929e19528972c858728c24d62cf95f0a2a39c1cc /compilerplugins/clang/readability-redundant-pp.cxx | |
parent | d0ee281680711117099ac892acf84996af4af9e6 (diff) |
Fix loplugin::Entry ODR violation
(caused crashes with CLANGDEBUG=1 in compilerplugins/Makefile-clang.mk)
Change-Id: I43ba276f03c87c97b624a59f2b368422fd5b0a7b
Reviewed-on: https://gerrit.libreoffice.org/82982
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'compilerplugins/clang/readability-redundant-pp.cxx')
-rw-r--r-- | compilerplugins/clang/readability-redundant-pp.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/compilerplugins/clang/readability-redundant-pp.cxx b/compilerplugins/clang/readability-redundant-pp.cxx index 2411dfb75f62..e1c284b99c63 100644 --- a/compilerplugins/clang/readability-redundant-pp.cxx +++ b/compilerplugins/clang/readability-redundant-pp.cxx @@ -22,7 +22,7 @@ /// Finds preprocessor usage which is redundant (only #ifndef for now). -namespace loplugin +namespace { struct Entry { @@ -30,10 +30,10 @@ struct Entry std::string m_aMacroName; }; -class RedundantPreprocessor : public clang::PPCallbacks, public Plugin +class RedundantPreprocessor : public clang::PPCallbacks, public loplugin::Plugin { public: - explicit RedundantPreprocessor(const InstantiationData& data); + explicit RedundantPreprocessor(const loplugin::InstantiationData& data); virtual void run() override; void Ifndef(clang::SourceLocation aLoc, const clang::Token& rMacroNameTok, const clang::MacroDefinition& rMacroDefinition) override; @@ -51,7 +51,7 @@ private: std::vector<Entry> m_aNotDefStack; }; -RedundantPreprocessor::RedundantPreprocessor(const InstantiationData& data) +RedundantPreprocessor::RedundantPreprocessor(const loplugin::InstantiationData& data) : Plugin(data) , m_rPP(compiler.getPreprocessor()) { @@ -127,7 +127,7 @@ void RedundantPreprocessor::Endif(clang::SourceLocation /*aLoc*/, clang::SourceL } } -static Plugin::Registration<RedundantPreprocessor> X("redundantpreprocessor"); +loplugin::Plugin::Registration<RedundantPreprocessor> X("redundantpreprocessor"); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |