[clang] [clang][x86][bytecode] added trailing type for ffs, missed in pr llvm#162346 for llvm#160288 (PR #163905)

via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 16 21:09:30 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: don (donneypr)

<details>
<summary>Changes</summary>

This was missed in my pr #<!-- -->162346 for #<!-- -->160288.

---
Full diff: https://github.com/llvm/llvm-project/pull/163905.diff


1 Files Affected:

- (modified) clang/lib/AST/ByteCode/InterpBuiltin.cpp (+1-1) 


``````````diff
diff --git a/clang/lib/AST/ByteCode/InterpBuiltin.cpp b/clang/lib/AST/ByteCode/InterpBuiltin.cpp
index 922d67940e22f..517c51a5f7de1 100644
--- a/clang/lib/AST/ByteCode/InterpBuiltin.cpp
+++ b/clang/lib/AST/ByteCode/InterpBuiltin.cpp
@@ -3173,7 +3173,7 @@ bool InterpretBuiltin(InterpState &S, CodePtr OpPC, const CallExpr *Call,
   case Builtin::BI__builtin_ffsl:
   case Builtin::BI__builtin_ffsll:
     return interp__builtin_elementwise_int_unaryop(
-        S, OpPC, Call, [](const APSInt &Val) {
+        S, OpPC, Call, [](const APSInt &Val) -> APInt {
           return APInt(Val.getBitWidth(),
                        Val.isZero() ? 0u : Val.countTrailingZeros() + 1u);
         });

``````````

</details>


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


More information about the cfe-commits mailing list