Skip to content

Conversation

@donneypr
Copy link
Contributor

@donneypr donneypr commented Oct 22, 2025

Related to the discussion in #162346, this PR is to remove the trailing type from the 'interp__builtin_elementwise_int_binop' callbacks.

@llvmbot llvmbot added clang Clang issues not falling into any other category clang:frontend Language frontend issues, e.g. anything involving "Sema" clang:bytecode Issues for the clang bytecode constexpr interpreter labels Oct 22, 2025
@llvmbot
Copy link
Member

llvmbot commented Oct 22, 2025

@llvm/pr-subscribers-clang

Author: don (donneypr)

Changes

Regarding the discussion in llvm#162346, this PR is to remove the trailing type from the 'interp__builtin_elementwise_int_unaryop' callbacks.


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

1 Files Affected:

  • (modified) clang/lib/AST/ByteCode/InterpBuiltin.cpp (+2-2)
diff --git a/clang/lib/AST/ByteCode/InterpBuiltin.cpp b/clang/lib/AST/ByteCode/InterpBuiltin.cpp
index ff83c52b0c8f6..2d5ad4a7a92cf 100644
--- a/clang/lib/AST/ByteCode/InterpBuiltin.cpp
+++ b/clang/lib/AST/ByteCode/InterpBuiltin.cpp
@@ -3471,7 +3471,7 @@ bool InterpretBuiltin(InterpState &S, CodePtr OpPC, const CallExpr *Call,
   case Builtin::BI_lrotl:
   case Builtin::BI_rotl64:
     return interp__builtin_elementwise_int_binop(
-        S, OpPC, Call, [](const APSInt &Value, const APSInt &Amount) -> APInt {
+        S, OpPC, Call, [](const APSInt &Value, const APSInt &Amount) {
           return Value.rotl(Amount);
         });
 
@@ -3485,7 +3485,7 @@ bool InterpretBuiltin(InterpState &S, CodePtr OpPC, const CallExpr *Call,
   case Builtin::BI_lrotr:
   case Builtin::BI_rotr64:
     return interp__builtin_elementwise_int_binop(
-        S, OpPC, Call, [](const APSInt &Value, const APSInt &Amount) -> APInt {
+        S, OpPC, Call, [](const APSInt &Value, const APSInt &Amount) {
           return Value.rotr(Amount);
         });
 

@donneypr
Copy link
Contributor Author

donneypr commented Oct 22, 2025

@RKSimon This is related to the previous merged PR #163905, seems like these were left out for the 'interp__builtin_elementwise_int_binop' callback and needed to be removed too.

@donneypr donneypr changed the title [clang][x86][bytecode] remove trailing returns type from interp__builtin_elementwise_int_unaryop callbacks [clang][x86][bytecode] remove trailing returns type from interp__builtin_elementwise_int_binop callbacks Oct 22, 2025
Copy link
Collaborator

@RKSimon RKSimon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - cheers

@RKSimon RKSimon enabled auto-merge (squash) October 23, 2025 08:22
@RKSimon RKSimon merged commit d2889d7 into llvm:main Oct 23, 2025
9 of 10 checks passed
mikolaj-pirog pushed a commit to mikolaj-pirog/llvm-project that referenced this pull request Oct 23, 2025
…tin_elementwise_int_binop callbacks (llvm#164679)

Related to the discussion in llvm#162346, this PR is to remove the trailing type from the 'interp__builtin_elementwise_int_binop' callbacks.
@donneypr donneypr deleted the clang/remove-trailing-type-rotate branch October 23, 2025 16:09
dvbuka pushed a commit to dvbuka/llvm-project that referenced this pull request Oct 27, 2025
…tin_elementwise_int_binop callbacks (llvm#164679)

Related to the discussion in llvm#162346, this PR is to remove the trailing type from the 'interp__builtin_elementwise_int_binop' callbacks.
Lukacma pushed a commit to Lukacma/llvm-project that referenced this pull request Oct 29, 2025
…tin_elementwise_int_binop callbacks (llvm#164679)

Related to the discussion in llvm#162346, this PR is to remove the trailing type from the 'interp__builtin_elementwise_int_binop' callbacks.
aokblast pushed a commit to aokblast/llvm-project that referenced this pull request Oct 30, 2025
…tin_elementwise_int_binop callbacks (llvm#164679)

Related to the discussion in llvm#162346, this PR is to remove the trailing type from the 'interp__builtin_elementwise_int_binop' callbacks.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clang:bytecode Issues for the clang bytecode constexpr interpreter clang:frontend Language frontend issues, e.g. anything involving "Sema" clang Clang issues not falling into any other category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants