clang  8.0.0svn
Macros | Typedefs | Functions
CallEvent.cpp File Reference
#include "clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/Decl.h"
#include "clang/AST/DeclBase.h"
#include "clang/AST/DeclCXX.h"
#include "clang/AST/DeclObjC.h"
#include "clang/AST/Expr.h"
#include "clang/AST/ExprCXX.h"
#include "clang/AST/ExprObjC.h"
#include "clang/AST/ParentMap.h"
#include "clang/AST/Stmt.h"
#include "clang/AST/Type.h"
#include "clang/Analysis/AnalysisDeclContext.h"
#include "clang/Analysis/CFG.h"
#include "clang/Analysis/CFGStmtMap.h"
#include "clang/Analysis/ProgramPoint.h"
#include "clang/CrossTU/CrossTranslationUnit.h"
#include "clang/Basic/IdentifierTable.h"
#include "clang/Basic/LLVM.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Basic/Specifiers.h"
#include "clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/DynamicTypeInfo.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/DynamicTypeMap.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/ProgramState_Fwd.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/SVals.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/Store.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/None.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/PointerIntPair.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/raw_ostream.h"
#include <cassert>
#include <utility>
Include dependency graph for CallEvent.cpp:

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "static-analyzer-call-event"
 

Typedefs

using ObjCMessageDataTy = llvm::PointerIntPair< const PseudoObjectExpr *, 2 >
 

Functions

static bool isCallback (QualType T)
 
static bool isVoidPointerToNonConst (QualType T)
 
static bool isPointerToConst (QualType Ty)
 Returns true if a type is a pointer-to-const or reference-to-const with no further indirection. More...
 
static void findPtrToConstParams (llvm::SmallSet< unsigned, 4 > &PreserveArgs, const CallEvent &Call)
 
static void addParameterValuesToBindings (const StackFrameContext *CalleeCtx, CallEvent::BindingsTy &Bindings, SValBuilder &SVB, const CallEvent &Call, ArrayRef< ParmVarDecl *> parameters)
 
static const ExprgetSyntacticFromForPseudoObjectExpr (const PseudoObjectExpr *POE)
 
static const ObjCMethodDeclfindDefiningRedecl (const ObjCMethodDecl *MD)
 
static bool isCallToSelfClass (const ObjCMessageExpr *ME)
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "static-analyzer-call-event"

Definition at line 65 of file CallEvent.cpp.

Typedef Documentation

◆ ObjCMessageDataTy

using ObjCMessageDataTy = llvm::PointerIntPair<const PseudoObjectExpr *, 2>

Definition at line 921 of file CallEvent.cpp.

Function Documentation

◆ addParameterValuesToBindings()

static void addParameterValuesToBindings ( const StackFrameContext CalleeCtx,
CallEvent::BindingsTy Bindings,
SValBuilder SVB,
const CallEvent Call,
ArrayRef< ParmVarDecl *>  parameters 
)
static

◆ findDefiningRedecl()

static const ObjCMethodDecl* findDefiningRedecl ( const ObjCMethodDecl MD)
static

Definition at line 1061 of file CallEvent.cpp.

References clang::ObjCMethodDecl::hasBody().

◆ findPtrToConstParams()

static void findPtrToConstParams ( llvm::SmallSet< unsigned, 4 > &  PreserveArgs,
const CallEvent Call 
)
static

Definition at line 248 of file CallEvent.cpp.

Referenced by clang::ento::CallEvent::invalidateRegions().

◆ getSyntacticFromForPseudoObjectExpr()

static const Expr* getSyntacticFromForPseudoObjectExpr ( const PseudoObjectExpr POE)
static

◆ isCallback()

static bool isCallback ( QualType  T)
static

◆ isCallToSelfClass()

static bool isCallToSelfClass ( const ObjCMessageExpr ME)
static

◆ isPointerToConst()

static bool isPointerToConst ( QualType  Ty)
static

Returns true if a type is a pointer-to-const or reference-to-const with no further indirection.

Definition at line 234 of file CallEvent.cpp.

References clang::Type::getPointeeType(), clang::Type::isAnyPointerType(), and clang::QualType::isConstQualified().

◆ isVoidPointerToNonConst()

static bool isVoidPointerToNonConst ( QualType  T)
static