This is an automated email from the ASF dual-hosted git repository.

tqchen pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm-ffi.git


The following commit(s) were added to refs/heads/main by this push:
     new 22f22e8  fix(lint): Suppress latest clang-tidy warnings (#361)
22f22e8 is described below

commit 22f22e8d15f6b2eb88db19767706a82f4f3c457f
Author: Junru Shao <[email protected]>
AuthorDate: Wed Dec 24 04:46:19 2025 -0800

    fix(lint): Suppress latest clang-tidy warnings (#361)
    
    Introduced by #286, where `CaptureTuple`, i.e.
    `CaptureTupleAux<PackedArgs>::type`, is defined as:
    
    ```
    std::tuple<std::optional<std::decay_t<Args>>...>
    ```
    
    and star access to its `std::optional` is indeed unchecked but intended.
---
 include/tvm/ffi/reflection/overload.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/tvm/ffi/reflection/overload.h 
b/include/tvm/ffi/reflection/overload.h
index 6556338..f9684bc 100644
--- a/include/tvm/ffi/reflection/overload.h
+++ b/include/tvm/ffi/reflection/overload.h
@@ -164,6 +164,7 @@ struct TypedOverload : OverloadBase {
   template <std::size_t... I>
   Ret CallAux(std::index_sequence<I...>, CaptureTuple& tuple) {
     /// NOTE: this works for T, const T, const T&, T&& argument types
+    // NOLINTNEXTLINE(bugprone-unchecked-optional-access)
     return f_(static_cast<std::tuple_element_t<I, 
PackedArgs>>(std::move(*std::get<I>(tuple)))...);
   }
 
@@ -273,6 +274,7 @@ namespace reflection {
 template <typename Class>
 class OverloadObjectDef : private ObjectDef<Class> {
  public:
+  /*! \brief The super class */
   using Super = ObjectDef<Class>;
   /*!
    * \brief Constructor

Reply via email to