diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-02-21 23:59:04 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-02-21 23:59:24 +0100 |
commit | d36e60f6854c3226d4297fc3425ba010ed8f1038 (patch) | |
tree | 53321e9859f286099e37fc4b1c9a9dd23e3d5eaf /compilerplugins/clang/compat.hxx | |
parent | 180f593fbfea238df97d006f6847bba3d9b0e317 (diff) |
Adapt to Clang <= 3.4
Change-Id: If9c9d63d85ce29629e6453f2d69355bd64ac2fc5
Diffstat (limited to 'compilerplugins/clang/compat.hxx')
-rw-r--r-- | compilerplugins/clang/compat.hxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/compilerplugins/clang/compat.hxx b/compilerplugins/clang/compat.hxx index 4c8c333d7003..4bc9a6bfbad5 100644 --- a/compilerplugins/clang/compat.hxx +++ b/compilerplugins/clang/compat.hxx @@ -11,6 +11,7 @@ #define INCLUDED_COMPILERPLUGINS_CLANG_COMPAT_HXX #include "clang/AST/Decl.h" +#include "clang/AST/Expr.h" #include "clang/AST/Type.h" #include "clang/Basic/Diagnostic.h" #include "clang/Basic/DiagnosticIDs.h" @@ -45,6 +46,14 @@ inline clang::QualType getParamType( #endif } +inline unsigned getBuiltinCallee(clang::CallExpr const & expr) { +#if (__clang_major__ == 3 && __clang_minor__ >= 5) || __clang_major__ > 3 + return expr.getBuiltinCallee(); +#else + return expr.isBuiltinCall(); +#endif +} + inline unsigned getCustomDiagID( clang::DiagnosticsEngine & engine, clang::DiagnosticsEngine::Level L, llvm::StringRef FormatString) |