[Libreoffice-commits] core.git: compilerplugins/clang
Stephan Bergmann
sbergman at redhat.com
Thu Nov 24 13:50:24 UTC 2016
compilerplugins/clang/oslendian.cxx | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
New commits:
commit 6eaa7a41d8ca4dd38d285799fd1920c3115f89c7
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Nov 24 14:49:52 2016 +0100
Blind fix for Clang 3.6
Change-Id: I56dc86df0d355cfa8af38661892ea2bb580c394b
diff --git a/compilerplugins/clang/oslendian.cxx b/compilerplugins/clang/oslendian.cxx
index 99b2851..2bac848 100644
--- a/compilerplugins/clang/oslendian.cxx
+++ b/compilerplugins/clang/oslendian.cxx
@@ -14,6 +14,12 @@
namespace {
+#if CLANG_VERSION < 30700
+using MacroDefinitionParam = MacroDirective const *;
+#else
+using MacroDefinitionParam = MacroDefinition const &;
+#endif
+
class OslEndian: public loplugin::Plugin, public PPCallbacks {
public:
explicit OslEndian(InstantiationData const & data): Plugin(data) {
@@ -58,7 +64,7 @@ private:
}
}
- void MacroUndefined(Token const & MacroNameTok, MacroDefinition const &)
+ void MacroUndefined(Token const & MacroNameTok, MacroDefinitionParam)
override
{
auto id = MacroNameTok.getIdentifierInfo()->getName();
@@ -70,22 +76,20 @@ private:
}
}
- void Defined(
- Token const & MacroNameTok, MacroDefinition const &, SourceRange)
+ void Defined(Token const & MacroNameTok, MacroDefinitionParam, SourceRange)
override
{
check(MacroNameTok);
}
- void Ifdef(
- SourceLocation, Token const & MacroNameTok, MacroDefinition const &)
+ void Ifdef(SourceLocation, Token const & MacroNameTok, MacroDefinitionParam)
override
{
check(MacroNameTok);
}
void Ifndef(
- SourceLocation, Token const & MacroNameTok, MacroDefinition const &)
+ SourceLocation, Token const & MacroNameTok, MacroDefinitionParam)
override
{
check(MacroNameTok);
More information about the Libreoffice-commits
mailing list