[clang] [Clang][ExprConstant] Normalize aux target builtin IDs before dispatch (PR #201805)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 22 15:58:39 PDT 2026
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions h,cpp -- clang/test/Sema/aux-target-builtin-constexpr.cpp clang/lib/AST/ByteCode/Compiler.cpp clang/lib/AST/ByteCode/Interp.cpp clang/lib/AST/ByteCode/Interp.h clang/lib/AST/ByteCode/InterpBuiltin.cpp clang/lib/AST/ExprConstShared.h clang/lib/AST/ExprConstant.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/AST/ByteCode/InterpBuiltin.cpp b/clang/lib/AST/ByteCode/InterpBuiltin.cpp
index c97aa7831..ea362af61 100644
--- a/clang/lib/AST/ByteCode/InterpBuiltin.cpp
+++ b/clang/lib/AST/ByteCode/InterpBuiltin.cpp
@@ -4512,10 +4512,10 @@ bool InterpretBuiltin(InterpState &S, CodePtr OpPC, const CallExpr *Call,
return Invalid(S, OpPC);
// Normalize an auxiliary x86 target builtin ID to its canonical X86::BI*
- // value so the target-specific cases below (and the handlers they call) match.
- // This is a cheap integer operation (a single comparison for the common,
- // target-independent case); we deliberately avoid re-deriving the ID from the
- // call expression, which is comparatively slow.
+ // value so the target-specific cases below (and the handlers they call)
+ // match. This is a cheap integer operation (a single comparison for the
+ // common, target-independent case); we deliberately avoid re-deriving the ID
+ // from the call expression, which is comparatively slow.
BuiltinID = getConstantEvaluatedBuiltinID(ASTCtx, BuiltinID);
const InterpFrame *Frame = S.Current;
``````````
</details>
https://github.com/llvm/llvm-project/pull/201805
More information about the cfe-commits
mailing list