[PATCH] D93078: [utils] Fix UpdateTestChecks case where 2 runs differ for last label

Johannes Doerfert via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 14 20:16:00 PST 2021


jdoerfert added a comment.

In D93078#2500040 <https://reviews.llvm.org/D93078#2500040>, @mtrofin wrote:

> In D93078#2500032 <https://reviews.llvm.org/D93078#2500032>, @jdoerfert wrote:
>
>> In D93078#2499996 <https://reviews.llvm.org/D93078#2499996>, @mtrofin wrote:
>>
>>> In D93078#2499995 <https://reviews.llvm.org/D93078#2499995>, @jdoerfert wrote:
>>>
>>>> I'm not sure how this is more helpful. What is the use case where this way of warning helps?
>>>
>>> For tests other than attributor, that explicitly set FileCheck --allow-unused-prefixes=true, these warnings mean that there will be unused prefixes (those listed)
>>
>> Should not we check for that flag in the RUN line then and only warn for unused prefixes when it is set. If there is no prefix we should obviously always warn.
>
> That's a good idea. Probably we'd need to also make sure that the unused prefixes are all on RUN lines with --allow-unused-prefixes=true.
>
> I'm also not sure how lit.local.cfg interacts with the test prefix updater: currently, the only cases where we bulk-want to allow unused prefixes is the Attributor tests. If you were going to add the flag explicitly, that'd also work. Or just the option to the update_test_prefix that says "ok with duplicates, don't warn"

I can add the option explicitly (D94744 <https://reviews.llvm.org/D94744>). We should look for the filecheck one if possible, two options means double the hassle. That said, why are we warning in both FileCheck and update_test_check, it seems to be unnecessary to do the latter.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D93078



More information about the cfe-commits mailing list