diff options
author | Joel E. Denny <jdenny.ornl@gmail.com> | 2018-12-18 00:03:51 +0000 |
---|---|---|
committer | Joel E. Denny <jdenny.ornl@gmail.com> | 2018-12-18 00:03:51 +0000 |
commit | e2afb6149918d67779d24570f87761549c79a390 (patch) | |
tree | edccaba779baf72a139b131dd5f650549da1de51 /llvm/lib/Support | |
parent | 96f0e84ccf299f31c8dff0067d3582758ebcae43 (diff) | |
download | bcm5719-llvm-e2afb6149918d67779d24570f87761549c79a390.tar.gz bcm5719-llvm-e2afb6149918d67779d24570f87761549c79a390.zip |
[FileCheck] Annotate input dump (final tweaks)
Apply final suggestions from probinson for this patch series plus a
few more tweaks:
* Improve various docs, for MatchType in particular.
* Rename some members of MatchType. The main problem was that the
term "final match" became a misnomer when CHECK-COUNT-<N> was
created.
* Split InputStartLine, etc. declarations into multiple lines.
Differential Revision: https://reviews.llvm.org/D55738
Reviewed By: probinson
llvm-svn: 349425
Diffstat (limited to 'llvm/lib/Support')
-rw-r--r-- | llvm/lib/Support/FileCheck.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/Support/FileCheck.cpp b/llvm/lib/Support/FileCheck.cpp index cf377bd92e2..37986c96c08 100644 --- a/llvm/lib/Support/FileCheck.cpp +++ b/llvm/lib/Support/FileCheck.cpp @@ -908,8 +908,8 @@ static void PrintMatch(bool ExpectedMatch, const SourceMgr &SM, return; } SMRange MatchRange = ProcessMatchResult( - ExpectedMatch ? FileCheckDiag::MatchFinalAndExpected - : FileCheckDiag::MatchFinalButExcluded, + ExpectedMatch ? FileCheckDiag::MatchFoundAndExpected + : FileCheckDiag::MatchFoundButExcluded, SM, Loc, Pat.getCheckTy(), Buffer, MatchPos, MatchLen, Diags); std::string Message = formatv("{0}: {1} string found in input", Pat.getCheckTy().getDescription(Prefix), @@ -1062,7 +1062,7 @@ size_t FileCheckString::Check(const SourceMgr &SM, StringRef Buffer, // If this check is a "CHECK-NEXT", verify that the previous match was on // the previous line (i.e. that there is one newline between them). if (CheckNext(SM, SkippedRegion)) { - ProcessMatchResult(FileCheckDiag::MatchFinalButWrongLine, SM, Loc, + ProcessMatchResult(FileCheckDiag::MatchFoundButWrongLine, SM, Loc, Pat.getCheckTy(), MatchBuffer, MatchPos, MatchLen, Diags, Req.Verbose); return StringRef::npos; @@ -1071,7 +1071,7 @@ size_t FileCheckString::Check(const SourceMgr &SM, StringRef Buffer, // If this check is a "CHECK-SAME", verify that the previous match was on // the same line (i.e. that there is no newline between them). if (CheckSame(SM, SkippedRegion)) { - ProcessMatchResult(FileCheckDiag::MatchFinalButWrongLine, SM, Loc, + ProcessMatchResult(FileCheckDiag::MatchFoundButWrongLine, SM, Loc, Pat.getCheckTy(), MatchBuffer, MatchPos, MatchLen, Diags, Req.Verbose); return StringRef::npos; @@ -1283,7 +1283,7 @@ FileCheckString::CheckDag(const SourceMgr &SM, StringRef Buffer, "match discarded, overlaps earlier DAG match here", {OldRange}); if (Diags) - Diags->rbegin()->MatchTy = FileCheckDiag::MatchDiscard; + Diags->rbegin()->MatchTy = FileCheckDiag::MatchFoundButDiscarded; } MatchPos = MI->End; } |