[PATCH] D146054: [RISCV] Add --print-supported-extensions support

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 18 10:58:15 PDT 2023


MaskRay added a comment.

Please also mark resolved comments as done, otherwise reviewers can presume that some comments are unresolved and don't necessarily give another round of reviews.



================
Comment at: clang/test/Driver/print-supported-extensions.c:6
+// RUN: %clang --target=riscv64 --print-supported-extensions 2>&1 | \
+// RUN:   FileCheck %s --check-prefix=CHECK-RISCV
+
----------------
Use `--implicit-check-not=warning:` instead of `// CHECK-NOT: warning: argument unused during compilation`.

We additionally check that there is no warning and the warning doesn't come after the output from `--print-supported-extensions`.


================
Comment at: clang/test/Driver/print-supported-extensions.c:6
+// RUN: %clang --target=riscv64 --print-supported-extensions 2>&1 | \
+// RUN:   FileCheck %s --check-prefix=CHECK-RISCV
+
----------------
MaskRay wrote:
> Use `--implicit-check-not=warning:` instead of `// CHECK-NOT: warning: argument unused during compilation`.
> 
> We additionally check that there is no warning and the warning doesn't come after the output from `--print-supported-extensions`.
For a file with just one prefix, conventionally we just use the default `CHECK` and omit `--check-prefix`.

Have you ever checked that the test detects issues? `CHECK` below are ignored with `--check-prefix=CHECK-RISCV`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D146054/new/

https://reviews.llvm.org/D146054



More information about the cfe-commits mailing list