compilerplugins/clang/compat.hxx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
New commits: commit 26f6ff08291848212a2f844878c1e330c4fa6349 Author: Stephan Bergmann <sberg...@redhat.com> Date: Thu Mar 27 09:51:01 2014 +0100 More compat stuff (currently only used by a not-yet committed plugin, though) Change-Id: I4cff7eb97dbe10a44a911be9db090ea8cd10d8f0 diff --git a/compilerplugins/clang/compat.hxx b/compilerplugins/clang/compat.hxx index f100f25..1f025e7 100644 --- a/compilerplugins/clang/compat.hxx +++ b/compilerplugins/clang/compat.hxx @@ -24,6 +24,14 @@ #include "llvm/Support/FileSystem.h" #include "llvm/Support/raw_ostream.h" +#if (__clang_major__ == 3 && __clang_minor__ >= 4) || __clang_major__ > 3 +#define LO_COMPILERPLUGINS_CLANG_COMPAT_HAVE_isAtEndOfImmediateMacroExpansion \ + true +#else +#define LO_COMPILERPLUGINS_CLANG_COMPAT_HAVE_isAtEndOfImmediateMacroExpansion \ + false +#endif + // Compatibility wrapper to abstract over (trivial) changes in the Clang API: namespace compat { @@ -43,6 +51,14 @@ inline bool isExternCContext(clang::DeclContext const & ctxt) { #endif } +inline bool isFirstDecl(clang::FunctionDecl const & decl) { +#if (__clang_major__ == 3 && __clang_minor__ >= 4) || __clang_major__ > 3 + return decl.isFirstDecl(); +#else + return decl.isFirstDeclaration(); +#endif +} + inline clang::QualType getReturnType(clang::FunctionDecl const & decl) { #if (__clang_major__ == 3 && __clang_minor__ >= 5) || __clang_major__ > 3 return decl.getReturnType(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits