From 02b4522358f29dbe13f628647f99b28a0307a56b Mon Sep 17 00:00:00 2001 From: Slava Zakharin Date: Tue, 18 Mar 2025 07:58:35 -0700 Subject: [PATCH] [NFC][flang] Added deduction guide for StaticDescriptor class. (#131690) I keep getting these warnings when building with clang-17: `warning: 'StaticDescriptor' may not intend to support class template argument deduction [-Wctad-maybe-unsupported]` This change should help avoiding them. --- flang-rt/include/flang-rt/runtime/descriptor.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/flang-rt/include/flang-rt/runtime/descriptor.h b/flang-rt/include/flang-rt/runtime/descriptor.h index 19e1a0bf6a1d..dcdfe073a708 100644 --- a/flang-rt/include/flang-rt/runtime/descriptor.h +++ b/flang-rt/include/flang-rt/runtime/descriptor.h @@ -481,5 +481,8 @@ private: char storage_[byteSize]{}; }; +// Deduction guide to avoid warnings from older versions of clang. +StaticDescriptor() -> StaticDescriptor; + } // namespace Fortran::runtime #endif // FLANG_RT_RUNTIME_DESCRIPTOR_H_