MLIR  19.0.0git
Public Member Functions | Public Attributes | List of all members
mlir::detail::SourceMgrDiagnosticVerifierHandlerImpl Struct Reference

Public Member Functions

 SourceMgrDiagnosticVerifierHandlerImpl ()
 
std::optional< MutableArrayRef< ExpectedDiag > > getExpectedDiags (StringRef bufName)
 Returns the expected diagnostics for the given source file. More...
 
MutableArrayRef< ExpectedDiagcomputeExpectedDiags (raw_ostream &os, llvm::SourceMgr &mgr, const llvm::MemoryBuffer *buf)
 Computes the expected diagnostics for the given source buffer. More...
 

Public Attributes

LogicalResult status
 The current status of the verifier. More...
 
llvm::StringMap< SmallVector< ExpectedDiag, 2 > > expectedDiagsPerFile
 A list of expected diagnostics for each buffer of the source manager. More...
 
llvm::Regex expected
 Regex to match the expected diagnostics format. More...
 

Detailed Description

Definition at line 659 of file Diagnostics.cpp.

Constructor & Destructor Documentation

◆ SourceMgrDiagnosticVerifierHandlerImpl()

mlir::detail::SourceMgrDiagnosticVerifierHandlerImpl::SourceMgrDiagnosticVerifierHandlerImpl ( )
inline

Definition at line 660 of file Diagnostics.cpp.

Member Function Documentation

◆ computeExpectedDiags()

MutableArrayRef< ExpectedDiag > SourceMgrDiagnosticVerifierHandlerImpl::computeExpectedDiags ( raw_ostream &  os,
llvm::SourceMgr &  mgr,
const llvm::MemoryBuffer *  buf 
)

Computes the expected diagnostics for the given source buffer.

Definition at line 709 of file Diagnostics.cpp.

◆ getExpectedDiags()

std::optional< MutableArrayRef< ExpectedDiag > > SourceMgrDiagnosticVerifierHandlerImpl::getExpectedDiags ( StringRef  bufName)

Returns the expected diagnostics for the given source file.

Definition at line 701 of file Diagnostics.cpp.

Member Data Documentation

◆ expected

llvm::Regex mlir::detail::SourceMgrDiagnosticVerifierHandlerImpl::expected
Initial value:
=
llvm::Regex("expected-(error|note|remark|warning)(-re)? "
"*(@([+-][0-9]+|above|below))? *{{(.*)}}$")

Regex to match the expected diagnostics format.

Definition at line 678 of file Diagnostics.cpp.

◆ expectedDiagsPerFile

llvm::StringMap<SmallVector<ExpectedDiag, 2> > mlir::detail::SourceMgrDiagnosticVerifierHandlerImpl::expectedDiagsPerFile

A list of expected diagnostics for each buffer of the source manager.

Definition at line 675 of file Diagnostics.cpp.

◆ status

LogicalResult mlir::detail::SourceMgrDiagnosticVerifierHandlerImpl::status

The current status of the verifier.

Definition at line 672 of file Diagnostics.cpp.


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