clang  6.0.0svn
Classes | Namespaces | Enumerations | Functions
Consumed.cpp File Reference
#include "clang/Analysis/Analyses/Consumed.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/Attr.h"
#include "clang/AST/DeclCXX.h"
#include "clang/AST/ExprCXX.h"
#include "clang/AST/RecursiveASTVisitor.h"
#include "clang/AST/StmtCXX.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/OperatorKinds.h"
#include "clang/Basic/SourceLocation.h"
#include "llvm/ADT/DenseMap.h"
#include <memory>
Include dependency graph for Consumed.cpp:

Go to the source code of this file.

Classes

class  clang::consumed::PropagationInfo
 
class  clang::consumed::ConsumedStmtVisitor
 

Namespaces

 clang
 Dataflow Directional Tag Classes.
 
 clang::consumed
 

Enumerations

enum  clang::consumed::EffectiveOp { clang::consumed::EO_And, clang::consumed::EO_Or }
 

Functions

static SourceLocation getFirstStmtLoc (const CFGBlock *Block)
 
static SourceLocation getLastStmtLoc (const CFGBlock *Block)
 
static ConsumedState invertConsumedUnconsumed (ConsumedState State)
 
static bool isCallableInState (const CallableWhenAttr *CWAttr, ConsumedState State)
 
static bool isConsumableType (const QualType &QT)
 
static bool isAutoCastType (const QualType &QT)
 
static bool isSetOnReadPtrType (const QualType &QT)
 
static bool isKnownState (ConsumedState State)
 
static bool isRValueRef (QualType ParamType)
 
static bool isTestingFunction (const FunctionDecl *FunDecl)
 
static bool isPointerOrRef (QualType ParamType)
 
static ConsumedState mapConsumableAttrState (const QualType QT)
 
static ConsumedState mapParamTypestateAttrState (const ParamTypestateAttr *PTAttr)
 
static ConsumedState mapReturnTypestateAttrState (const ReturnTypestateAttr *RTSAttr)
 
static ConsumedState mapSetTypestateAttrState (const SetTypestateAttr *STAttr)
 
static StringRef stateToString (ConsumedState State)
 
static ConsumedState testsFor (const FunctionDecl *FunDecl)
 
static void clang::consumed::setStateForVarOrTmp (ConsumedStateMap *StateMap, const PropagationInfo &PInfo, ConsumedState State)
 
static void clang::consumed::splitVarStateForIf (const IfStmt *IfNode, const VarTestResult &Test, ConsumedStateMap *ThenStates, ConsumedStateMap *ElseStates)
 
static void clang::consumed::splitVarStateForIfBinOp (const PropagationInfo &PInfo, ConsumedStateMap *ThenStates, ConsumedStateMap *ElseStates)
 

Function Documentation

◆ getFirstStmtLoc()

static SourceLocation getFirstStmtLoc ( const CFGBlock Block)
static

Definition at line 54 of file Consumed.cpp.

Referenced by getLastStmtLoc().

◆ getLastStmtLoc()

static SourceLocation getLastStmtLoc ( const CFGBlock Block)
static

◆ invertConsumedUnconsumed()

static ConsumedState invertConsumedUnconsumed ( ConsumedState  State)
static

◆ isAutoCastType()

static bool isAutoCastType ( const QualType QT)
static

◆ isCallableInState()

static bool isCallableInState ( const CallableWhenAttr *  CWAttr,
ConsumedState  State 
)
static

◆ isConsumableType()

static bool isConsumableType ( const QualType QT)
static

◆ isKnownState()

static bool isKnownState ( ConsumedState  State)
static

◆ isPointerOrRef()

static bool isPointerOrRef ( QualType  ParamType)
static

◆ isRValueRef()

static bool isRValueRef ( QualType  ParamType)
static

◆ isSetOnReadPtrType()

static bool isSetOnReadPtrType ( const QualType QT)
static

◆ isTestingFunction()

static bool isTestingFunction ( const FunctionDecl FunDecl)
static

Definition at line 181 of file Consumed.cpp.

References clang::Decl::hasAttr().

Referenced by clang::consumed::ConsumedStmtVisitor::handleCall(), and testsFor().

◆ mapConsumableAttrState()

static ConsumedState mapConsumableAttrState ( const QualType  QT)
static

◆ mapParamTypestateAttrState()

static ConsumedState mapParamTypestateAttrState ( const ParamTypestateAttr *  PTAttr)
static

◆ mapReturnTypestateAttrState()

static ConsumedState mapReturnTypestateAttrState ( const ReturnTypestateAttr *  RTSAttr)
static

◆ mapSetTypestateAttrState()

static ConsumedState mapSetTypestateAttrState ( const SetTypestateAttr *  STAttr)
static

◆ stateToString()

static StringRef stateToString ( ConsumedState  State)
static

◆ testsFor()

static ConsumedState testsFor ( const FunctionDecl FunDecl)
static