diff options
Diffstat (limited to 'compilerplugins')
-rw-r--r-- | compilerplugins/clang/compat.hxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/compilerplugins/clang/compat.hxx b/compilerplugins/clang/compat.hxx index fa89eba0b2a7..f100f255d64a 100644 --- a/compilerplugins/clang/compat.hxx +++ b/compilerplugins/clang/compat.hxx @@ -51,6 +51,14 @@ inline clang::QualType getReturnType(clang::FunctionDecl const & decl) { #endif } +inline clang::QualType getReturnType(clang::FunctionProtoType const & type) { +#if (__clang_major__ == 3 && __clang_minor__ >= 5) || __clang_major__ > 3 + return type.getReturnType(); +#else + return type.getResultType(); +#endif +} + inline unsigned getNumParams(clang::FunctionProtoType const & type) { #if (__clang_major__ == 3 && __clang_minor__ >= 5) || __clang_major__ > 3 return type.getNumParams(); |