-
Notifications
You must be signed in to change notification settings - Fork 15.2k
[Clang] Enable warnings on lax vector conversions #154719
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
mikolaj-pirog
wants to merge
9
commits into
llvm:main
Choose a base branch
from
mikolaj-pirog:mpirog/flax-vector-conversions-warning
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
[Clang] Enable warnings on lax vector conversions #154719
mikolaj-pirog
wants to merge
9
commits into
llvm:main
from
mikolaj-pirog:mpirog/flax-vector-conversions-warning
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
You can test this locally with the following command:git-clang-format --diff origin/main HEAD --extensions c,cpp -- clang/lib/Sema/SemaExpr.cpp clang/lib/Sema/SemaOverload.cpp clang/test/AST/ByteCode/builtin-bit-cast.cpp clang/test/CodeGen/AArch64/fp8-intrinsics/acle_neon_fp8_untyped.c clang/test/CodeGen/AArch64/sve-acle-__ARM_FEATURE_SVE_VECTOR_OPERATORS.c clang/test/CodeGen/AArch64/sve-acle-__ARM_FEATURE_SVE_VECTOR_OPERATORS.cpp clang/test/CodeGen/AArch64/targetattr-crypto.c clang/test/CodeGen/LoongArch/lasx/builtin-alias-error.c clang/test/CodeGen/LoongArch/lasx/builtin-error.c clang/test/CodeGen/LoongArch/lsx/builtin-alias-error.c clang/test/CodeGen/LoongArch/lsx/builtin-error.c clang/test/CodeGen/SystemZ/zvector.c clang/test/CodeGen/SystemZ/zvector2.c clang/test/CodeGen/builtins-mips-msa-error.c clang/test/CodeGen/target-builtin-error-3.c clang/test/CodeGen/vector.c clang/test/Sema/aarch64-neon-target.c clang/test/Sema/aarch64-neon-without-target-feature.cpp clang/test/Sema/arm-bfloat.cpp clang/test/Sema/arm-cde-immediates.c clang/test/Sema/arm-mve-immediates.c clang/test/Sema/arm-neon-target.c clang/test/Sema/arm-neon-types.c clang/test/Sema/arm64-neon-header.c clang/test/Sema/attr-arm-sve-vector-bits.c clang/test/Sema/attr-riscv-rvv-vector-bits.c clang/test/Sema/builtins-hvx-none.c clang/test/Sema/builtins-hvx-v60.c clang/test/Sema/builtins-hvx-v62.c clang/test/Sema/builtins-hvx-v65.c clang/test/Sema/builtins-mips-features.c clang/test/Sema/builtins-x86.c clang/test/Sema/constant-builtins-vector.cpp clang/test/Sema/conversion-64-32.c clang/test/Sema/conversion-implicit-int-includes-64-to-32.c clang/test/Sema/ext_vector_ops.c clang/test/Sema/overload-arm-mve.c clang/test/Sema/vector-assign.c clang/test/Sema/vector-cast.c clang/test/Sema/vector-gcc-compat.c clang/test/Sema/vector-gcc-compat.cpp clang/test/Sema/vector-init.c clang/test/Sema/vector-ops.c clang/test/SemaCXX/attr-arm-sve-vector-bits.cpp clang/test/SemaCXX/attr-riscv-rvv-vector-bits.cpp clang/test/SemaCXX/vector.cpp compiler-rt/lib/msan/tests/msan_test.cpp libcxx/test/std/experimental/simd/simd.class/simd_unary.pass.cpp
View the diff from clang-format here.diff --git a/compiler-rt/lib/msan/tests/msan_test.cpp b/compiler-rt/lib/msan/tests/msan_test.cpp
index 99ad2c31a..22a1405af 100644
--- a/compiler-rt/lib/msan/tests/msan_test.cpp
+++ b/compiler-rt/lib/msan/tests/msan_test.cpp
@@ -4132,8 +4132,8 @@ typedef U4 V2x32 __attribute__((__vector_size__(8)));
typedef U2 V4x16 __attribute__((__vector_size__(8)));
typedef U1 V8x8 __attribute__((__vector_size__(8)));
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecate-lax-vec-conv-all"
+# pragma clang diagnostic push
+# pragma clang diagnostic ignored "-Wdeprecate-lax-vec-conv-all"
V8x16 shift_sse2_left_scalar(V8x16 x, U4 y) {
return _mm_slli_epi16(x, y);
@@ -4349,7 +4349,7 @@ TEST(VectorCmpTest, builtin_ia32_ucomisdlt) {
EXPECT_NOT_POISONED(c);
}
-#pragma clang diagnostic push
+# pragma clang diagnostic push
#endif // defined(__x86_64__) && defined(__clang__)
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This makes clang emit warnings on code that does implicit vector conversions, like so:
For more, see https://discourse.llvm.org/t/rfc-making-flax-vector-conversions-none-the-default/88008