clang 20.0.0git
|
A logger is notified as the analysis progresses. More...
#include "clang/Analysis/FlowSensitive/Logger.h"
Public Member Functions | |
virtual | ~Logger ()=default |
virtual void | beginAnalysis (const AdornedCFG &, TypeErasedDataflowAnalysis &) |
Called by the framework as we start analyzing a new function or statement. | |
virtual void | endAnalysis () |
virtual void | enterBlock (const CFGBlock &, bool PostVisit) |
Called when we start (re-)processing a block in the CFG. | |
virtual void | enterElement (const CFGElement &) |
Called when we start processing an element in the current CFG block. | |
virtual void | recordState (TypeErasedDataflowAnalysisState &) |
Records the analysis state computed for the current program point. | |
virtual void | blockConverged () |
Records that the analysis state for the current block is now final. | |
void | log (llvm::function_ref< void(llvm::raw_ostream &)> Emit) |
Called by the framework or user code to report some event. | |
Static Public Member Functions | |
static Logger & | null () |
Returns a dummy logger that does nothing. | |
static std::unique_ptr< Logger > | textual (llvm::raw_ostream &) |
A logger that simply writes messages to the specified ostream in real time. | |
static std::unique_ptr< Logger > | html (std::function< std::unique_ptr< llvm::raw_ostream >()>) |
A logger that builds an HTML UI to inspect the analysis results. | |
Protected Member Functions | |
Logger (bool ShouldLogText=true) | |
ShouldLogText should be false for trivial loggers that ignore logText(). | |
A logger is notified as the analysis progresses.
It can produce a report of the analysis's findings and how it came to them.
The framework reports key structural events (e.g. traversal of blocks). The specific analysis can add extra details to be presented in context.
|
virtualdefault |
|
inlinevirtual |
Called by the framework as we start analyzing a new function or statement.
Forms a pair with endAnalysis().
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
Called when we start processing an element in the current CFG block.
The target program point is after the specified element. Calls to log() describe the transfer() function.
|
static |
A logger that builds an HTML UI to inspect the analysis results.
Each function's analysis is written to a stream obtained from the factory.
Definition at line 580 of file HTMLLogger.cpp.
|
inline |
Called by the framework or user code to report some event.
The event is associated with the current context (program point). The Emit function produces the log message. It may or may not be called, depending on if the logger is interested; it should have no side effects.
|
static |
Returns a dummy logger that does nothing.
Definition at line 16 of file Logger.cpp.
|
inlinevirtual |
|
static |
A logger that simply writes messages to the specified ostream in real time.
Definition at line 107 of file Logger.cpp.