[all-commits] [llvm/llvm-project] 8cc9a4: [clang] Improve diagnostics for vector builtins (#...
Fraser Cormack via All-commits
all-commits at lists.llvm.org
Tue Mar 18 11:12:08 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 8cc9a485792240314ad723dcf6661490850d2c98
https://github.com/llvm/llvm-project/commit/8cc9a485792240314ad723dcf6661490850d2c98
Author: Fraser Cormack <fraser at codeplay.com>
Date: 2025-03-18 (Tue, 18 Mar 2025)
Changed paths:
M clang/include/clang/Basic/DiagnosticSemaKinds.td
M clang/include/clang/Sema/Sema.h
M clang/lib/Sema/SemaChecking.cpp
M clang/lib/Sema/SemaHLSL.cpp
M clang/test/Sema/aarch64-sve-vector-exp-ops.c
M clang/test/Sema/aarch64-sve-vector-log-ops.c
M clang/test/Sema/aarch64-sve-vector-pow-ops.c
M clang/test/Sema/aarch64-sve-vector-trig-ops.c
M clang/test/Sema/builtins-elementwise-math.c
M clang/test/Sema/builtins-reduction-math.c
M clang/test/Sema/count-builtins.c
M clang/test/Sema/riscv-rvv-vector-exp-ops.c
M clang/test/Sema/riscv-rvv-vector-log-ops.c
M clang/test/Sema/riscv-rvv-vector-trig-ops.c
M clang/test/Sema/riscv-sve-vector-pow-ops.c
M clang/test/SemaHLSL/BuiltIns/clamp-errors.hlsl
M clang/test/SemaHLSL/BuiltIns/dot-errors.hlsl
M clang/test/SemaHLSL/BuiltIns/exp-errors.hlsl
M clang/test/SemaHLSL/BuiltIns/firstbithigh-errors.hlsl
M clang/test/SemaHLSL/BuiltIns/firstbitlow-errors.hlsl
M clang/test/SemaHLSL/BuiltIns/lerp-errors.hlsl
M clang/test/SemaHLSL/BuiltIns/mad-errors.hlsl
M clang/test/SemaHLSL/BuiltIns/reversebits-errors.hlsl
M clang/test/SemaHLSL/BuiltIns/round-errors.hlsl
Log Message:
-----------
[clang] Improve diagnostics for vector builtins (#125673)
This commit improves the diagnostics for vector (elementwise) builtins
in a couple of ways.
It primarily provides more precise type-checking diagnostics for
builtins with specific type requirements. Previously many builtins were
receiving a catch-all diagnostic suggesting types which aren't valid.
It also makes consistent the type-checking behaviour between various
binary and ternary builtins. The binary builtins would check for
mismatched argument types before specific type requirements, whereas
ternary builtins would perform the checks in the reverse order. The
binary builtins now behave as the ternary ones do.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list