From a48ffb73ec0a851318dc248b0c36f738896afef8 Mon Sep 17 00:00:00 2001 From: Slava Zakharin Date: Mon, 17 Mar 2025 16:09:22 -0700 Subject: [PATCH] [NFC][flang] Added deduction guide for StaticDescriptor class. 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 19e1a0bf6a1dd..dcdfe073a708d 100644 --- a/flang-rt/include/flang-rt/runtime/descriptor.h +++ b/flang-rt/include/flang-rt/runtime/descriptor.h @@ -481,5 +481,8 @@ class alignas(Descriptor) StaticDescriptor { char storage_[byteSize]{}; }; +// Deduction guide to avoid warnings from older versions of clang. +StaticDescriptor() -> StaticDescriptor; + } // namespace Fortran::runtime #endif // FLANG_RT_RUNTIME_DESCRIPTOR_H_