My Project
Public Member Functions | List of all members
mlir::SourceMgrDiagnosticVerifierHandler Class Reference

#include <Diagnostics.h>

Inheritance diagram for mlir::SourceMgrDiagnosticVerifierHandler:
Inheritance graph
[legend]
Collaboration diagram for mlir::SourceMgrDiagnosticVerifierHandler:
Collaboration graph
[legend]

Public Member Functions

 SourceMgrDiagnosticVerifierHandler (llvm::SourceMgr &srcMgr, MLIRContext *ctx, raw_ostream &out)
 
 SourceMgrDiagnosticVerifierHandler (llvm::SourceMgr &srcMgr, MLIRContext *ctx)
 
 ~SourceMgrDiagnosticVerifierHandler ()
 
LogicalResult verify ()
 
- Public Member Functions inherited from mlir::SourceMgrDiagnosticHandler
 SourceMgrDiagnosticHandler (llvm::SourceMgr &mgr, MLIRContext *ctx, raw_ostream &os)
 
 SourceMgrDiagnosticHandler (llvm::SourceMgr &mgr, MLIRContext *ctx)
 
 ~SourceMgrDiagnosticHandler ()
 
void emitDiagnostic (Location loc, Twine message, DiagnosticSeverity kind)
 Emit the given diagnostic information with the held source manager. More...
 
- Public Member Functions inherited from mlir::ScopedDiagnosticHandler
 ScopedDiagnosticHandler (MLIRContext *ctx)
 
template<typename FuncTy >
 ScopedDiagnosticHandler (MLIRContext *ctx, FuncTy &&handler)
 
 ~ScopedDiagnosticHandler ()
 

Additional Inherited Members

- Protected Member Functions inherited from mlir::SourceMgrDiagnosticHandler
void emitDiagnostic (Diagnostic &diag)
 Emit the given diagnostic with the held source manager. More...
 
const llvm::MemoryBuffer * getBufferForFile (StringRef filename)
 Get a memory buffer for the given file, or nullptr if one is not found. More...
 
- Protected Member Functions inherited from mlir::ScopedDiagnosticHandler
template<typename FuncTy >
void setHandler (FuncTy &&handler)
 Set the handler to manage via RAII. More...
 
- Protected Attributes inherited from mlir::SourceMgrDiagnosticHandler
llvm::SourceMgr & mgr
 The source manager that we are wrapping. More...
 
raw_ostream & os
 The output stream to use when printing diagnostics. More...
 

Detailed Description

This class is a utility diagnostic handler for use with llvm::SourceMgr that verifies that emitted diagnostics match 'expected-*' lines on the corresponding line of the source file.

Constructor & Destructor Documentation

◆ SourceMgrDiagnosticVerifierHandler() [1/2]

SourceMgrDiagnosticVerifierHandler::SourceMgrDiagnosticVerifierHandler ( llvm::SourceMgr &  srcMgr,
MLIRContext ctx,
raw_ostream &  out 
)

◆ SourceMgrDiagnosticVerifierHandler() [2/2]

SourceMgrDiagnosticVerifierHandler::SourceMgrDiagnosticVerifierHandler ( llvm::SourceMgr &  srcMgr,
MLIRContext ctx 
)

◆ ~SourceMgrDiagnosticVerifierHandler()

SourceMgrDiagnosticVerifierHandler::~SourceMgrDiagnosticVerifierHandler ( )

Member Function Documentation

◆ verify()

LogicalResult SourceMgrDiagnosticVerifierHandler::verify ( )

Returns the status of the handler and verifies that all expected diagnostics were emitted. This return success if all diagnostics were verified correctly, failure otherwise.

Returns the status of the verifier and verifies that all expected diagnostics were emitted. This return success if all diagnostics were verified correctly, failure otherwise.


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