|
LLVM 23.0.0git
|
MatchNoteDiag with a custom note not described by any other class derived from MatchNoteDiag.
More...
#include "llvm/FileCheck/FileCheck.h"
Public Member Functions | |
| const std::string & | getNote () const |
| bool | isError () const override |
Does this note indicate an additional error not indicated by the associated MatchResultDiag? | |
| std::optional< SMRange > | getMatchRange () const override |
Return the match range described by the note, or std::nullopt if none. | |
| MatchCustomNoteDiag (SMRange MatchRange, StringRef Note, bool AddsError=false) | |
If MatchRange is specified, it is a range for input text that was matched in some way (e.g., variable capture) and that is described by this note. | |
| MatchCustomNoteDiag (StringRef Note) | |
| Public Member Functions inherited from llvm::MatchNoteDiag | |
| MatchNoteDiag (FileCheckDiagKind Kind) | |
| virtual | ~MatchNoteDiag ()=0 |
| Destructor is purely virtual to ensure this remains an abstract class. | |
| const MatchResultDiag & | getMatchResultDiag () const override |
Get the note's associated MatchResultDiag. | |
| void | setMatchResultDiag (MatchResultDiag *MRDNew) |
Set the note's associated MatchResultDiag. | |
| 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 MatchCustomNoteDiag? | |
| Static Public Member Functions inherited from llvm::MatchNoteDiag | |
| static bool | classof (const FileCheckDiag *FCD) |
Is FCD an instance of MatchNoteDiag? | |
Additional Inherited Members | |
| 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 } |
MatchNoteDiag with a custom note not described by any other class derived from MatchNoteDiag.
Definition at line 350 of file FileCheck.h.
|
inline |
If MatchRange is specified, it is a range for input text that was matched in some way (e.g., variable capture) and that is described by this note.
Either way, as usual, the associated MatchResultDiag has any full match range for the pattern.
If AddsError is true, then this note indicates a new error that is distinct from any error indicated by the associated MatchResultDiag. The error is described by Note, which must be worded appropriately for prepending "error: " when presented later. For example, the associated MatchResultDiag might indicate a match to either an expected pattern (success) or an excluded pattern (error), and Note might be "unable to
represent numeric value" to indicate the match could not be processed afterward.
If AddsError is false, then this note merely provides additional information about the associated MatchResultDiag. That information might be something harmless (e.g., variable substitution), or it might be one of potentially many problems summarized as an error by the MatchResultDiag (e.g., one way in which the pattern was invalid).
Definition at line 377 of file FileCheck.h.
References MatchCustomNoteDiag(), and llvm::MatchNoteDiag::MatchNoteDiag().
Referenced by MatchCustomNoteDiag(), and MatchCustomNoteDiag().
|
inline |
Definition at line 381 of file FileCheck.h.
References MatchCustomNoteDiag(), and llvm::MatchNoteDiag::MatchNoteDiag().
|
inlinestatic |
Is FCD an instance of MatchCustomNoteDiag?
Definition at line 386 of file FileCheck.h.
References llvm::FileCheckDiag::getKind(), and llvm::FileCheckDiag::MatchCustomNoteDiag.
|
inlineoverridevirtual |
Return the match range described by the note, or std::nullopt if none.
Implements llvm::FileCheckDiag.
Definition at line 397 of file FileCheck.h.
|
inline |
Definition at line 389 of file FileCheck.h.
|
inlineoverridevirtual |
Does this note indicate an additional error not indicated by the associated MatchResultDiag?
For details, see the MatchCustomNoteDiag::MatchCustomNoteDiag comments for its AddsError parameter.
Implements llvm::FileCheckDiag.
Definition at line 395 of file FileCheck.h.