clang
17.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. More... | |
Public Attributes | |
ConsumedWarningsHandlerBase & | WarningsHandler |
A class that handles the analysis of uniqueness violations.
Definition at line 239 of file Consumed.h.
|
inline |
Definition at line 253 of file Consumed.h.
|
inline |
Definition at line 256 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 uniquness 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 1304 of file Consumed.cpp.
References clang::CFGElement::AutomaticObjectDtor, clang::CFGElement::castAs(), clang::consumed::ConsumedStmtVisitor::checkCallability(), clang::consumed::ConsumedWarningsHandlerBase::emitDiagnostics(), clang::AnalysisDeclContext::getAnalysis(), clang::AnalysisDeclContext::getASTContext(), clang::CFGTemporaryDtor::getBindTemporaryExpr(), clang::FunctionDecl::getCallResultType(), clang::AnalysisDeclContext::getCFG(), clang::AnalysisDeclContext::getDecl(), clang::CFGImplicitDtor::getDestructorDecl(), clang::Stmt::getEndLoc(), clang::CFG::getExit(), clang::Decl::getLocation(), clang::CFG::getNumBlockIDs(), clang::CFGStmt::getStmt(), clang::CFGAutomaticObjDtor::getTriggerStmt(), clang::CFGAutomaticObjDtor::getVarDecl(), clang::Type::isVoidType(), clang::FunctionDecl::parameters(), 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 251 of file Consumed.h.
Referenced by clang::consumed::ConsumedStmtVisitor::checkCallability(), run(), and clang::consumed::ConsumedStmtVisitor::VisitReturnStmt().