[clang] [clang][NFC] Split invalid-cpu-note tests (PR #104601)

Fangrui Song via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 16 16:14:23 PDT 2024


================
@@ -0,0 +1,90 @@
+// Use --implicit-check-not to ensure no additional CPUs are in this list
+
+// RUN: not %clang_cc1 -triple arm64--- -target-cpu not-a-cpu -fsyntax-only %s 2>&1 | FileCheck %s --implicit-check-not={{[a-zA-Z0-9]}}
+// RUN: not %clang_cc1 -triple arm64--- -tune-cpu not-a-cpu -fsyntax-only %s 2>&1 | FileCheck %s --implicit-check-not={{[a-zA-Z0-9]}}
+
+// CHECK: error: unknown target CPU 'not-a-cpu'
+// CHECK-NEXT: note: valid target CPU values are:
+// CHECK-SAME: a64fx,
----------------
MaskRay wrote:

clang/test/Driver/linux-cross.cpp uses the `ARCH_I686-SAME: {{^}} xxx` pattern to check the content on the same line. You can use the same pattern. I think it's useful to pack some elements on the same line, e.g. `{{^}}, ampere1, ampere1a, ampere1b`

https://github.com/llvm/llvm-project/pull/104601


More information about the cfe-commits mailing list