[flang-commits] [flang] [Flang][#212316] Fix -Wunused-template errors under -Werror (PR #218985)

via flang-commits flang-commits at lists.llvm.org
Mon Sep 7 00:46:07 PDT 2026


================
@@ -15,8 +15,7 @@ namespace Fortran::evaluate {
 
 // DOT_PRODUCT
 template <typename T>
-static Expr<T> FoldDotProduct(
-    FoldingContext &context, FunctionRef<T> &&funcRef) {
+Expr<T> FoldDotProduct(FoldingContext &context, FunctionRef<T> &&funcRef) {
----------------
zhangweize9-cyber wrote:

> Specifically for this case, you could ask AI to generate you examples to try with a C++ compiler. (Or use AI agent that can automatically generate and try such examples.)

Nice suggestion! I did use it incorrectly, I treated the AI as a framework to provide me with initial solutions. However, I usually compile a version with realwithdebuginfo for the subsequent error stacks and then run tests with breakpoints using gdb.

I know, of course, that the probability of the AI's answer being correct is very low, but I have no choice but to use the code provided by the AI to continuously try and fail in order to extract more functions that are affected by this scenario and then organize and analyze them.

https://github.com/llvm/llvm-project/pull/218985


More information about the flang-commits mailing list