================ @@ -14145,6 +14152,46 @@ StmtResult SemaOpenMP::ActOnOpenMPTargetTeamsDistributeSimdDirective( getASTContext(), StartLoc, EndLoc, NestedLoopCount, Clauses, AStmt, B); } +// Overloaded base case function +template <typename T, typename F> static bool tryHandleAs(T *t, F &&) { + return false; +} + +/** + * Tries to recursively cast `t` to one of the given types and invokes `f` if + * successful. + * + * @tparam Class The first type to check. + * @tparam Rest The remaining types to check. + * @tparam T The base type of `t`. + * @tparam F The callable type for the function to invoke upon a successful + * cast. + * @param t The object to be checked. + * @param f The function to invoke if `t` matches `Class`. + * @return `true` if `t` matched any type and `f` was called, otherwise `false`. + */ ---------------- alexey-bataev wrote:
Use `///` style https://github.com/llvm/llvm-project/pull/139293 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits