MLIR 22.0.0git
mlir::detail::SourceMgrDiagnosticVerifierHandlerImpl Struct Reference

Public Member Functions

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

Public Attributes

LogicalResult status
 The current status of the verifier.
llvm::StringMap< SmallVector< ExpectedDiag, 2 > > expectedDiagsPerFile
 A list of expected diagnostics for each buffer of the source manager.
SmallVector< ExpectedDiag, 2 > expectedUnknownLocDiags
 A list of expected diagnostics with unknown locations.
llvm::Regex expected
 Regex to match the expected diagnostics format.
SourceMgrDiagnosticVerifierHandler::Level level
 Verification level.

Detailed Description

Definition at line 667 of file Diagnostics.cpp.

Constructor & Destructor Documentation

◆ SourceMgrDiagnosticVerifierHandlerImpl()

mlir::detail::SourceMgrDiagnosticVerifierHandlerImpl::SourceMgrDiagnosticVerifierHandlerImpl ( SourceMgrDiagnosticVerifierHandler::Level level)
inline

Definition at line 668 of file Diagnostics.cpp.

References level, status, and success().

Member Function Documentation

◆ computeExpectedDiags()

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

◆ getExpectedDiags()

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

Returns the expected diagnostics for the given source file.

Definition at line 722 of file Diagnostics.cpp.

References expectedDiagsPerFile.

◆ getVerifyLevel()

SourceMgrDiagnosticVerifierHandler::Level mlir::detail::SourceMgrDiagnosticVerifierHandlerImpl::getVerifyLevel ( ) const
inline

Definition at line 681 of file Diagnostics.cpp.

References level.

Member Data Documentation

◆ expected

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

Regex to match the expected diagnostics format.

Definition at line 695 of file Diagnostics.cpp.

Referenced by computeExpectedDiags().

◆ 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 689 of file Diagnostics.cpp.

Referenced by computeExpectedDiags(), and getExpectedDiags().

◆ expectedUnknownLocDiags

SmallVector<ExpectedDiag, 2> mlir::detail::SourceMgrDiagnosticVerifierHandlerImpl::expectedUnknownLocDiags

A list of expected diagnostics with unknown locations.

Definition at line 692 of file Diagnostics.cpp.

Referenced by computeExpectedDiags().

◆ level

SourceMgrDiagnosticVerifierHandler::Level mlir::detail::SourceMgrDiagnosticVerifierHandlerImpl::level

◆ status

LogicalResult mlir::detail::SourceMgrDiagnosticVerifierHandlerImpl::status

The current status of the verifier.

Definition at line 686 of file Diagnostics.cpp.

Referenced by computeExpectedDiags(), and SourceMgrDiagnosticVerifierHandlerImpl().


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