From 2aa0217add1adbcabbc16e3ec44937e4277e117b Mon Sep 17 00:00:00 2001 From: "Joel E. Denny" Date: Mon, 11 May 2020 09:57:37 -0400 Subject: [FileCheck] Make invalid prefix diagnostics more precise This will prove especially helpful after D79276, which introduces comment prefixes. Specifically, identifying whether there's a uniqueness violation will be helpful as prefixes will be required to be unique across both check prefixes and comment prefixes. Also, remove a related comment about `cl::list` that no longer seems relevant now that FileCheck is also a library. Reviewed By: jhenderson, thopre Differential Revision: https://reviews.llvm.org/D79375 --- llvm/utils/FileCheck/FileCheck.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'llvm/utils/FileCheck/FileCheck.cpp') diff --git a/llvm/utils/FileCheck/FileCheck.cpp b/llvm/utils/FileCheck/FileCheck.cpp index 3f7d777..46821ec 100644 --- a/llvm/utils/FileCheck/FileCheck.cpp +++ b/llvm/utils/FileCheck/FileCheck.cpp @@ -601,12 +601,8 @@ int main(int argc, char **argv) { Req.Verbose = true; FileCheck FC(Req); - if (!FC.ValidateCheckPrefixes()) { - errs() << "Supplied check-prefix is invalid! Prefixes must be unique and " - "start with a letter and contain only alphanumeric characters, " - "hyphens and underscores\n"; + if (!FC.ValidateCheckPrefixes()) return 2; - } Regex PrefixRE = FC.buildCheckPrefixRegex(); std::string REError; -- cgit v1.1