[llvm] c47468b - [llubi] Fix CTAD warnings for std::vector initialization (#196221)

via llvm-commits llvm-commits at lists.llvm.org
Wed May 6 20:26:06 PDT 2026


Author: Jinsong Ji
Date: 2026-05-06T23:26:01-04:00
New Revision: c47468b95d2cb232e1177f86d86f9bea8cf665e8

URL: https://github.com/llvm/llvm-project/commit/c47468b95d2cb232e1177f86d86f9bea8cf665e8
DIFF: https://github.com/llvm/llvm-project/commit/c47468b95d2cb232e1177f86d86f9bea8cf665e8.diff

LOG: [llubi] Fix CTAD warnings for std::vector initialization (#196221)

Explicitly specify template argument <AnyValue> for std::vector
initializations to fix -Wctad-maybe-unsupported warnings when
building with -Werror. The implicit deduction was causing build
failures in visitOverflowIntBinOpWithResult method.

Added: 
    

Modified: 
    llvm/tools/llubi/lib/Interpreter.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/tools/llubi/lib/Interpreter.cpp b/llvm/tools/llubi/lib/Interpreter.cpp
index 212e1626c1b91..ad3d2f380506d 100644
--- a/llvm/tools/llubi/lib/Interpreter.cpp
+++ b/llvm/tools/llubi/lib/Interpreter.cpp
@@ -484,9 +484,9 @@ class InstExecutor : public InstVisitor<InstExecutor, void>,
           ScalarFn) {
     if (!LHS.isAggregate()) {
       if (LHS.isPoison() || RHS.isPoison())
-        return std::vector{AnyValue::poison(), AnyValue::poison()};
+        return std::vector<AnyValue>{AnyValue::poison(), AnyValue::poison()};
       auto [Res, Overflow] = ScalarFn(LHS.asInteger(), RHS.asInteger());
-      return std::vector{AnyValue(Res), AnyValue::boolean(Overflow)};
+      return std::vector<AnyValue>{AnyValue(Res), AnyValue::boolean(Overflow)};
     }
 
     auto &LHSVec = LHS.asAggregate();
@@ -506,8 +506,8 @@ class InstExecutor : public InstVisitor<InstExecutor, void>,
       ResVec.push_back(AnyValue(Res));
       OverflowVec.push_back(AnyValue::boolean(Overflow));
     }
-    return std::vector{AnyValue(std::move(ResVec)),
-                       AnyValue(std::move(OverflowVec))};
+    return std::vector<AnyValue>{AnyValue(std::move(ResVec)),
+                                 AnyValue(std::move(OverflowVec))};
   }
 
   AnyValue


        


More information about the llvm-commits mailing list