LLVM 23.0.0git
llvm::MatchResultDiag Class Referenceabstract

Abstract base class for recording a FileCheck diagnostic that reports a match result for a pattern. More...

#include "llvm/FileCheck/FileCheck.h"

Inheritance diagram for llvm::MatchResultDiag:
[legend]

Public Member Functions

 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 MatchResultDiaggetMatchResultDiag () 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?
virtual bool isError () const =0
 Does this diagnostic reveal a new error?
virtual std::optional< SMRangegetMatchRange () const =0
 Return the input range for which this diagnostic indicates text that was matched in some way (e.g., successful pattern match, discarded pattern match, or variable capture), or return std::nullopt if the diagnostic has no such input range.

Static Public Member Functions

static bool classof (const FileCheckDiag *FCD)
 Is FCD an instance of MatchResultDiag?

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

Abstract base class for recording a FileCheck diagnostic that reports a match result for a pattern.

Definition at line 177 of file FileCheck.h.

Constructor & Destructor Documentation

◆ MatchResultDiag()

llvm::MatchResultDiag::MatchResultDiag ( FileCheckDiagKind Kind,
const Check::FileCheckType & CheckTy,
SMLoc CheckLoc,
SMRange SearchRange )
inline

◆ ~MatchResultDiag()

MatchResultDiag::~MatchResultDiag ( )
pure virtual

Destructor is purely virtual to ensure this remains an abstract class.

Definition at line 1508 of file FileCheck.cpp.

Member Function Documentation

◆ classof()

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

◆ getCheckLoc()

SMLoc llvm::MatchResultDiag::getCheckLoc ( ) const
inline

Where is the pattern for this match result?

Definition at line 200 of file FileCheck.h.

◆ getCheckTy()

Check::FileCheckType llvm::MatchResultDiag::getCheckTy ( ) const
inline

What is the type of pattern for this match result?

Definition at line 198 of file FileCheck.h.

◆ getMatchResultDiag()

const MatchResultDiag & llvm::MatchResultDiag::getMatchResultDiag ( ) const
inlineoverridevirtual

Get itself.

Implements llvm::FileCheckDiag.

Definition at line 196 of file FileCheck.h.

References MatchResultDiag().

◆ getSearchRange()

SMRange llvm::MatchResultDiag::getSearchRange ( ) const
inline

What is the search range for the match result?

Definition at line 202 of file FileCheck.h.


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