diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-03-14 11:59:07 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-03-14 12:20:41 +0100 |
commit | f6ff4c955a2c7dad8d586c1ae351856f596d7c76 (patch) | |
tree | 5132f13aeeb5e39b6447a5f31d51ef44c67a34f0 /compilerplugins/clang | |
parent | 0085bd2866424473de288c4bc6fce31323be5284 (diff) |
More compat stuff
(currently only used by a not-yet committed plugin, though)
Change-Id: Id62ea41031ad8ba4495ef46877ad7a10bc58fb05
Diffstat (limited to 'compilerplugins/clang')
-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(); |