LLVM 23.0.0git
llvm::MatchFuzzyDiag Class Reference

MatchNoteDiag for a fuzzy match that serves as a suggestion for the next intended match for an expected pattern with too few or no good matches. More...

#include "llvm/FileCheck/FileCheck.h"

Inheritance diagram for llvm::MatchFuzzyDiag:
[legend]

Public Member Functions

 MatchFuzzyDiag (SMLoc MatchStart)
bool isError () const override
 Always false.
std::optional< SMRangegetMatchRange () const override
 Return an input range (never std::nullopt) starting and ending at the match start.
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 MatchResultDiaggetMatchResultDiag () 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 MatchFuzzyDiag?
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
}

Detailed Description

MatchNoteDiag for a fuzzy match that serves as a suggestion for the next intended match for an expected pattern with too few or no good matches.

Definition at line 327 of file FileCheck.h.

Constructor & Destructor Documentation

◆ MatchFuzzyDiag()

llvm::MatchFuzzyDiag::MatchFuzzyDiag ( SMLoc MatchStart)
inline

Definition at line 332 of file FileCheck.h.

References MatchFuzzyDiag(), and llvm::MatchNoteDiag::MatchNoteDiag().

Referenced by MatchFuzzyDiag().

Member Function Documentation

◆ classof()

bool llvm::MatchFuzzyDiag::classof ( const FileCheckDiag * FCD)
inlinestatic

Is FCD an instance of MatchFuzzyDiag?

Definition at line 335 of file FileCheck.h.

References llvm::FileCheckDiag::getKind(), and llvm::FileCheckDiag::MatchFuzzyDiag.

◆ getMatchRange()

std::optional< SMRange > llvm::MatchFuzzyDiag::getMatchRange ( ) const
inlineoverridevirtual

Return an input range (never std::nullopt) starting and ending at the match start.

The actual match end is not computed.

Implements llvm::FileCheckDiag.

Definition at line 343 of file FileCheck.h.

◆ isError()

bool llvm::MatchFuzzyDiag::isError ( ) const
inlineoverridevirtual

Always false.

A fuzzy match is not an error even though it is performed due to an error.

Implements llvm::FileCheckDiag.

Definition at line 340 of file FileCheck.h.


The documentation for this class was generated from the following file: