aboutsummaryrefslogtreecommitdiff
path: root/llvm/utils/FileCheck/FileCheck.cpp
diff options
context:
space:
mode:
authorJoel E. Denny <jdenny.ornl@gmail.com>2020-05-11 09:57:37 -0400
committerJoel E. Denny <jdenny.ornl@gmail.com>2020-05-11 21:11:58 -0400
commit2aa0217add1adbcabbc16e3ec44937e4277e117b (patch)
treef9bcf79c9d6dbe11cd313823896b80fbb183a0bf /llvm/utils/FileCheck/FileCheck.cpp
parent1429e4c3992d2a5f90de5879773b6cf5a050cb5e (diff)
downloadllvm-2aa0217add1adbcabbc16e3ec44937e4277e117b.zip
llvm-2aa0217add1adbcabbc16e3ec44937e4277e117b.tar.gz
llvm-2aa0217add1adbcabbc16e3ec44937e4277e117b.tar.bz2
[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
Diffstat (limited to 'llvm/utils/FileCheck/FileCheck.cpp')
-rw-r--r--llvm/utils/FileCheck/FileCheck.cpp6
1 files changed, 1 insertions, 5 deletions
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;