[clang] [Utils] add update-verify-tests.py (PR #97369)
Nicolai Hähnle via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 12 01:26:35 PDT 2024
================
@@ -0,0 +1,10 @@
+// RUN: %clang_cc1 -verify %s
+// RUN: diff %s %s.expected
----------------
nhaehnle wrote:
Right, it's all a little mind-bending, but my point is that since you're trying to test whether the invocation of `not %{lit} %S/LitTests --update-tests` in `lit-plugin.test` updated the tests to look like the `.expected` file, that invocation of `diff` should *also* be in `lit-plugin.test`.
You can't have the correctness check for a test that modifies a file be in the same file that is being modified. It has to live outside.
https://github.com/llvm/llvm-project/pull/97369
More information about the cfe-commits
mailing list