[clang] [clang] Robustify openmp test (PR #69739)

Nathan Sidwell via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 27 13:39:29 PDT 2023


https://github.com/urnathan updated https://github.com/llvm/llvm-project/pull/69739

>From bb391aa466577f4187af6b284ee5107090778a03 Mon Sep 17 00:00:00 2001
From: Nathan Sidwell <nathan at acm.org>
Date: Fri, 20 Oct 2023 11:43:08 -0400
Subject: [PATCH 1/2] [clang] Robustify open mp test

If the source path contains 'alias' this would spuriously fail.  Be
more specific about not wanting [no]alias annotations.
---
 clang/test/OpenMP/declare_variant_device_kind_codegen.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/clang/test/OpenMP/declare_variant_device_kind_codegen.cpp b/clang/test/OpenMP/declare_variant_device_kind_codegen.cpp
index daa14f1e3a93129..aec71bd5b5da20e 100644
--- a/clang/test/OpenMP/declare_variant_device_kind_codegen.cpp
+++ b/clang/test/OpenMP/declare_variant_device_kind_codegen.cpp
@@ -80,7 +80,7 @@
 
 // expected-no-diagnostics
 
-// CHECK-NOT: alias
+// CHECK-NOT: {{ (no)?alias }}
 
 // CHECK-NOT: ret i32 {{1|4|81|84}}
 // CHECK-DAG: declare {{.*}}i32 @_Z5bazzzv()

>From 47ccce0676a39eb64e5305325d88b9b101e03a26 Mon Sep 17 00:00:00 2001
From: Nathan Sidwell <nathan at acm.org>
Date: Fri, 27 Oct 2023 16:38:11 -0400
Subject: [PATCH 2/2] [clang] Robustify open mp test

If the source path contains 'alias' this would spuriously fail.  Be
more specific about not wanting global aliases, which is what
introduced this check.
---
 clang/test/OpenMP/declare_variant_device_kind_codegen.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/clang/test/OpenMP/declare_variant_device_kind_codegen.cpp b/clang/test/OpenMP/declare_variant_device_kind_codegen.cpp
index aec71bd5b5da20e..4f9a86f1e0080d9 100644
--- a/clang/test/OpenMP/declare_variant_device_kind_codegen.cpp
+++ b/clang/test/OpenMP/declare_variant_device_kind_codegen.cpp
@@ -80,7 +80,8 @@
 
 // expected-no-diagnostics
 
-// CHECK-NOT: {{ (no)?alias }}
+// Verify no unexpected global symbol aliasing
+// CHECK-NOT: @{{[^ ]+}} = {{.*}}alias
 
 // CHECK-NOT: ret i32 {{1|4|81|84}}
 // CHECK-DAG: declare {{.*}}i32 @_Z5bazzzv()



More information about the cfe-commits mailing list