LLVM 17.0.0git
Public Member Functions | Public Attributes | List of all members
llvm::FileCheckString Struct Reference

A check that we found in the input file. More...

#include "FileCheck/FileCheckImpl.h"

Collaboration diagram for llvm::FileCheckString:
Collaboration graph
[legend]

Public Member Functions

 FileCheckString (const Pattern &P, StringRef S, SMLoc L)
 
size_t Check (const SourceMgr &SM, StringRef Buffer, bool IsLabelScanMode, size_t &MatchLen, FileCheckRequest &Req, std::vector< FileCheckDiag > *Diags) const
 Matches check string and its "not strings" and/or "dag strings".
 
bool CheckNext (const SourceMgr &SM, StringRef Buffer) const
 Verifies that there is a single line in the given Buffer.
 
bool CheckSame (const SourceMgr &SM, StringRef Buffer) const
 Verifies that there is no newline in the given Buffer.
 
bool CheckNot (const SourceMgr &SM, StringRef Buffer, const std::vector< const Pattern * > &NotStrings, const FileCheckRequest &Req, std::vector< FileCheckDiag > *Diags) const
 Verifies that none of the strings in NotStrings are found in the given Buffer.
 
size_t CheckDag (const SourceMgr &SM, StringRef Buffer, std::vector< const Pattern * > &NotStrings, const FileCheckRequest &Req, std::vector< FileCheckDiag > *Diags) const
 Matches "dag strings" and their mixed "not strings".
 

Public Attributes

Pattern Pat
 The pattern to match.
 
StringRef Prefix
 Which prefix name this check matched.
 
SMLoc Loc
 The location in the match file that the check string was specified.
 
std::vector< PatternDagNotStrings
 All of the strings that are disallowed from occurring between this match string and the previous one (or start of file).
 

Detailed Description

A check that we found in the input file.

Definition at line 865 of file FileCheckImpl.h.

Constructor & Destructor Documentation

◆ FileCheckString()

llvm::FileCheckString::FileCheckString ( const Pattern P,
StringRef  S,
SMLoc  L 
)
inline

Definition at line 879 of file FileCheckImpl.h.

Member Function Documentation

◆ Check()

size_t FileCheckString::Check ( const SourceMgr SM,
StringRef  Buffer,
bool  IsLabelScanMode,
size_t &  MatchLen,
FileCheckRequest Req,
std::vector< FileCheckDiag > *  Diags 
) const

◆ CheckDag()

size_t FileCheckString::CheckDag ( const SourceMgr SM,
StringRef  Buffer,
std::vector< const Pattern * > &  NotStrings,
const FileCheckRequest Req,
std::vector< FileCheckDiag > *  Diags 
) const

◆ CheckNext()

bool FileCheckString::CheckNext ( const SourceMgr SM,
StringRef  Buffer 
) const

◆ CheckNot()

bool FileCheckString::CheckNot ( const SourceMgr SM,
StringRef  Buffer,
const std::vector< const Pattern * > &  NotStrings,
const FileCheckRequest Req,
std::vector< FileCheckDiag > *  Diags 
) const

Verifies that none of the strings in NotStrings are found in the given Buffer.

Errors are reported against SM and diagnostics recorded in Diags according to the verbosity level set in Req.

Definition at line 2406 of file FileCheck.cpp.

References assert(), llvm::cantFail(), llvm::Check::CheckNot, E, llvm::Pattern::getCheckTy(), llvm::Pattern::getLoc(), llvm::handleErrors(), llvm::Pattern::match(), Pat, Prefix, and reportMatchResult().

Referenced by Check(), and CheckDag().

◆ CheckSame()

bool FileCheckString::CheckSame ( const SourceMgr SM,
StringRef  Buffer 
) const

Member Data Documentation

◆ DagNotStrings

std::vector<Pattern> llvm::FileCheckString::DagNotStrings

All of the strings that are disallowed from occurring between this match string and the previous one (or start of file).

Definition at line 877 of file FileCheckImpl.h.

Referenced by CheckDag().

◆ Loc

SMLoc llvm::FileCheckString::Loc

The location in the match file that the check string was specified.

Definition at line 873 of file FileCheckImpl.h.

Referenced by Check(), CheckNext(), and CheckSame().

◆ Pat

Pattern llvm::FileCheckString::Pat

The pattern to match.

Definition at line 867 of file FileCheckImpl.h.

Referenced by Check(), CheckDag(), llvm::FileCheck::checkInput(), CheckNext(), CheckNot(), and CheckSame().

◆ Prefix

StringRef llvm::FileCheckString::Prefix

Which prefix name this check matched.

Definition at line 870 of file FileCheckImpl.h.

Referenced by Check(), CheckDag(), CheckNext(), CheckNot(), and CheckSame().


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