Go to the documentation of this file.
13 #ifndef LLVM_FILECHECK_FILECHECK_H
14 #define LLVM_FILECHECK_FILECHECK_H
80 std::bitset<FileCheckKindModifier::Size> Modifiers;
84 : Kind(Kind), Count(1), Modifiers() {}
170 std::unique_ptr<FileCheckPatternContext> PatternContext;
172 std::unique_ptr<std::vector<FileCheckString>> CheckStrings;
196 std::pair<unsigned, unsigned> *ImpPatBufferIDRange =
nullptr);
211 std::vector<FileCheckDiag> *Diags =
nullptr);
@ MatchNoneAndExcluded
Indicates no match for an excluded pattern.
Summary of a FileCheck diagnostic.
This class represents lattice values for constants.
bool AllowDeprecatedDagOverlap
std::vector< StringRef > GlobalDefines
bool NoCanonicalizeWhiteSpace
bool IsDefaultCheckPrefix
@ ModifierLiteral
Modifies directive to perform literal match.
enum llvm::FileCheckDiag::MatchType MatchTy
FileCheckType & setCount(int C)
FileCheckDiag(const SourceMgr &SM, const Check::FileCheckType &CheckTy, SMLoc CheckLoc, MatchType MatchTy, SMRange InputRange, StringRef Note="")
bool checkInput(SourceMgr &SM, StringRef Buffer, std::vector< FileCheckDiag > *Diags=nullptr)
Checks the input to FileCheck provided in the Buffer against the expected strings read from the check...
This interface provides simple read-only access to a block of memory, and provides simple methods for...
FileCheckType & operator=(const FileCheckType &)=default
Regex buildCheckPrefixRegex()
unsigned InputStartLine
The search range if MatchTy is MatchNoneAndExcluded or MatchNoneButExpected, or the match range other...
Represents a location in source code.
bool ValidateCheckPrefixes()
std::vector< StringRef > CheckPrefixes
(vector float) vec_cmpeq(*A, *B) C
SMLoc CheckLoc
Where is the FileCheck directive for this diagnostic?
@ MatchFoundAndExpected
Indicates a good match for an expected pattern.
FileCheckType(FileCheckKind Kind=CheckNone)
std::string Note
A note to replace the one normally indicated by MatchTy, or the empty string if none.
Class holding the Pattern global state, shared by all patterns: tables holding values of variables an...
@ MatchFoundButWrongLine
Indicates a match for an expected pattern, but the match is on the wrong line.
std::string getDescription(StringRef Prefix) const
static bool Check(DecodeStatus &Out, DecodeStatus In)
MatchType
What type of match result does this diagnostic describe?
bool readCheckFile(SourceMgr &SM, StringRef Buffer, Regex &PrefixRE, std::pair< unsigned, unsigned > *ImpPatBufferIDRange=nullptr)
Reads the check file from Buffer and records the expected strings it contains.
A check that we found in the input file.
@ MatchFoundButExcluded
Indicates a match for an excluded pattern.
FileCheckType & setLiteralMatch(bool Literal=true)
@ CheckBadCount
Marks when parsing found a -COUNT directive with invalid count value.
FileCheck(FileCheckRequest Req)
@ CheckBadNot
Marks when parsing found a -NOT check combined with another CHECK suffix.
FileCheck class takes the request and exposes various methods that use information from the request.
StringRef CanonicalizeFile(MemoryBuffer &MB, SmallVectorImpl< char > &OutputBuffer)
Canonicalizes whitespaces in the file.
StringRef - Represent a constant reference to a string, i.e.
This owns the files read by a parser, handles include stacks, and handles diagnostic wrangling.
@ MatchFuzzy
Indicates a fuzzy match that serves as a suggestion for the next intended match for an expected patte...
@ MatchNoneButExpected
Indicates no match for an expected pattern, but this might follow good matches when multiple matches ...
std::string getModifiersDescription() const
Check::FileCheckType CheckTy
What is the FileCheck directive for this diagnostic?
@ MatchFoundButDiscarded
Indicates a discarded match for an expected pattern.
std::vector< StringRef > CommentPrefixes
Contains info about various FileCheck options.
Represents a range in source code.
bool isLiteralMatch() const
std::vector< StringRef > ImplicitCheckNot
@ CheckEOF
Indicates the pattern only matches the end of file.