[Libreoffice-commits] core.git: compilerplugins/clang
Stephan Bergmann
sbergman at redhat.com
Mon Apr 25 15:28:25 UTC 2016
compilerplugins/clang/reservedid.cxx | 2 ++
1 file changed, 2 insertions(+)
New commits:
commit 3d081a3f4d9b2d234c020a3468389816fadb061b
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Mon Apr 25 17:27:13 2016 +0200
Just don't bother with Clang <= 3.6
...where Preprocessor::macros and Preprocessor::getLocalMacroDirectiveHistory
would need to be done slightly differently
Change-Id: Id46b05ac42012597c91a556b17ed008b6c7c5912
diff --git a/compilerplugins/clang/reservedid.cxx b/compilerplugins/clang/reservedid.cxx
index 52d0c70..1517a94 100644
--- a/compilerplugins/clang/reservedid.cxx
+++ b/compilerplugins/clang/reservedid.cxx
@@ -59,6 +59,7 @@ void ReservedId::run() {
if (TraverseDecl(compiler.getASTContext().getTranslationUnitDecl())
&& compiler.hasPreprocessor())
{
+#if CLANG_VERSION >= 30700
auto & prep = compiler.getPreprocessor();
for (auto const & m: prep.macros(false)) {
auto id = m.first->getName();
@@ -91,6 +92,7 @@ void ReservedId::run() {
}
}
}
+#endif
}
}
More information about the Libreoffice-commits
mailing list