summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/compat.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'compilerplugins/clang/compat.hxx')
-rw-r--r--compilerplugins/clang/compat.hxx20
1 files changed, 20 insertions, 0 deletions
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<llvm::raw_fd_ostream> 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