[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.
diff --git a/flang-rt/include/flang-rt/runtime/descriptor.h b/flang-rt/include/flang-rt/runtime/descriptor.h
index 19e1a0b..dcdfe07 100644
--- a/flang-rt/include/flang-rt/runtime/descriptor.h
+++ b/flang-rt/include/flang-rt/runtime/descriptor.h
@@ -481,5 +481,8 @@
char storage_[byteSize]{};
};
+// Deduction guide to avoid warnings from older versions of clang.
+StaticDescriptor() -> StaticDescriptor<maxRank, false, 0>;
+
} // namespace Fortran::runtime
#endif // FLANG_RT_RUNTIME_DESCRIPTOR_H_