From 4da8281d5a93bb3d253be348cd6cc444546121b7 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 2 Jul 2014 19:19:17 +0200 Subject: compat for Clang 3.2 Change-Id: I2746abd05edd00dadfe613c17b9874b1035c3be4 --- compilerplugins/clang/compat.hxx | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'compilerplugins/clang/compat.hxx') diff --git a/compilerplugins/clang/compat.hxx b/compilerplugins/clang/compat.hxx index 7389f636d0bf..5533e8f2890e 100644 --- a/compilerplugins/clang/compat.hxx +++ b/compilerplugins/clang/compat.hxx @@ -160,6 +160,26 @@ inline std::unique_ptr create_raw_fd_ostream( #endif } +inline clang::NamedDecl * const * begin( + clang::DeclContextLookupConstResult const & result) +{ +#if (__clang_major__ == 3 && __clang_minor__ >= 3) || __clang_major__ > 3 + return result.begin(); +#else + return result.first; +#endif +} + +inline clang::NamedDecl * const * end( + clang::DeclContextLookupConstResult const & result) +{ +#if (__clang_major__ == 3 && __clang_minor__ >= 3) || __clang_major__ > 3 + return result.end(); +#else + return result.second; +#endif +} + } #endif -- cgit