[PATCH] D95849: [FileCheck] Default --allow-unused-prefixes to false
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 2 09:44:40 PST 2021
MaskRay added a comment.
In D95849#2536559 <https://reviews.llvm.org/D95849#2536559>, @nikic wrote:
> Just to be clear here: Only the small handful where a spelling mistake was fixed were actually bugs. All other unused check prefixes were there for convenience, and are now casualties of this unnecessary crusade. I regret not speaking out against this at the time.
Hi, I think the situation is the converse: most are code smell, only a small handful of tests leverage this property. So far the most convincing usage is something like (a) `--check-prefix=%something` where `%something` can expand to multiple prefixes and (b) a customized tool integrating FileCheck feature which expands to multiple prefixes, some prefixes may be omitted.
Issues include (a) misspelled prefixes (b) bitrot prefixes due to refactoring (c) omitted `-NOT` patterns (e.g. some tests use --check-prefixes=CHECK,CHECK-C for C specific UB and --check-prefixes=CHECK,CHECK-CPP. `CHECK-CPP` was absent but was intended to be a `CHECK-CPP-NOT:`)
I think the good uses of --allow-unused-prefixes=true are much fewer than the opposite.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95849/new/
https://reviews.llvm.org/D95849
More information about the llvm-commits
mailing list