[PATCH] D69701: [Utils] Allow "on-the-fly" argument changes for update_test_check scripts

David Zarzycki via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 1 02:37:34 PDT 2019


davezarzycki added a comment.

In D69701#1729829 <https://reviews.llvm.org/D69701#1729829>, @arichardson wrote:

> This seems useful, thanks! Another case that would be nice is if there was a way to keep comments inside the autogenerated CHECK lines.
>
> For example:
>
>   ; CHECK-NEXT: ...
>   ;; We generate a foo instruction and not a bar instruction here because...
>   ; CHECK-NEXT: foo a, b, c
>   ; CHECK-NEXT: ...
>
>
> Right now if you re-run the update script the comment will be moved after all the CHECK lines. I wonder if there is a way to keep inline comments (maybe only if the CHECK: lines before and after didn't change?). Would this work with the `UTC_ARGS: --turn off` method?


IMHO, that kind of comment belongs with the code that *generates* the output, rather than buried in the middle of a random test file. Separably, if it isn't clear what the test is testing, then perhaps some discussion at the top of the file/function seems appropriate, perhaps with links back to the relevant files/functions that are being tested. For example: "Please see the discussion inside of function `foo` in Bar.cpp for what is being tested below."


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D69701





More information about the llvm-commits mailing list