clang API Documentation

Classes | Namespaces | Enumerations | Functions
Consumed.cpp File Reference
#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/Consumed.h"
#include "clang/Analysis/Analyses/PostOrderCFGView.h"
#include "clang/Analysis/AnalysisContext.h"
#include "clang/Analysis/CFG.h"
#include "clang/Basic/OperatorKinds.h"
#include "clang/Basic/SourceLocation.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/raw_ostream.h"
#include <memory>
Include dependency graph for Consumed.cpp:

Go to the source code of this file.

Classes

class  clang::consumed::PropagationInfo
struct  clang::consumed::PropagationInfo::BinTestTy
class  clang::consumed::ConsumedStmtVisitor

Namespaces

namespace  clang
namespace  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)
void clang::consumed::splitVarStateForIf (const IfStmt *IfNode, const VarTestResult &Test, ConsumedStateMap *ThenStates, ConsumedStateMap *ElseStates)
void clang::consumed::splitVarStateForIfBinOp (const PropagationInfo &PInfo, ConsumedStateMap *ThenStates, ConsumedStateMap *ElseStates)

Function Documentation

static SourceLocation getFirstStmtLoc ( const CFGBlock Block) [static]

Definition at line 57 of file Consumed.cpp.

Referenced by getLastStmtLoc().

static SourceLocation getLastStmtLoc ( const CFGBlock Block) [static]
static bool isAutoCastType ( const QualType QT) [static]
static bool isCallableInState ( const CallableWhenAttr *  CWAttr,
ConsumedState  State 
) [static]
static bool isConsumableType ( const QualType QT) [static]
static bool isKnownState ( ConsumedState  State) [static]
static bool isPointerOrRef ( QualType  ParamType) [static]
static bool isRValueRef ( QualType  ParamType) [static]
static bool isSetOnReadPtrType ( const QualType QT) [static]
static bool isTestingFunction ( const FunctionDecl FunDecl) [static]

Definition at line 184 of file Consumed.cpp.

References clang::Decl::hasAttr().

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

static ConsumedState mapConsumableAttrState ( const QualType  QT) [static]
static ConsumedState mapParamTypestateAttrState ( const ParamTypestateAttr *  PTAttr) [static]
static ConsumedState mapReturnTypestateAttrState ( const ReturnTypestateAttr *  RTSAttr) [static]
static ConsumedState mapSetTypestateAttrState ( const SetTypestateAttr *  STAttr) [static]
static StringRef stateToString ( ConsumedState  State) [static]
static ConsumedState testsFor ( const FunctionDecl FunDecl) [static]