LLVM  12.0.0git
Public Types | Public Member Functions | Public Attributes | List of all members
llvm::FileCheckDiag Struct Reference

#include "llvm/Support/FileCheck.h"

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

Public Types

enum  MatchType {
  MatchFoundAndExpected, MatchFoundButExcluded, MatchFoundButWrongLine, MatchFoundButDiscarded,
  MatchNoneAndExcluded, MatchNoneButExpected, MatchFuzzy
}
 What type of match result does this diagnostic describe? More...
 

Public Member Functions

 FileCheckDiag (const SourceMgr &SM, const Check::FileCheckType &CheckTy, SMLoc CheckLoc, MatchType MatchTy, SMRange InputRange)
 

Public Attributes

Check::FileCheckType CheckTy
 What is the FileCheck directive for this diagnostic? More...
 
SMLoc CheckLoc
 Where is the FileCheck directive for this diagnostic? More...
 
enum llvm::FileCheckDiag::MatchType MatchTy
 
unsigned InputStartLine
 The search range if MatchTy is MatchNoneAndExcluded or MatchNoneButExpected, or the match range otherwise. More...
 
unsigned InputStartCol
 
unsigned InputEndLine
 
unsigned InputEndCol
 

Detailed Description

Definition at line 89 of file FileCheck.h.

Member Enumeration Documentation

◆ 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. All match result types whose names end with "Excluded" are for excluded patterns, and all others are for expected patterns.

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.

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.

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 108 of file FileCheck.h.

Constructor & Destructor Documentation

◆ FileCheckDiag()

FileCheckDiag::FileCheckDiag ( const SourceMgr SM,
const Check::FileCheckType CheckTy,
SMLoc  CheckLoc,
MatchType  MatchTy,
SMRange  InputRange 
)

Definition at line 1455 of file FileCheck.cpp.

Member Data Documentation

◆ CheckLoc

SMLoc llvm::FileCheckDiag::CheckLoc

Where is the FileCheck directive for this diagnostic?

Definition at line 93 of file FileCheck.h.

◆ CheckTy

Check::FileCheckType llvm::FileCheckDiag::CheckTy

What is the FileCheck directive for this diagnostic?

Definition at line 91 of file FileCheck.h.

◆ InputEndCol

unsigned llvm::FileCheckDiag::InputEndCol

Definition at line 133 of file FileCheck.h.

◆ InputEndLine

unsigned llvm::FileCheckDiag::InputEndLine

Definition at line 132 of file FileCheck.h.

◆ InputStartCol

unsigned llvm::FileCheckDiag::InputStartCol

Definition at line 131 of file FileCheck.h.

◆ InputStartLine

unsigned llvm::FileCheckDiag::InputStartLine

The search range if MatchTy is MatchNoneAndExcluded or MatchNoneButExpected, or the match range otherwise.

Definition at line 130 of file FileCheck.h.

◆ MatchTy

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

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