clang
7.0.0
|
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 241 of file Consumed.h.
|
inline |
Definition at line 255 of file Consumed.h.
|
inline |
Definition at line 258 of file Consumed.h.
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 1309 of file Consumed.cpp.
References clang::CFGElement::AutomaticObjectDtor, clang::CFGElement::castAs(), clang::consumed::ConsumedStmtVisitor::checkCallability(), clang::AnalysisDeclContext::getAnalysis(), clang::AnalysisDeclContext::getASTContext(), clang::CFGTemporaryDtor::getBindTemporaryExpr(), clang::FunctionDecl::getCallResultType(), clang::AnalysisDeclContext::getCFG(), clang::AnalysisDeclContext::getDecl(), clang::CFGImplicitDtor::getDestructorDecl(), clang::CFG::getExit(), clang::Decl::getLocation(), clang::Stmt::getLocEnd(), 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(), and clang::consumed::ConsumedStmtVisitor::VisitParmVarDecl().
Referenced by clang::sema::AnalysisBasedWarnings::IssueWarnings().
ConsumedWarningsHandlerBase& clang::consumed::ConsumedAnalyzer::WarningsHandler |
Definition at line 253 of file Consumed.h.