llvmbot wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-hlsl

Author: Deric C. (Icohedron)

<details>
<summary>Changes</summary>

Fixes #<!-- -->180038 by enabling `-Wconversion`, `-Wvector-conversion`, and 
`-Wmatrix-conversion` warnings for HLSL by default, both in the HLSL clang 
driver and when fixing up clang invocations under HLSL in 
CompilerInvocation.cpp (so that they are enabled even with clang -cc1).

This PR also updates existing tests to expect warnings that weren't expected 
before, and removes the `-Wconversion` flags from existing HLSL tests since it 
is now redundant due to being enabled by default.

Note that no existing HLSL tests use or exercise `-Wvector-conversion` or 
`-Wmatrix-conversion`.

---

Patch is 37.62 KiB, truncated to 20.00 KiB below, full version: 
https://github.com/llvm/llvm-project/pull/182607.diff


44 Files Affected:

- (modified) clang/lib/Driver/ToolChains/HLSL.cpp (+2) 
- (modified) clang/lib/Frontend/CompilerInvocation.cpp (+12) 
- (modified) clang/test/CodeGenHLSL/builtins/acos-overloads.hlsl (+1-1) 
- (modified) clang/test/CodeGenHLSL/builtins/asin-overloads.hlsl (+1-1) 
- (modified) clang/test/CodeGenHLSL/builtins/atan-overloads.hlsl (+1-1) 
- (modified) clang/test/CodeGenHLSL/builtins/cosh-overloads.hlsl (+1-1) 
- (modified) clang/test/CodeGenHLSL/builtins/degrees-overloads.hlsl (+2-2) 
- (modified) clang/test/CodeGenHLSL/builtins/exp-overloads.hlsl (+1-1) 
- (modified) clang/test/CodeGenHLSL/builtins/exp2-overloads.hlsl (+1-1) 
- (modified) clang/test/CodeGenHLSL/builtins/floor-overloads.hlsl (+1-1) 
- (modified) clang/test/CodeGenHLSL/builtins/frac-overloads.hlsl (+2-2) 
- (modified) clang/test/CodeGenHLSL/builtins/isinf-overloads.hlsl (+2-2) 
- (modified) clang/test/CodeGenHLSL/builtins/log-overloads.hlsl (+1-1) 
- (modified) clang/test/CodeGenHLSL/builtins/log10-overloads.hlsl (+1-1) 
- (modified) clang/test/CodeGenHLSL/builtins/log2-overloads.hlsl (+1-1) 
- (modified) clang/test/CodeGenHLSL/builtins/normalize-overloads.hlsl (+2-2) 
- (modified) clang/test/CodeGenHLSL/builtins/round-overloads.hlsl (+1-1) 
- (modified) clang/test/CodeGenHLSL/builtins/rsqrt-overloads.hlsl (+2-2) 
- (modified) clang/test/CodeGenHLSL/builtins/sin-overloads.hlsl (+1-1) 
- (modified) clang/test/CodeGenHLSL/builtins/sinh-overloads.hlsl (+1-1) 
- (modified) clang/test/CodeGenHLSL/builtins/sqrt-overloads.hlsl (+1-1) 
- (modified) clang/test/CodeGenHLSL/builtins/step-overloads.hlsl (+2-2) 
- (modified) clang/test/CodeGenHLSL/builtins/tan-overloads.hlsl (+1-1) 
- (modified) clang/test/CodeGenHLSL/builtins/tanh-overloads.hlsl (+1-1) 
- (modified) clang/test/CodeGenHLSL/builtins/trunc-overloads.hlsl (+1-1) 
- (added) clang/test/Driver/HLSL/conversion-warning-flags.hlsl (+17) 
- (removed) clang/test/Driver/HLSL/wconversion.hlsl (-7) 
- (modified) clang/test/ParserHLSL/group_shared_202x.hlsl (+1-1) 
- (modified) clang/test/SemaHLSL/BuiltIns/select-errors.hlsl (+2-2) 
- (modified) clang/test/SemaHLSL/Language/ImpCastAddrSpace.hlsl (+1-1) 
- (modified) clang/test/SemaHLSL/Language/InitIncompleteArrays.hlsl (+1-1) 
- (modified) clang/test/SemaHLSL/Language/InitLists.hlsl (+1-1) 
- (modified) clang/test/SemaHLSL/Language/OutputParameters.hlsl (+1-1) 
- (modified) clang/test/SemaHLSL/Language/UsualArithmeticConversions.hlsl 
(+2-2) 
- (modified) clang/test/SemaHLSL/ScalarOverloadResolution.hlsl (+1-1) 
- (modified) clang/test/SemaHLSL/SplatOverloadResolution.hlsl (+3-3) 
- (modified) clang/test/SemaHLSL/TruncationOverloadResolution.hlsl (+1-1) 
- (modified) clang/test/SemaHLSL/Types/Arithmetic/literal_suffixes.hlsl (+1-1) 
- (modified) 
clang/test/SemaHLSL/Types/Arithmetic/literal_suffixes_no_16bit.hlsl (+1-1) 
- (modified) clang/test/SemaHLSL/VectorElementOverloadResolution.hlsl (+1-1) 
- (modified) clang/test/SemaHLSL/matrix-member-access-errors.hlsl (+3-3) 
- (added) clang/test/SemaHLSL/no-conversion-warnings.hlsl (+28) 
- (modified) clang/test/SemaHLSL/parameter_modifiers.hlsl (+1-1) 
- (modified) clang/test/SemaHLSL/standard_conversion_sequences.hlsl (+1-1) 


``````````diff
diff --git a/clang/lib/Driver/ToolChains/HLSL.cpp 
b/clang/lib/Driver/ToolChains/HLSL.cpp
index 587481b5623e1..28835d5077db7 100644
--- a/clang/lib/Driver/ToolChains/HLSL.cpp
+++ b/clang/lib/Driver/ToolChains/HLSL.cpp
@@ -594,4 +594,6 @@ bool HLSLToolChain::isLastJob(DerivedArgList &Args,
 
 void HLSLToolChain::addClangWarningOptions(ArgStringList &CC1Args) const {
   CC1Args.push_back("-Wconversion");
+  CC1Args.push_back("-Wvector-conversion");
+  CC1Args.push_back("-Wmatrix-conversion");
 }
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp 
b/clang/lib/Frontend/CompilerInvocation.cpp
index 6aa2afb6f5918..13472765a4f58 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -659,6 +659,18 @@ static bool FixupInvocation(CompilerInvocation &Invocation,
     Diags.Report(diag::warn_ignored_hip_only_option)
         << 
Args.getLastArg(OPT_gpu_max_threads_per_block_EQ)->getAsString(Args);
 
+  // HLSL invocations should always have -Wconversion, -Wvector-conversion, and
+  // -Wmatrix-conversion by default.
+  if (LangOpts.HLSL) {
+    auto &Warnings = Invocation.getDiagnosticOpts().Warnings;
+    if (!llvm::is_contained(Warnings, "conversion"))
+      Warnings.insert(Warnings.begin(), "conversion");
+    if (!llvm::is_contained(Warnings, "vector-conversion"))
+      Warnings.insert(Warnings.begin(), "vector-conversion");
+    if (!llvm::is_contained(Warnings, "matrix-conversion"))
+      Warnings.insert(Warnings.begin(), "matrix-conversion");
+  }
+
   // When these options are used, the compiler is allowed to apply
   // optimizations that may affect the final result. For example
   // (x+y)+z is transformed to x+(y+z) but may not give the same
diff --git a/clang/test/CodeGenHLSL/builtins/acos-overloads.hlsl 
b/clang/test/CodeGenHLSL/builtins/acos-overloads.hlsl
index 45c0826eff811..ebcbddf1cc7eb 100644
--- a/clang/test/CodeGenHLSL/builtins/acos-overloads.hlsl
+++ b/clang/test/CodeGenHLSL/builtins/acos-overloads.hlsl
@@ -1,6 +1,6 @@
 // RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -x hlsl -triple \
 // RUN:   spirv-unknown-vulkan-compute %s -emit-llvm \
-// RUN:   -Wdeprecated-declarations -Wconversion -o - | FileCheck %s 
--check-prefixes=CHECK \
+// RUN:   -Wdeprecated-declarations -o - | FileCheck %s --check-prefixes=CHECK 
\
 // RUN:   -DFNATTRS="hidden spir_func noundef nofpclass(nan inf)"
 // RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -x hlsl -triple 
spirv-unknown-vulkan-compute %s  \
 // RUN:   -verify -verify-ignore-unexpected=note
diff --git a/clang/test/CodeGenHLSL/builtins/asin-overloads.hlsl 
b/clang/test/CodeGenHLSL/builtins/asin-overloads.hlsl
index eee2bde9e78c4..f4234cc31805c 100644
--- a/clang/test/CodeGenHLSL/builtins/asin-overloads.hlsl
+++ b/clang/test/CodeGenHLSL/builtins/asin-overloads.hlsl
@@ -1,6 +1,6 @@
 // RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -x hlsl -triple \
 // RUN:   spirv-unknown-vulkan-compute %s -emit-llvm \
-// RUN:   -Wdeprecated-declarations -Wconversion -o - | FileCheck %s 
--check-prefixes=CHECK \
+// RUN:   -Wdeprecated-declarations -o - | FileCheck %s --check-prefixes=CHECK 
\
 // RUN:   -DFNATTRS="hidden spir_func noundef nofpclass(nan inf)"
 // RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -x hlsl -triple 
spirv-unknown-vulkan-compute %s  \
 // RUN:   -verify -verify-ignore-unexpected=note
diff --git a/clang/test/CodeGenHLSL/builtins/atan-overloads.hlsl 
b/clang/test/CodeGenHLSL/builtins/atan-overloads.hlsl
index bc115f71be796..953f90d60180b 100644
--- a/clang/test/CodeGenHLSL/builtins/atan-overloads.hlsl
+++ b/clang/test/CodeGenHLSL/builtins/atan-overloads.hlsl
@@ -1,6 +1,6 @@
 // RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -x hlsl -triple \
 // RUN:   spirv-unknown-vulkan-compute %s -emit-llvm \
-// RUN:   -Wdeprecated-declarations -Wconversion -o - | FileCheck %s 
--check-prefixes=CHECK \
+// RUN:   -Wdeprecated-declarations -o - | FileCheck %s --check-prefixes=CHECK 
\
 // RUN:   -DFNATTRS="hidden spir_func noundef nofpclass(nan inf)"
 // RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -x hlsl -triple 
spirv-unknown-vulkan-compute %s  \
 // RUN:   -verify -verify-ignore-unexpected=note
diff --git a/clang/test/CodeGenHLSL/builtins/cosh-overloads.hlsl 
b/clang/test/CodeGenHLSL/builtins/cosh-overloads.hlsl
index a45631c754962..c4ed56e0073e2 100644
--- a/clang/test/CodeGenHLSL/builtins/cosh-overloads.hlsl
+++ b/clang/test/CodeGenHLSL/builtins/cosh-overloads.hlsl
@@ -1,6 +1,6 @@
 // RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -x hlsl -triple \
 // RUN:   spirv-unknown-vulkan-compute %s -emit-llvm \
-// RUN:   -Wdeprecated-declarations -Wconversion -o - | \
+// RUN:   -Wdeprecated-declarations -o - | \
 // RUN:   FileCheck %s --check-prefixes=CHECK -DFNATTRS="hidden spir_func 
noundef nofpclass(nan inf)"
 // RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -x hlsl -triple 
spirv-unknown-vulkan-compute %s \
 // RUN:   -verify -verify-ignore-unexpected=note
diff --git a/clang/test/CodeGenHLSL/builtins/degrees-overloads.hlsl 
b/clang/test/CodeGenHLSL/builtins/degrees-overloads.hlsl
index 0db116f80e6f2..d76ee2973be2c 100644
--- a/clang/test/CodeGenHLSL/builtins/degrees-overloads.hlsl
+++ b/clang/test/CodeGenHLSL/builtins/degrees-overloads.hlsl
@@ -1,10 +1,10 @@
 // RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -x hlsl -triple \
 // RUN:   dxil-pc-shadermodel6.3-library %s -emit-llvm \
-// RUN:   -Wdeprecated-declarations -Wconversion -o - | FileCheck %s 
--check-prefixes=CHECK \
+// RUN:   -Wdeprecated-declarations -o - | FileCheck %s --check-prefixes=CHECK 
\
 // RUN:   -DFNATTRS="hidden noundef nofpclass(nan inf)" -DTARGET=dx
 // RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -x hlsl -triple \
 // RUN:   spirv-unknown-vulkan-compute %s -emit-llvm \
-// RUN:   -Wdeprecated-declarations -Wconversion -o - | FileCheck %s 
--check-prefixes=CHECK \
+// RUN:   -Wdeprecated-declarations -o - | FileCheck %s --check-prefixes=CHECK 
\
 // RUN:   -DFNATTRS="hidden spir_func noundef nofpclass(nan inf)" -DTARGET=spv
 // RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -x hlsl -triple 
dxil-pc-shadermodel6.3-library %s  \
 // RUN:   -verify -verify-ignore-unexpected=note
diff --git a/clang/test/CodeGenHLSL/builtins/exp-overloads.hlsl 
b/clang/test/CodeGenHLSL/builtins/exp-overloads.hlsl
index 5c78342426d2f..80c9906555c3b 100644
--- a/clang/test/CodeGenHLSL/builtins/exp-overloads.hlsl
+++ b/clang/test/CodeGenHLSL/builtins/exp-overloads.hlsl
@@ -1,5 +1,5 @@
 // RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -triple 
dxil-pc-shadermodel6.3-library %s \
-// RUN:   -Wdeprecated-declarations -Wconversion  -emit-llvm -o - | \
+// RUN:   -Wdeprecated-declarations  -emit-llvm -o - | \
 // RUN:   FileCheck %s --check-prefixes=CHECK -DFNATTRS="hidden noundef 
nofpclass(nan inf)"
 // RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -triple 
dxil-pc-shadermodel6.3-library %s \
 // RUN:   -verify -verify-ignore-unexpected=note
diff --git a/clang/test/CodeGenHLSL/builtins/exp2-overloads.hlsl 
b/clang/test/CodeGenHLSL/builtins/exp2-overloads.hlsl
index 362d5346c4079..9585183ad46c3 100644
--- a/clang/test/CodeGenHLSL/builtins/exp2-overloads.hlsl
+++ b/clang/test/CodeGenHLSL/builtins/exp2-overloads.hlsl
@@ -1,5 +1,5 @@
 // RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -triple 
dxil-pc-shadermodel6.3-library %s \
-// RUN:  -Wdeprecated-declarations -Wconversion -emit-llvm -o - | \
+// RUN:  -Wdeprecated-declarations -emit-llvm -o - | \
 // RUN:  FileCheck %s --check-prefixes=CHECK -DFNATTRS="hidden noundef 
nofpclass(nan inf)"
 // RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -triple 
dxil-pc-shadermodel6.3-library %s \
 // RUN:  -verify -verify-ignore-unexpected=note
diff --git a/clang/test/CodeGenHLSL/builtins/floor-overloads.hlsl 
b/clang/test/CodeGenHLSL/builtins/floor-overloads.hlsl
index a76ff8e522203..23d71ef1d7254 100644
--- a/clang/test/CodeGenHLSL/builtins/floor-overloads.hlsl
+++ b/clang/test/CodeGenHLSL/builtins/floor-overloads.hlsl
@@ -1,6 +1,6 @@
 // RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -x hlsl -triple \
 // RUN:   dxil-pc-shadermodel6.3-library %s -emit-llvm \
-// RUN:   -Wdeprecated-declarations -Wconversion -o - | FileCheck %s 
--check-prefixes=CHECK \
+// RUN:   -Wdeprecated-declarations -o - | FileCheck %s --check-prefixes=CHECK 
\
 // RUN:   -DFNATTRS="hidden noundef nofpclass(nan inf)"
 // RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -x hlsl -triple 
dxil-pc-shadermodel6.3-library %s  \
 // RUN:   -verify -verify-ignore-unexpected=note
diff --git a/clang/test/CodeGenHLSL/builtins/frac-overloads.hlsl 
b/clang/test/CodeGenHLSL/builtins/frac-overloads.hlsl
index ad3c08d160b60..ba22408e57e1c 100644
--- a/clang/test/CodeGenHLSL/builtins/frac-overloads.hlsl
+++ b/clang/test/CodeGenHLSL/builtins/frac-overloads.hlsl
@@ -1,10 +1,10 @@
 // RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -x hlsl -triple \
 // RUN:   dxil-pc-shadermodel6.3-library %s -emit-llvm \
-// RUN:   -Wdeprecated-declarations -Wconversion -o - | FileCheck %s 
--check-prefixes=CHECK \
+// RUN:   -Wdeprecated-declarations -o - | FileCheck %s --check-prefixes=CHECK 
\
 // RUN:   -DFNATTRS="hidden noundef nofpclass(nan inf)" -DTARGET=dx
 // RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -x hlsl -triple \
 // RUN:   spirv-unknown-vulkan-compute %s -emit-llvm \
-// RUN:   -Wdeprecated-declarations -Wconversion -o - | FileCheck %s 
--check-prefixes=CHECK \
+// RUN:   -Wdeprecated-declarations -o - | FileCheck %s --check-prefixes=CHECK 
\
 // RUN:   -DFNATTRS="hidden spir_func noundef nofpclass(nan inf)" -DTARGET=spv
 // RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -x hlsl -triple 
dxil-pc-shadermodel6.3-library %s  \
 // RUN:   -verify -verify-ignore-unexpected=note
diff --git a/clang/test/CodeGenHLSL/builtins/isinf-overloads.hlsl 
b/clang/test/CodeGenHLSL/builtins/isinf-overloads.hlsl
index 6e7ac30e5c926..fa181cf4c4934 100644
--- a/clang/test/CodeGenHLSL/builtins/isinf-overloads.hlsl
+++ b/clang/test/CodeGenHLSL/builtins/isinf-overloads.hlsl
@@ -1,10 +1,10 @@
 // RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -x hlsl -triple \
 // RUN:   dxil-pc-shadermodel6.3-library %s -emit-llvm \
-// RUN:   -Wdeprecated-declarations -Wconversion -o - | FileCheck %s 
--check-prefixes=CHECK \
+// RUN:   -Wdeprecated-declarations -o - | FileCheck %s --check-prefixes=CHECK 
\
 // RUN:   -DFNATTRS="hidden noundef" -DTARGET=dx
 // RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -x hlsl -triple \
 // RUN:   spirv-unknown-vulkan-compute %s -emit-llvm \
-// RUN:   -Wdeprecated-declarations -Wconversion -o - | FileCheck %s 
--check-prefixes=CHECK \
+// RUN:   -Wdeprecated-declarations -o - | FileCheck %s --check-prefixes=CHECK 
\
 // RUN:   -DFNATTRS="hidden spir_func noundef" -DTARGET=spv
 // RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -x hlsl -triple 
dxil-pc-shadermodel6.3-library %s  \
 // RUN:   -verify -verify-ignore-unexpected=note
diff --git a/clang/test/CodeGenHLSL/builtins/log-overloads.hlsl 
b/clang/test/CodeGenHLSL/builtins/log-overloads.hlsl
index 5ca5a81dd4cdb..73d3497c3aaeb 100644
--- a/clang/test/CodeGenHLSL/builtins/log-overloads.hlsl
+++ b/clang/test/CodeGenHLSL/builtins/log-overloads.hlsl
@@ -1,6 +1,6 @@
 // RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -x hlsl -triple \
 // RUN:   dxil-pc-shadermodel6.3-library %s -emit-llvm \
-// RUN:   -Wdeprecated-declarations -Wconversion -o - | FileCheck %s 
--check-prefixes=CHECK \
+// RUN:   -Wdeprecated-declarations -o - | FileCheck %s --check-prefixes=CHECK 
\
 // RUN:   -DFNATTRS="hidden noundef nofpclass(nan inf)"
 // RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -x hlsl -triple 
dxil-pc-shadermodel6.3-library %s  \
 // RUN:   -verify -verify-ignore-unexpected=note
diff --git a/clang/test/CodeGenHLSL/builtins/log10-overloads.hlsl 
b/clang/test/CodeGenHLSL/builtins/log10-overloads.hlsl
index fa5bcadce5ed9..1a7b8ad637d49 100644
--- a/clang/test/CodeGenHLSL/builtins/log10-overloads.hlsl
+++ b/clang/test/CodeGenHLSL/builtins/log10-overloads.hlsl
@@ -1,5 +1,5 @@
 // RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -triple 
dxil-pc-shadermodel6.3-library %s \
-// RUN:  -Wdeprecated-declarations -Wconversion -emit-llvm -o - | \
+// RUN:  -Wdeprecated-declarations -emit-llvm -o - | \
 // RUN:  FileCheck %s --check-prefixes=CHECK -DFNATTRS="hidden noundef 
nofpclass(nan inf)"
 // RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -triple 
dxil-pc-shadermodel6.3-library %s \
 // RUN:  -verify -verify-ignore-unexpected=note
diff --git a/clang/test/CodeGenHLSL/builtins/log2-overloads.hlsl 
b/clang/test/CodeGenHLSL/builtins/log2-overloads.hlsl
index ef9f8efc7169d..a812af5195571 100644
--- a/clang/test/CodeGenHLSL/builtins/log2-overloads.hlsl
+++ b/clang/test/CodeGenHLSL/builtins/log2-overloads.hlsl
@@ -1,6 +1,6 @@
 /// RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -x hlsl -triple \
 // RUN:   dxil-pc-shadermodel6.3-library %s -emit-llvm \
-// RUN:   -Wdeprecated-declarations -Wconversion -o - | FileCheck %s 
--check-prefixes=CHECK \
+// RUN:   -Wdeprecated-declarations -o - | FileCheck %s --check-prefixes=CHECK 
\
 // RUN:   -DFNATTRS="hidden noundef nofpclass(nan inf)"
 // RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -x hlsl -triple 
dxil-pc-shadermodel6.3-library %s  \
 // RUN:   -verify -verify-ignore-unexpected=note
diff --git a/clang/test/CodeGenHLSL/builtins/normalize-overloads.hlsl 
b/clang/test/CodeGenHLSL/builtins/normalize-overloads.hlsl
index 306b710493d4e..3f592a83cfe48 100644
--- a/clang/test/CodeGenHLSL/builtins/normalize-overloads.hlsl
+++ b/clang/test/CodeGenHLSL/builtins/normalize-overloads.hlsl
@@ -1,10 +1,10 @@
 // RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -x hlsl -triple \
 // RUN:   dxil-pc-shadermodel6.3-library %s -emit-llvm \
-// RUN:   -Wdeprecated-declarations -Wconversion -o - | FileCheck %s 
--check-prefixes=CHECK \
+// RUN:   -Wdeprecated-declarations -o - | FileCheck %s --check-prefixes=CHECK 
\
 // RUN:   -DFNATTRS="hidden noundef nofpclass(nan inf)" -DTARGET=dx
 // RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -x hlsl -triple \
 // RUN:   spirv-unknown-vulkan-compute %s -emit-llvm \
-// RUN:   -Wdeprecated-declarations -Wconversion -o - | FileCheck %s 
--check-prefixes=CHECK \
+// RUN:   -Wdeprecated-declarations -o - | FileCheck %s --check-prefixes=CHECK 
\
 // RUN:   -DFNATTRS="hidden spir_func noundef nofpclass(nan inf)" -DTARGET=spv
 // RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -x hlsl -triple 
dxil-pc-shadermodel6.3-library %s  \
 // RUN:   -verify -verify-ignore-unexpected=note
diff --git a/clang/test/CodeGenHLSL/builtins/round-overloads.hlsl 
b/clang/test/CodeGenHLSL/builtins/round-overloads.hlsl
index 66414ef743d96..8ee14fc65ae88 100644
--- a/clang/test/CodeGenHLSL/builtins/round-overloads.hlsl
+++ b/clang/test/CodeGenHLSL/builtins/round-overloads.hlsl
@@ -1,6 +1,6 @@
 // RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -x hlsl -triple \
 // RUN:   dxil-pc-shadermodel6.3-library %s -emit-llvm \
-// RUN:   -Wdeprecated-declarations -Wconversion -o - | FileCheck %s 
--check-prefixes=CHECK \
+// RUN:   -Wdeprecated-declarations -o - | FileCheck %s --check-prefixes=CHECK 
\
 // RUN:   -DFNATTRS="hidden noundef nofpclass(nan inf)"
 // RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -x hlsl -triple 
dxil-pc-shadermodel6.3-library %s  \
 // RUN:   -verify -verify-ignore-unexpected=note
diff --git a/clang/test/CodeGenHLSL/builtins/rsqrt-overloads.hlsl 
b/clang/test/CodeGenHLSL/builtins/rsqrt-overloads.hlsl
index f9142ff9aebdb..eaf41c3d92831 100644
--- a/clang/test/CodeGenHLSL/builtins/rsqrt-overloads.hlsl
+++ b/clang/test/CodeGenHLSL/builtins/rsqrt-overloads.hlsl
@@ -1,10 +1,10 @@
 // RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -x hlsl -triple \
 // RUN:   dxil-pc-shadermodel6.3-library %s -emit-llvm \
-// RUN:   -Wdeprecated-declarations -Wconversion -o - | FileCheck %s 
--check-prefixes=CHECK \
+// RUN:   -Wdeprecated-declarations -o - | FileCheck %s --check-prefixes=CHECK 
\
 // RUN:   -DFNATTRS="hidden noundef nofpclass(nan inf)" -DTARGET=dx
 // RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -x hlsl -triple \
 // RUN:   spirv-unknown-vulkan-compute %s -emit-llvm \
-// RUN:   -Wdeprecated-declarations -Wconversion -o - | FileCheck %s 
--check-prefixes=CHECK \
+// RUN:   -Wdeprecated-declarations -o - | FileCheck %s --check-prefixes=CHECK 
\
 // RUN:   -DFNATTRS="hidden spir_func noundef nofpclass(nan inf)" -DTARGET=spv
 // RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -x hlsl -triple 
dxil-pc-shadermodel6.3-library %s  \
 // RUN:   -verify -verify-ignore-unexpected=note
diff --git a/clang/test/CodeGenHLSL/builtins/sin-overloads.hlsl 
b/clang/test/CodeGenHLSL/builtins/sin-overloads.hlsl
index 16d29aadd924f..f497bf3e25758 100644
--- a/clang/test/CodeGenHLSL/builtins/sin-overloads.hlsl
+++ b/clang/test/CodeGenHLSL/builtins/sin-overloads.hlsl
@@ -1,6 +1,6 @@
 // RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -x hlsl -triple \
 // RUN:   dxil-pc-shadermodel6.3-library %s -emit-llvm \
-// RUN:   -Wdeprecated-declarations -Wconversion -o - | FileCheck %s 
--check-prefixes=CHECK \
+// RUN:   -Wdeprecated-declarations -o - | FileCheck %s --check-prefixes=CHECK 
\
 // RUN:   -DFNATTRS="hidden noundef nofpclass(nan inf)"
 // RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -x hlsl -triple 
dxil-pc-shadermodel6.3-library %s  \
 // RUN:   -verify -verify-ignore-unexpected=note
diff --git a/clang/test/CodeGenHLSL/builtins/sinh-overloads.hlsl 
b/clang/test/CodeGenHLSL/builtins/sinh-overloads.hlsl
index 6db821faf468d..f5c10428f5f93 100644
--- a/clang/test/CodeGenHLSL/builtins/sinh-overloads.hlsl
+++ b/clang/test/CodeGenHLSL/builtins/sinh-overloads.hlsl
@@ -1,5 +1,5 @@
 // RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -triple 
dxil-pc-shadermodel6.3-library %s \
-// RUN:  -Wdeprecated-declarations -Wconversion -emit-llvm -o - | \
+// RUN:  -Wdeprecated-declarations -emit-llvm -o - | \
 // RUN:  FileCheck %s --check-prefixes=CHECK -DFNATTRS="hidden noundef 
nofpclass(nan inf)"
 // RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -triple 
dxil-pc-shadermodel6.3-library %s \
 // RUN:  -verify -verify-ignore-unexpected=note
diff --git a/clang/test/CodeGenHLSL/builtins/sqrt-overloads.hlsl 
b/clang/test/CodeGenHLSL/builtins/sqrt-overloads.hlsl
index 12cc743f48d93..2acdcdc88bd93 100644
--- a/clang/test/CodeGenHLSL/builtins/sqrt-overloads.hlsl
+++ b/clang/test/CodeGenHLSL/builtins/sqrt-overloads.hlsl
@@ -1,6 +1,6 @@
 // RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -x hlsl -triple \
 // RUN:   dxil-pc-shadermodel6.3-library %s -emit-llvm \
-// RUN:   -Wdeprecated-declarations -Wconversion -o - | FileCheck %s 
--check-prefixes=CHECK \
+// RUN:   -Wdeprecated-declarations -o - | FileCheck %s --check-prefixes=CHECK 
\
 // RUN:   -DFNATTRS="hidden noundef nofpclass(nan inf)"
 // RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -x hlsl -triple 
dxil-pc-shadermodel6.3-library %s  \
 // RUN:   -verify -verify-ignore-unexpected=note
diff --git a/clang/test/CodeGenHLSL/builtins/step-overloads.hlsl 
b/clang/test/CodeGenHLSL/builtins/step-overloads.hlsl
index cdc655ca85937..2e85005a5a9f4 100644
--- a/clang/test/CodeGenHLSL/builtins/step-overloads.hlsl
+++ b/clang/test/CodeGenHLSL/builtins/step-overloads.hlsl
@@ -1,10 +1,10 @@
 // RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -x hlsl -triple \
 // RUN:   dxil-pc-shadermodel6.3-library %s -emit-llvm \
-// RUN:   -Wdeprecated-declarations -Wconversion -o - | FileCheck %s 
--check-prefixes=CHECK \
+// RUN:   -Wdeprecated-declarations -o - | FileCheck %s --check-prefixes=CHECK 
\
 // RUN:   -DFNATTRS="hidden noundef nofpclass(nan inf)" -DTARGET=dx
 // RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -x hlsl -triple \
 // RUN:   spirv-unknown-vulkan-compute %s -emit-llvm \
-// RUN:   -Wdeprecated-declarations -Wconversion -o - | FileCheck %s 
--check-prefixes=CHECK \
+// RUN:   -Wdeprecated-declarations -o - | FileCheck %s --check-prefixes=CHECK 
\
 // RUN:   -DFNATTRS="hidden spir_func noundef nofpclass(nan inf)" -DTARGET=spv
 // RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -x hlsl -triple 
dxil-pc-shadermodel6.3-library %s  \
 // RUN:   -verify -verify-ignore-unexpected=note
diff --git a/clang/test/CodeGenHLSL/builtins/tan-overloads.hlsl 
b/clang/test/CodeGenHLSL/bu...
[truncated]

``````````

</details>


https://github.com/llvm/llvm-project/pull/182607
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to