LLVM 23.0.0git
llvm::MatchNoneDiag Class Reference

MatchResultDiag for a pattern that did not match the input. More...

#include "llvm/FileCheck/FileCheck.h"

Inheritance diagram for llvm::MatchNoneDiag:
[legend]

Public Types

enum  StatusTy { Success , InvalidPattern , Expected }
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

 MatchNoneDiag (const Check::FileCheckType &CheckTy, SMLoc CheckLoc, StatusTy Status, SMRange SearchRange)
bool isError () const override
 Does the lack of match represent an error?
StatusTy getStatus () const
 Does the lack of a match indicate a success? If not, why not?
std::optional< SMRangegetMatchRange () const override
 Return 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 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?

Static Public Member Functions

static bool classof (const FileCheckDiag *FCD)
 Is FCD an instance of MatchNoneDiag?
Static Public Member Functions inherited from llvm::MatchResultDiag
static bool classof (const FileCheckDiag *FCD)
 Is FCD an instance of MatchResultDiag?

Detailed Description

MatchResultDiag for a pattern that did not match the input.

Definition at line 264 of file FileCheck.h.

Member Enumeration Documentation

◆ StatusTy

Enumerator
Success 

Indicates no match for an excluded pattern.

InvalidPattern 

Indicates no match due to an expected or excluded pattern that has proven to be invalid at match time (error).

The exact problems are usually reported in subsequent MatchNoteDiag objects.

Expected 

Indicates no match for an expected pattern (error).

In some cases, it follows good matches (because multiple matches are expected) or discarded matches for the pattern.

Definition at line 266 of file FileCheck.h.

Constructor & Destructor Documentation

◆ MatchNoneDiag()

llvm::MatchNoneDiag::MatchNoneDiag ( const Check::FileCheckType & CheckTy,
SMLoc CheckLoc,
StatusTy Status,
SMRange SearchRange )
inline

Definition at line 283 of file FileCheck.h.

References MatchNoneDiag(), and llvm::MatchResultDiag::MatchResultDiag().

Referenced by MatchNoneDiag().

Member Function Documentation

◆ classof()

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

Is FCD an instance of MatchNoneDiag?

Definition at line 289 of file FileCheck.h.

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

◆ getMatchRange()

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

Return std::nullopt.

Implements llvm::FileCheckDiag.

Definition at line 297 of file FileCheck.h.

◆ getStatus()

StatusTy llvm::MatchNoneDiag::getStatus ( ) const
inline

Does the lack of a match indicate a success? If not, why not?

Definition at line 295 of file FileCheck.h.

◆ isError()

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

Does the lack of match represent an error?

Implements llvm::FileCheckDiag.

Definition at line 293 of file FileCheck.h.

References Success.


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