summaryrefslogtreecommitdiff
path: root/compilerplugins
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-11-24 14:49:52 +0100
committerStephan Bergmann <sbergman@redhat.com>2016-11-24 14:49:52 +0100
commit6eaa7a41d8ca4dd38d285799fd1920c3115f89c7 (patch)
treea097462b0053fc08869393e4a1fb5a3f69d15e88 /compilerplugins
parent1722665c5ebd96791a95819c9b2592a8523321bd (diff)
Blind fix for Clang 3.6
Change-Id: I56dc86df0d355cfa8af38661892ea2bb580c394b
Diffstat (limited to 'compilerplugins')
-rw-r--r--compilerplugins/clang/oslendian.cxx16
1 files changed, 10 insertions, 6 deletions
diff --git a/compilerplugins/clang/oslendian.cxx b/compilerplugins/clang/oslendian.cxx
index 99b2851614be..2bac8489a8eb 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);