clang 20.0.0git
|
#include "clang/Analysis/Analyses/Consumed.h"
#include "clang/AST/Attr.h"
#include "clang/AST/Decl.h"
#include "clang/AST/DeclCXX.h"
#include "clang/AST/Expr.h"
#include "clang/AST/ExprCXX.h"
#include "clang/AST/Stmt.h"
#include "clang/AST/StmtVisitor.h"
#include "clang/AST/Type.h"
#include "clang/Analysis/Analyses/PostOrderCFGView.h"
#include "clang/Analysis/AnalysisDeclContext.h"
#include "clang/Analysis/CFG.h"
#include "clang/Basic/LLVM.h"
#include "clang/Basic/OperatorKinds.h"
#include "clang/Basic/SourceLocation.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/ErrorHandling.h"
#include <cassert>
#include <memory>
#include <optional>
#include <utility>
Go to the source code of this file.
Classes | |
class | clang::consumed::PropagationInfo |
class | clang::consumed::ConsumedStmtVisitor |
Namespaces | |
namespace | clang |
The JSON file list parser is used to communicate input to InstallAPI. | |
namespace | clang::consumed |
Enumerations | |
enum | clang::consumed::EffectiveOp { clang::consumed::EO_And , clang::consumed::EO_Or } |
|
static |
Definition at line 61 of file Consumed.cpp.
References Block, getFirstStmtLoc(), clang::CFGBlock::succ_begin(), and clang::CFGBlock::succ_size().
Referenced by getFirstStmtLoc(), and getLastStmtLoc().
|
static |
Definition at line 76 of file Consumed.cpp.
References Block, getFirstStmtLoc(), getLastStmtLoc(), clang::CFGBlock::getTerminatorStmt(), clang::SourceLocation::isValid(), Loc, clang::CFGBlock::pred_begin(), clang::CFGBlock::pred_size(), clang::CFGBlock::rbegin(), clang::CFGBlock::rend(), clang::CFGBlock::succ_begin(), and clang::CFGBlock::succ_size().
Referenced by getLastStmtLoc(), and clang::consumed::ConsumedStateMap::intersectAtLoopHead().
|
static |
Definition at line 103 of file Consumed.cpp.
References clang::consumed::CS_Consumed, clang::consumed::CS_None, clang::consumed::CS_Unconsumed, and clang::consumed::CS_Unknown.
Referenced by clang::consumed::PropagationInfo::invertTest(), splitVarStateForIf(), and splitVarStateForIfBinOp().
Definition at line 153 of file Consumed.cpp.
References clang::Type::getAsCXXRecordDecl(), and clang::Type::isPointerOrReferenceType().
|
static |
Definition at line 117 of file Consumed.cpp.
References clang::consumed::CS_Consumed, clang::consumed::CS_None, clang::consumed::CS_Unconsumed, and clang::consumed::CS_Unknown.
Referenced by clang::consumed::ConsumedStmtVisitor::checkCallability().
Definition at line 143 of file Consumed.cpp.
References clang::Type::getAsCXXRecordDecl(), and clang::Type::isPointerOrReferenceType().
Referenced by clang::consumed::ConsumedStmtVisitor::handleCall(), mapConsumableAttrState(), clang::consumed::ConsumedStmtVisitor::VisitCXXConstructExpr(), clang::consumed::ConsumedStmtVisitor::VisitParmVarDecl(), and clang::consumed::ConsumedStmtVisitor::VisitVarDecl().
|
static |
Definition at line 169 of file Consumed.cpp.
References clang::consumed::CS_Consumed, clang::consumed::CS_None, clang::consumed::CS_Unconsumed, and clang::consumed::CS_Unknown.
Referenced by splitVarStateForIfBinOp().
Definition at line 181 of file Consumed.cpp.
References clang::Type::isRValueReferenceType().
Referenced by clang::consumed::ConsumedStmtVisitor::handleCall(), TryReferenceInitializationCore(), and clang::consumed::ConsumedStmtVisitor::VisitParmVarDecl().
Definition at line 163 of file Consumed.cpp.
References clang::Type::getPointeeCXXRecordDecl().
Referenced by clang::consumed::ConsumedStmtVisitor::handleCall(), and clang::consumed::ConsumedStmtVisitor::VisitCXXConstructExpr().
|
static |
Definition at line 185 of file Consumed.cpp.
References clang::Decl::hasAttr().
Referenced by clang::consumed::ConsumedStmtVisitor::handleCall(), and testsFor().
|
static |
Definition at line 189 of file Consumed.cpp.
References clang::consumed::CS_Consumed, clang::consumed::CS_Unconsumed, clang::consumed::CS_Unknown, clang::Type::getAsCXXRecordDecl(), clang::Decl::getAttr(), and isConsumableType().
Referenced by clang::consumed::ConsumedStmtVisitor::VisitCXXConstructExpr(), and clang::consumed::ConsumedStmtVisitor::VisitParmVarDecl().
|
static |
Definition at line 207 of file Consumed.cpp.
References clang::consumed::CS_Consumed, clang::consumed::CS_Unconsumed, and clang::consumed::CS_Unknown.
Referenced by clang::consumed::ConsumedStmtVisitor::handleCall(), and clang::consumed::ConsumedStmtVisitor::VisitParmVarDecl().
|
static |
Definition at line 220 of file Consumed.cpp.
References clang::consumed::CS_Consumed, clang::consumed::CS_Unconsumed, and clang::consumed::CS_Unknown.
Referenced by clang::consumed::ConsumedStateMap::checkParamsForReturnTypestate(), clang::consumed::ConsumedStmtVisitor::handleCall(), and clang::consumed::ConsumedStmtVisitor::VisitCXXConstructExpr().
|
static |
Definition at line 232 of file Consumed.cpp.
References clang::consumed::CS_Consumed, clang::consumed::CS_Unconsumed, and clang::consumed::CS_Unknown.
Referenced by clang::consumed::ConsumedStmtVisitor::handleCall().
|
static |
Definition at line 442 of file Consumed.cpp.
References clang::consumed::PropagationInfo::getTmp(), clang::consumed::PropagationInfo::getVar(), clang::consumed::PropagationInfo::isTmp(), clang::consumed::PropagationInfo::isVar(), and clang::consumed::ConsumedStateMap::setState().
Referenced by clang::consumed::ConsumedStmtVisitor::handleCall().
|
static |
Definition at line 931 of file Consumed.cpp.
References clang::consumed::CS_Unknown, clang::consumed::ConsumedStateMap::getState(), invertConsumedUnconsumed(), clang::consumed::ConsumedStateMap::markUnreachable(), and clang::consumed::ConsumedStateMap::setState().
|
static |
Definition at line 946 of file Consumed.cpp.
References clang::consumed::CS_None, clang::consumed::CS_Unknown, clang::consumed::EO_And, clang::consumed::PropagationInfo::getLTest(), clang::consumed::PropagationInfo::getRTest(), clang::consumed::ConsumedStateMap::getState(), invertConsumedUnconsumed(), isKnownState(), clang::consumed::ConsumedStateMap::markUnreachable(), clang::consumed::ConsumedStateMap::setState(), and clang::consumed::PropagationInfo::testEffectiveOp().
|
static |
Definition at line 244 of file Consumed.cpp.
References clang::consumed::CS_Consumed, clang::consumed::CS_None, clang::consumed::CS_Unconsumed, and clang::consumed::CS_Unknown.
Referenced by clang::consumed::ConsumedStmtVisitor::checkCallability(), clang::consumed::ConsumedStateMap::checkParamsForReturnTypestate(), clang::consumed::ConsumedStmtVisitor::handleCall(), and clang::consumed::ConsumedStmtVisitor::VisitReturnStmt().
|
static |
Definition at line 261 of file Consumed.cpp.
References clang::consumed::CS_Consumed, clang::consumed::CS_Unconsumed, clang::Decl::getAttr(), and isTestingFunction().
Referenced by clang::consumed::ConsumedStmtVisitor::handleCall().