[clang] [Clang] Refactor the tests to be more uniform (PR #191944)
Nick Desaulniers via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 16 08:48:53 PDT 2026
================
@@ -1,292 +1,330 @@
// RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck %s
-// PR10415
+// PR10415:
+//
+// CHECK: module asm "foo1"
+// CHECK-NEXT: module asm "foo2"
+// CHECK-NEXT: module asm "foo3"
__asm__ ("foo1");
__asm__ ("foo2");
__asm__ ("foo3");
-// CHECK: module asm "foo1"
-// CHECK-NEXT: module asm "foo2"
-// CHECK-NEXT: module asm "foo3"
void t1(int len) {
- __asm__ volatile("" : "=&r"(len), "+&r"(len));
+ // CHECK-LABEL: define{{.*}} void @t1
----------------
nickdesaulniers wrote:
Trivial aside, it looks like `rg CHECK-LABEL clang/test/` shows that `CHECK-LABEL` supports either this style, or just `@t1`. IDK if it makes it more readable, but consider omitting the `define{{.*}} <return type>` from the checks, since that's really not what we're testing here.
Example:
```suggestion
// CHECK-LABEL: @t1
```
https://github.com/llvm/llvm-project/pull/191944
More information about the cfe-commits
mailing list