clang API Documentation
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. | |
Public Attributes | |
ConsumedWarningsHandlerBase & | WarningsHandler |
A class that handles the analysis of uniqueness violations.
Definition at line 233 of file Consumed.h.
clang::consumed::ConsumedAnalyzer::ConsumedAnalyzer | ( | ConsumedWarningsHandlerBase & | WarningsHandler | ) | [inline] |
Definition at line 250 of file Consumed.h.
ConsumedState clang::consumed::ConsumedAnalyzer::getExpectedReturnState | ( | ) | const [inline] |
Definition at line 253 of file Consumed.h.
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 1352 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::params(), 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().
Definition at line 248 of file Consumed.h.