LLVM: llvm::FileCheckDiag Struct Reference (original) (raw)

Summary of a FileCheck diagnostic. More...

#include "[llvm/FileCheck/FileCheck.h](FileCheck%5F8h%5Fsource.html)"

Public Types
enum MatchType { MatchFoundAndExpected, MatchFoundButExcluded, MatchFoundButWrongLine, MatchFoundButDiscarded, MatchFoundErrorNote, MatchNoneAndExcluded, MatchNoneButExpected, MatchNoneForInvalidPattern, MatchFuzzy }
What type of match result does this diagnostic describe? More...
Public Attributes
Check::FileCheckType CheckTy
What is the FileCheck directive for this diagnostic?
SMLoc CheckLoc
Where is the FileCheck directive for this diagnostic?
enum llvm::FileCheckDiag::MatchType MatchTy
unsigned InputStartLine
The search range if MatchTy starts with MatchNone, or the match range otherwise.
unsigned InputStartCol
unsigned InputEndLine
unsigned InputEndCol
std::string Note
A note to replace the one normally indicated by MatchTy, or the empty string if none.

Summary of a FileCheck diagnostic.

Definition at line 114 of file FileCheck.h.

MatchType

What type of match result does this diagnostic describe?

A directive's supplied pattern is said to be either expected or excluded depending on whether the pattern must have or must not have a match in order for the directive to succeed. For example, a CHECK directive's pattern is expected, and a CHECK-NOT directive's pattern is excluded.

There might be more than one match result for a single pattern. For example, there might be several discarded matches (MatchFoundButDiscarded) before either a good match (MatchFoundAndExpected) or a failure to match (MatchNoneButExpected), and there might be a fuzzy match (MatchFuzzy) after the latter.

Enumerator
MatchFoundAndExpected Indicates a good match for an expected pattern.
MatchFoundButExcluded Indicates a match for an excluded pattern.
MatchFoundButWrongLine Indicates a match for an expected pattern, but the match is on the wrong line.
MatchFoundButDiscarded Indicates a discarded match for an expected pattern.
MatchFoundErrorNote Indicates an error while processing a match after the match was found for an expected or excluded pattern. The error is specified by Note, to which it should be appropriate to prepend "error: " later. The full match itself should be recorded in a preceding diagnostic of a different MatchFound match type.
MatchNoneAndExcluded Indicates no match for an excluded pattern.
MatchNoneButExpected Indicates no match for an expected pattern, but this might follow good matches when multiple matches are expected for the pattern, or it might follow discarded matches for the pattern.
MatchNoneForInvalidPattern Indicates no match due to an expected or excluded pattern that has proven to be invalid at match time. The exact problems are usually reported in subsequent diagnostics of the same match type but with Note set.
MatchFuzzy Indicates 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 131 of file FileCheck.h.

Definition at line 1511 of file FileCheck.cpp.

References CheckLoc, CheckTy, llvm::SMRange::End, llvm::SourceMgr::getLineAndColumn(), InputEndCol, InputEndLine, InputStartCol, InputStartLine, MatchTy, Note, and llvm::SMRange::Start.

CheckLoc

SMLoc llvm::FileCheckDiag::CheckLoc

CheckTy

InputEndCol

unsigned llvm::FileCheckDiag::InputEndCol

InputEndLine

unsigned llvm::FileCheckDiag::InputEndLine

InputStartCol

unsigned llvm::FileCheckDiag::InputStartCol

InputStartLine

unsigned llvm::FileCheckDiag::InputStartLine

The search range if MatchTy starts with MatchNone, or the match range otherwise.

Definition at line 164 of file FileCheck.h.

Referenced by FileCheckDiag().

MatchTy

enum llvm::FileCheckDiag::MatchType llvm::FileCheckDiag::MatchTy

Note

std::string llvm::FileCheckDiag::Note

A note to replace the one normally indicated by MatchTy, or the empty string if none.

Definition at line 170 of file FileCheck.h.

Referenced by FileCheckDiag().


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