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

Summary of a FileCheck diagnostic. More...

#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...
 
unsigned CheckLine
 Where is the FileCheck directive for this diagnostic? More...
 
unsigned CheckCol
 
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

Summary of a FileCheck diagnostic.

Definition at line 186 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 205 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 560 of file FileCheck.cpp.

Member Data Documentation

◆ CheckCol

unsigned llvm::FileCheckDiag::CheckCol

Definition at line 190 of file FileCheck.h.

◆ CheckLine

unsigned llvm::FileCheckDiag::CheckLine

Where is the FileCheck directive for this diagnostic?

Definition at line 190 of file FileCheck.h.

◆ CheckTy

Check::FileCheckType llvm::FileCheckDiag::CheckTy

What is the FileCheck directive for this diagnostic?

Definition at line 188 of file FileCheck.h.

Referenced by llvm::FileCheck::ReadCheckFile().

◆ InputEndCol

unsigned llvm::FileCheckDiag::InputEndCol

Definition at line 230 of file FileCheck.h.

◆ InputEndLine

unsigned llvm::FileCheckDiag::InputEndLine

Definition at line 229 of file FileCheck.h.

◆ InputStartCol

unsigned llvm::FileCheckDiag::InputStartCol

Definition at line 228 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 227 of file FileCheck.h.

◆ MatchTy

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

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