clang
3.9.0
|
A class that handles the analysis of uniqueness violations. More...
#include <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 238 of file Consumed.h.
|
inline |
Definition at line 254 of file Consumed.h.
|
inline |
Definition at line 257 of file Consumed.h.
void clang::consumed::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 1345 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::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 >::Visit(), and clang::consumed::ConsumedStmtVisitor::VisitParmVarDecl().
Referenced by clang::sema::AnalysisBasedWarnings::IssueWarnings().
ConsumedWarningsHandlerBase& clang::consumed::ConsumedAnalyzer::WarningsHandler |
Definition at line 252 of file Consumed.h.