[PATCH] D79375: [FileCheck] Make invalid prefix diagnostics more precise
Joel E. Denny via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 5 09:41:43 PDT 2020
jdenny added inline comments.
================
Comment at: llvm/lib/Support/FileCheck.cpp:1887
+ if (Prefix.empty()) {
+ errs() << "error: supplied check prefix must not be the empty string\n";
return false;
----------------
jhenderson wrote:
> How about `WithColor::error()` instead?
Good idea. But should that be a separate patch that changes all FileCheck diagnostics at once?
================
Comment at: llvm/lib/Support/FileCheck.cpp:1905
+
+static const char *DefaultCheckPrefixes[] = {"CHECK"};
----------------
jhenderson wrote:
> This is only used in one place. Why not just explicitly provide it there? Alternatively, should this be defined in the top-level bit of FileCheck, so that client libraries can have different default check prefixes?
> This is only used in one place. Why not just explicitly provide it there?
I changed it. It was that way because I extracted it from D79276, which still uses it in two places.
> Alternatively, should this be defined in the top-level bit of FileCheck, so that client libraries can have different default check prefixes?
Perhaps so. But I feel like that's an orthogonal issue and belongs in a separate patch. What do you think?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79375/new/
https://reviews.llvm.org/D79375
More information about the llvm-commits
mailing list