|
LLVM 23.0.0git
|
MatchResultDiag for a pattern that matched the input.
More...
#include "llvm/FileCheck/FileCheck.h"
Public Types | |
| enum | StatusTy { Success , Excluded , WrongLine , Discarded } |
| Public Types inherited from llvm::FileCheckDiag | |
| enum | FileCheckDiagKind { MatchResultDiag_First , MatchFoundDiag = MatchResultDiag_First , MatchNoneDiag , MatchResultDiag_Last = MatchNoneDiag , MatchNoteDiag_First , MatchFuzzyDiag = MatchNoteDiag_First , MatchCustomNoteDiag , MatchNoteDiag_Last = MatchCustomNoteDiag } |
Public Member Functions | |
| MatchFoundDiag (const Check::FileCheckType &CheckTy, SMLoc CheckLoc, StatusTy Status, SMRange MatchRange, SMRange SearchRange) | |
| bool | isError () const override |
| Does this match produce an error? | |
| StatusTy | getStatus () const |
| Was this a successful match? | |
| void | markUnsuccessful (StatusTy S) |
| Adjust a successful status to a non-successful status. | |
| std::optional< SMRange > | getMatchRange () const override |
Return the match's input range, never std::nullopt. | |
| Public Member Functions inherited from llvm::MatchResultDiag | |
| MatchResultDiag (FileCheckDiagKind Kind, const Check::FileCheckType &CheckTy, SMLoc CheckLoc, SMRange SearchRange) | |
| virtual | ~MatchResultDiag ()=0 |
| Destructor is purely virtual to ensure this remains an abstract class. | |
| const MatchResultDiag & | getMatchResultDiag () const override |
| Get itself. | |
| Check::FileCheckType | getCheckTy () const |
| What is the type of pattern for this match result? | |
| SMLoc | getCheckLoc () const |
| Where is the pattern for this match result? | |
| SMRange | getSearchRange () const |
| What is the search range for the match result? | |
| Public Member Functions inherited from llvm::FileCheckDiag | |
| FileCheckDiag (FileCheckDiagKind Kind) | |
| virtual | ~FileCheckDiag ()=0 |
| Destructor is purely virtual to ensure this remains an abstract class. | |
| FileCheckDiagKind | getKind () const |
| Of what derived class is this an instance? | |
Static Public Member Functions | |
| static bool | classof (const FileCheckDiag *FCD) |
Is FCD an instance of MatchFoundDiag? | |
| Static Public Member Functions inherited from llvm::MatchResultDiag | |
| static bool | classof (const FileCheckDiag *FCD) |
Is FCD an instance of MatchResultDiag? | |
MatchResultDiag for a pattern that matched the input.
Definition at line 206 of file FileCheck.h.
Definition at line 208 of file FileCheck.h.
|
inline |
Definition at line 225 of file FileCheck.h.
References MatchFoundDiag(), and llvm::MatchResultDiag::MatchResultDiag().
Referenced by MatchFoundDiag().
|
inlinestatic |
Is FCD an instance of MatchFoundDiag?
Definition at line 231 of file FileCheck.h.
References llvm::FileCheckDiag::getKind(), and llvm::FileCheckDiag::MatchFoundDiag.
|
inlineoverridevirtual |
Return the match's input range, never std::nullopt.
Implements llvm::FileCheckDiag.
Definition at line 260 of file FileCheck.h.
|
inline |
Was this a successful match?
If not, why not?
See isError comments for the relationship between the two.
Definition at line 244 of file FileCheck.h.
|
inlineoverridevirtual |
Does this match produce an error?
This is not always the same as getStatus()!=Success. For example, CHECK-DAG discarded matches are neither successful matches nor errors.
Implements llvm::FileCheckDiag.
Definition at line 238 of file FileCheck.h.
|
inline |
Adjust a successful status to a non-successful status.
This is designed to be called while emitting diagnostics. It is not designed to be called by a diagnostic presentation layer like -dump-input.
For example, a match that was originally thought to be successful might later be discarded, or it might be determined that it violates a matching constraint (e.g., wrong line).
Definition at line 254 of file FileCheck.h.