clang 20.0.0git
|
A class that handles the analysis of uniqueness violations. More...
#include "clang/Analysis/Analyses/Consumed.h"
Public Member Functions | |
ConsumedAnalyzer (ConsumedWarningsHandlerBase &WarningsHandler) | |
ConsumedState | getExpectedReturnState () const |
void | run (AnalysisDeclContext &AC) |
Check a function's CFG for consumed violations. | |
Public Attributes | |
ConsumedWarningsHandlerBase & | WarningsHandler |
A class that handles the analysis of uniqueness violations.
Definition at line 243 of file Consumed.h.
|
inline |
Definition at line 257 of file Consumed.h.
|
inline |
Definition at line 260 of file Consumed.h.
Referenced by clang::consumed::ConsumedStmtVisitor::VisitReturnStmt().
void ConsumedAnalyzer::run | ( | AnalysisDeclContext & | AC | ) |
Check a function's CFG for consumed violations.
We traverse the blocks in the CFG, keeping track of the state of each value who's type has uniqueness annotations. If methods are invoked in the wrong state a warning is issued. Each block in the CFG is traversed exactly once.
Definition at line 1300 of file Consumed.cpp.
References clang::CFGElement::AutomaticObjectDtor, clang::CFGElement::castAs(), clang::consumed::ConsumedStmtVisitor::checkCallability(), D, clang::consumed::ConsumedWarningsHandlerBase::emitDiagnostics(), clang::CFGTemporaryDtor::getBindTemporaryExpr(), clang::CFGImplicitDtor::getDestructorDecl(), clang::Stmt::getEndLoc(), clang::Decl::getLocation(), clang::CFG::getNumBlockIDs(), clang::CFGStmt::getStmt(), clang::CFGAutomaticObjDtor::getTriggerStmt(), clang::CFGAutomaticObjDtor::getVarDecl(), Loc, clang::consumed::ConsumedStmtVisitor::reset(), clang::CFGElement::Statement, clang::CFGElement::TemporaryDtor, clang::StmtVisitorBase< Ptr, ImplClass, RetTy, ParamTys >::Visit(), clang::consumed::ConsumedStmtVisitor::VisitParmVarDecl(), and WarningsHandler.
Referenced by clang::sema::AnalysisBasedWarnings::IssueWarnings().
ConsumedWarningsHandlerBase& clang::consumed::ConsumedAnalyzer::WarningsHandler |
Definition at line 255 of file Consumed.h.
Referenced by clang::consumed::ConsumedStmtVisitor::checkCallability(), clang::consumed::ConsumedStmtVisitor::handleCall(), run(), and clang::consumed::ConsumedStmtVisitor::VisitReturnStmt().