clang: include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15#ifndef LLVM_CLANG_STATICANALYZER_CORE_PATHSENSITIVE_CALLEVENT_H

16#define LLVM_CLANG_STATICANALYZER_CORE_PATHSENSITIVE_CALLEVENT_H

17

35#include "llvm/ADT/ArrayRef.h"

36#include "llvm/ADT/IntrusiveRefCntPtr.h"

37#include "llvm/ADT/PointerIntPair.h"

38#include "llvm/ADT/PointerUnion.h"

39#include "llvm/ADT/STLExtras.h"

40#include "llvm/ADT/SmallVector.h"

41#include "llvm/ADT/StringRef.h"

42#include "llvm/ADT/iterator_range.h"

43#include "llvm/Support/Allocator.h"

44#include "llvm/Support/Casting.h"

45#include "llvm/Support/ErrorHandling.h"

46#include

47#include

48#include

49#include

50

52

57

58namespace ento {

59

79

80class CallEvent;

81

82template

84public:

87

88

89

91

95

96

97

99 return this->get();

100 }

101};

102

103

104

105

106

107

108

109

111

112

113 const Decl *D = nullptr;

114

115

116

117

118

120

121

122

123 const bool Foreign = false;

124

125public:

130

133

134

135

136

138

139

140

142};

143

144

145

146

147

148

149

150

151

152

154public:

156

157private:

160 llvm::PointerUnion<const Expr *, const Decl *> Origin;

162 mutable std::optional Foreign;

163

164protected:

165

167

168

169

170

172

173private:

175

176 mutable unsigned RefCount = 0;

177

178 void Retain() const { ++RefCount; }

179 void Release() const;

180

181protected:

183

186 : State(std::move(state)), LCtx(lctx), Origin(E), ElemRef(ElemRef) {}

187

190 : State(std::move(state)), LCtx(lctx), Origin(D), ElemRef(ElemRef) {}

191

192

194 : State(Original.State), LCtx(Original.LCtx), Origin(Original.Origin),

195 ElemRef(Original.ElemRef), Data(Original.Data),

197

198

199 virtual void cloneTo(void *Dest) const = 0;

200

201

205

207

208

209

210 virtual void

213

214

215

216

217

218

219

220

221

223

224public:

227

228

231

232

233

235 return Origin.dyn_cast<const Decl *>();

236 }

237

239 assert(Foreign && "Foreign must be set before querying");

240 return *Foreign;

241 }

243

244

245

247 return getState()->getStateManager().getContext();

248 }

249

250

252

254 return ElemRef;

255 }

256

257

258

260

261

262

264 return Origin.dyn_cast<const Expr *>();

265 }

266

267

268

269

270

271

273

274

277 if (!D)

278 return false;

279

283 getState()->getStateManager().getContext().getSourceManager();

285 }

286

287

288

289 if (const auto *FD = dyn_cast(D))

290 return FD->isOverloadedOperator() && FD->isImplicit() && FD->isGlobal();

291

292 return false;

293 }

294

295

296

300

301

303

304

305

306 virtual const Expr *getArgExpr(unsigned Index) const { return nullptr; }

307

308

309

310

312

313

315

316

317

318

319

321

322

323

325

326

328

329

331

332

333

334

335

336

338

339

340

341

342

343

344

345

346

347

348

349

350

351

352

353

354

355 bool isGlobalCFunction(StringRef SpecificName = StringRef()) const;

356

357

358

359

360

361

362

363

365 const auto *ND = dyn_cast_or_null(getDecl());

366 if (!ND)

367 return nullptr;

368 return ND->getIdentifier();

369 }

370

371

374

375

376

379

382

383

384

387

388

389 template

391

392

396

397

398

400

401

402

403

405

406

407

408

410

411

412

414

415

416

417

418

420

421

422

423

425 unsigned BlockCount) const;

426

427

428

429

430

431

432

434

437 .has_value();

438 }

439

440

441

442

443

444 virtual std::optional

446 return ASTArgumentIndex;

447 }

448

449

450

451

453 return CallArgumentIndex;

454 }

455

456

457

458

460

461

462

464

465

467

468

469

470

472

473

474private:

475 struct GetTypeFn {

477 };

478

479public:

480

481

482

483

484

486

488 llvm::mapped_iterator<ArrayRef<ParmVarDecl *>::iterator, GetTypeFn>;

489

490

491

492

493

494

496 return llvm::map_iterator(parameters().begin(), GetTypeFn());

497 }

498

500 return llvm::map_iterator(parameters().end(), GetTypeFn());

501 }

502

503

504 void dump(raw_ostream &Out) const;

505 void dump() const;

506};

507

508

509

511protected:

521

522public:

523

524

528

530

532

535

537

542};

543

544

545

546

549

550protected:

556

557 void cloneTo(void *Dest) const override {

559 }

560

561public:

565

567

569

571

575

577 StringRef getKindAsString() const override { return "SimpleFunctionCall"; }

578

582};

583

584

585

586

589

590protected:

595

597

601

602public:

606

608

612

613

614

615

617

620 if (!BR)

621 return nullptr;

623 }

624

627 if (!BD)

628 return false;

629

631 }

632

633

634

638 assert(BR && "Block converted from lambda must have a block region");

639

641 assert(!ReferencedVars.empty());

642 return ReferencedVars.begin().getCapturedRegion();

643 }

644

648

649

650

651

652

653

654

655

656

657

658

659

660

661

662

663

664

665

666

667

671

673 }

674

676

679

681

684

686};

687

688

689

691protected:

701

705

706

707

708

710

711public:

712

714

715

717

719

721

724

729};

730

731

732

733

734

735

736

737

738

739

740

741

742

743

744

745

746

749

750protected:

756

757 void cloneTo(void *Dest) const override {

759 }

760

761public:

765

771

776

777 std::optional

779

780 if (ASTArgumentIndex == 0)

781 return std::nullopt;

782 return ASTArgumentIndex - 1;

783 }

784

786

787 return CallArgumentIndex + 1;

788 }

789

793

795 StringRef getKindAsString() const override { return "CXXStaticOperatorCall"; }

796

800};

801

802

803

804

807

808protected:

814

816

817public:

821

824 return CE->getNumArgs();

825 return 0;

826 }

827

831

833

835

837 StringRef getKindAsString() const override { return "CXXMemberCall"; }

838

842};

843

844

845

846

847

850

851protected:

857

858 void cloneTo(void *Dest) const override {

860 }

861

862public:

866

870

874

876

878 StringRef getKindAsString() const override { return "CXXMemberOperatorCall"; }

879

883

884 std::optional

886

887

888 return (ASTArgumentIndex > 0)

889 ? std::optional(ASTArgumentIndex - 1)

890 : std::nullopt;

891 }

892

894

895

896 return CallArgumentIndex + 1;

897 }

898

902};

903

904

905

906

907

910

911protected:

912 using DtorDataTy = llvm::PointerIntPair<const MemRegion *, 1, bool>;

913

914

915

916

917

918

919

920

921

922

923

924

925

926

935

937

938 void cloneTo(void *Dest) const override {

940 }

941

942public:

944 unsigned getNumArgs() const override { return 0; }

945

947

948

950

951

953 return DtorDataTy::getFromOpaqueValue(Data).getInt();

954 }

955

957 StringRef getKindAsString() const override { return "CXXDestructorCall"; }

958

962};

963

964

965

967protected:

976

980

983

984public:

985

987

992};

993

994

995

996

999

1000protected:

1001

1002

1003

1004

1005

1006

1007

1008

1009

1010

1011

1016

1018

1022

1023public:

1027

1031

1033

1037

1039 StringRef getKindAsString() const override { return "CXXConstructorCall"; }

1040

1044};

1045

1046

1047

1048

1049

1050

1051

1052

1053

1054

1055

1056

1057

1058

1059

1060

1061

1062

1063

1064

1065

1068

1069protected:

1075

1077 default;

1078

1082

1083public:

1087

1091

1092

1093

1095

1096

1097

1098

1102

1106

1110

1116

1119 return "CXXInheritedConstructorCall";

1120 }

1121

1125};

1126

1127

1128

1129

1132

1133protected:

1139

1143

1144public:

1148

1152

1157

1158

1159

1160

1164

1168

1170

1174

1176 assert(isArray() && "The allocator call doesn't allocate and array!");

1177

1179 }

1180

1182

1184 return nullptr;

1186 }

1187

1188

1189

1190

1191

1195

1197 StringRef getKindAsString() const override { return "CXXAllocatorCall"; }

1198

1202};

1203

1204

1205

1206

1207

1208

1209

1210

1211

1212

1213

1216

1217protected:

1223

1227

1228public:

1232

1236

1238

1243

1245 StringRef getKindAsString() const override { return "CXXDeallocatorCall"; }

1246

1250};

1251

1252

1253

1254

1255

1257

1258

1259

1260

1263

1264 const PseudoObjectExpr *getContainingPseudoObjectExpr() const;

1265

1266protected:

1270 : CallEvent(Msg, St, LCtx, ElemRef) {

1271 Data = nullptr;

1272 }

1273

1275

1277

1281

1282

1285

1286public:

1290

1294

1296

1300

1304

1308

1310

1312

1313

1315

1316

1317

1318

1319

1323

1324

1326

1327

1328

1330

1331

1332

1336 llvm_unreachable("This is not a pseudo-object access!");

1341 }

1342 llvm_unreachable("Unknown message kind");

1343 }

1344

1345

1346

1347

1349

1351

1353

1356

1358

1361

1365};

1366

1367

1368

1369

1370

1371

1372

1373

1376

1377 llvm::BumpPtrAllocator &Alloc;

1379

1381

1382 void reclaim(const void *Memory) {

1383 Cache.push_back(const_cast<void *>(Memory));

1384 }

1385

1386

1387 void *allocate() {

1388 if (Cache.empty())

1389 return Alloc.Allocate();

1390 else

1391 return Cache.pop_back_val();

1392 }

1393

1394 template <typename T, typename Arg>

1397 static_assert(sizeof(T) == sizeof(CallEventTemplateTy),

1398 "CallEvent subclasses are not all the same size");

1399 return new (allocate()) T(A, St, LCtx, ElemRef);

1400 }

1401

1402 template <typename T, typename Arg1, typename Arg2>

1403 T *create(Arg1 A1, Arg2 A2, ProgramStateRef St, const LocationContext *LCtx,

1405 static_assert(sizeof(T) == sizeof(CallEventTemplateTy),

1406 "CallEvent subclasses are not all the same size");

1407 return new (allocate()) T(A1, A2, St, LCtx, ElemRef);

1408 }

1409

1410 template <typename T, typename Arg1, typename Arg2, typename Arg3>

1413 static_assert(sizeof(T) == sizeof(CallEventTemplateTy),

1414 "CallEvent subclasses are not all the same size");

1415 return new (allocate()) T(A1, A2, A3, St, LCtx, ElemRef);

1416 }

1417

1418 template <typename T, typename Arg1, typename Arg2, typename Arg3,

1419 typename Arg4>

1420 T *create(Arg1 A1, Arg2 A2, Arg3 A3, Arg4 A4, ProgramStateRef St,

1422 static_assert(sizeof(T) == sizeof(CallEventTemplateTy),

1423 "CallEvent subclasses are not all the same size");

1424 return new (allocate()) T(A1, A2, A3, A4, St, LCtx, ElemRef);

1425 }

1426

1427public:

1429

1430

1431 CallEventRef<> getCaller(const StackFrameContext *CalleeCtx,

1433

1434

1435

1437 const LocationContext *LC,

1439

1441 const LocationContext *LCtx,

1443

1444 CallEventRef

1448 return create(E, State, LCtx, ElemRef);

1449 }

1450

1455 return create(E, Target, State, LCtx, ElemRef);

1456 }

1457

1463 return create(E, Target, State, LCtx, ElemRef);

1464 }

1465

1471 return create(DD, Trigger, Target, IsBase, State, LCtx,

1472 ElemRef);

1473 }

1474

1479 return create(E, State, LCtx, ElemRef);

1480 }

1481

1486 return create(E, State, LCtx, ElemRef);

1487 }

1488};

1489

1490template

1492 assert(isa(*this) && "Cloning to unrelated type");

1493 static_assert(sizeof(T) == sizeof(CallEvent),

1494 "Subclasses may not add fields");

1495

1496 if (NewState == State)

1498

1499 CallEventManager &Mgr = State->getStateManager().getCallEventManager();

1500 T *Copy = static_cast<T *>(Mgr.allocate());

1502 assert(Copy->getKind() == this->getKind() && "Bad copy");

1503

1504 Copy->State = NewState;

1505 return Copy;

1506}

1507

1508inline void CallEvent::Release() const {

1509 assert(RefCount > 0 && "Reference count is already zero.");

1510 --RefCount;

1511

1512 if (RefCount > 0)

1513 return;

1514

1515 CallEventManager &Mgr = State->getStateManager().getCallEventManager();

1516 Mgr.reclaim(this);

1517

1519}

1520

1521}

1522

1523}

1524

1525namespace llvm {

1526

1527

1528template struct simplify_type<clang::ento::CallEventRef> {

1530

1532 return Val.get();

1533 }

1534};

1535

1536}

1537

1538#endif

Defines the C++ Decl subclasses, other than those for templates (found in DeclTemplate....

Defines the clang::Expr interface and subclasses for C++ expressions.

Defines the clang::IdentifierInfo, clang::IdentifierTable, and clang::Selector interfaces.

Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified.

ArrayRef< SVal > ValueList

llvm::SmallVector< std::pair< const MemRegion *, SVal >, 4 > Bindings

Defines the clang::SourceLocation class and associated facilities.

Defines the SourceManager interface.

C Language Family Type Representation.

Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...

AnalysisDeclContext contains the context data for the function, method or block under analysis.

Represents a block literal declaration, which is like an unnamed FunctionDecl.

bool isConversionFromLambda() const

ElementRefImpl< true > ConstCFGElementRef

Represents a call to a C++ constructor.

Expr * getArg(unsigned Arg)

Return the specified argument.

CXXConstructorDecl * getConstructor() const

Get the constructor that this expression will (ultimately) call.

unsigned getNumArgs() const

Return the number of arguments to the constructor call.

Represents a C++ constructor within a class.

Represents a delete expression for memory deallocation and destructor calls, e.g.

FunctionDecl * getOperatorDelete() const

Represents a C++ destructor within a class.

Represents a call to an inherited base class constructor from an inheriting constructor.

CXXConstructorDecl * getConstructor() const

Get the constructor that this expression will call.

Represents a call to a member function that may be written either with member call syntax (e....

Represents a static or instance method of a struct/union/class.

Represents a new-expression for memory allocation and constructor calls, e.g: "new CXXNewExpr(foo)".

unsigned getNumImplicitArgs() const

std::optional< Expr * > getArraySize()

This might return std::nullopt even if isArray() returns true, since there might not be an array size...

Expr * getPlacementArg(unsigned I)

unsigned getNumPlacementArgs() const

FunctionDecl * getOperatorNew() const

A call to an overloaded operator written using operator syntax.

OverloadedOperatorKind getOperator() const

Returns the kind of overloaded operator that this expression refers to.

Represents a C++ struct/union/class.

CXXMethodDecl * getLambdaCallOperator() const

Retrieve the lambda call operator of the closure type if this is a closure type.

CallExpr - Represents a function call (C99 6.5.2.2, C++ [expr.call]).

Expr * getArg(unsigned Arg)

getArg - Return the specified argument.

unsigned getNumArgs() const

getNumArgs - Return the number of actual arguments to this call.

ConstructionContext's subclasses describe different ways of constructing an object in C++.

Decl - This represents one declaration (or definition), e.g.

SourceLocation getLocation() const

This represents one expression.

Represents a function declaration or definition.

unsigned getNumParams() const

Return the number of parameters this function must have based on its FunctionType.

One of these records is kept for each identifier that is lexed.

It wraps the AnalysisDeclContext to represent both the call stack with the help of StackFrameContext ...

Represents an ObjC class declaration.

An expression that sends a message to the given Objective-C object or class.

Expr * getArg(unsigned Arg)

getArg - Return the specified argument.

ObjCMethodFamily getMethodFamily() const

Selector getSelector() const

bool isInstanceMessage() const

Determine whether this is an instance message to either a computed object or to super.

ObjCInterfaceDecl * getReceiverInterface() const

Retrieve the Objective-C interface to which this message is being directed, if known.

const ObjCMethodDecl * getMethodDecl() const

unsigned getNumArgs() const

Return the number of actual arguments in this message, not counting the receiver.

ObjCMethodDecl - Represents an instance or class method declaration.

Represents one property declaration in an Objective-C interface.

Represents a parameter to a function.

ProgramPoints can be "tagged" as representing points specific to a given analysis entity.

PseudoObjectExpr - An expression which accesses a pseudo-object l-value.

A (possibly-)qualified type.

Smart pointer class that efficiently represents Objective-C method names.

Encodes a location in the source.

This class handles loading and caching of source files into memory.

A trivial tuple used to represent a source range.

It represents a stack frame of the call stack (based on CallEvent).

Stmt - This represents one statement.

SourceLocation getEndLoc() const LLVM_READONLY

SourceRange getSourceRange() const LLVM_READONLY

SourceLocation tokens are not useful in isolation - they are low level value objects created/interpre...

CXXRecordDecl * getAsCXXRecordDecl() const

Retrieves the CXXRecordDecl that this type refers to, either because the type is a RecordType or beca...

Represents a variable declaration or definition.

void getInitialStackFrameContents(const StackFrameContext *CalleeCtx, BindingsTy &Bindings) const override

Populates the given SmallVector with the bindings in the callee's stack frame at the start of this ca...

AnyCXXConstructorCall(const Expr *E, const MemRegion *Target, ProgramStateRef St, const LocationContext *LCtx, CFGBlock::ConstCFGElementRef ElemRef)

Definition CallEvent.h:968

void getExtraInvalidatedValues(ValueList &Values, RegionAndSymbolInvalidationTraits *ETraits) const override

Used to specify non-argument regions that will be invalidated as a result of this call.

SVal getCXXThisVal() const

Returns the value of the implicit 'this' object.

static bool classof(const CallEvent *Call)

Definition CallEvent.h:988

const FunctionDecl * getDecl() const override

Returns the declaration of the function or method that will be called.

Definition CallEvent.h:525

AnyFunctionCall(const Expr *E, ProgramStateRef St, const LocationContext *LCtx, CFGBlock::ConstCFGElementRef ElemRef)

Definition CallEvent.h:512

ArrayRef< ParmVarDecl * > parameters() const override

Return call's formal parameters.

void getInitialStackFrameContents(const StackFrameContext *CalleeCtx, BindingsTy &Bindings) const override

Populates the given SmallVector with the bindings in the callee's stack frame at the start of this ca...

static bool classof(const CallEvent *CA)

Definition CallEvent.h:538

AnyFunctionCall(const Decl *D, ProgramStateRef St, const LocationContext *LCtx, CFGBlock::ConstCFGElementRef ElemRef)

Definition CallEvent.h:516

bool argumentsMayEscape() const override

Returns true if any of the arguments are known to escape to long- term storage, even if this method w...

AnyFunctionCall(const AnyFunctionCall &Other)=default

RuntimeDefinition getRuntimeDefinition() const override

Returns the definition of the function or method that will be called.

const BlockDecl * getDecl() const override

Returns the declaration of the function or method that will be called.

Definition CallEvent.h:618

void cloneTo(void *Dest) const override

Copies this CallEvent, with vtable intact, into a new block of memory.

Definition CallEvent.h:596

bool argumentsMayEscape() const override

Returns true if any of the arguments are known to escape to long- term storage, even if this method w...

Definition CallEvent.h:675

unsigned getNumArgs() const override

Returns the number of arguments (explicit and implicit).

Definition CallEvent.h:607

RuntimeDefinition getRuntimeDefinition() const override

Returns the definition of the function or method that will be called.

Definition CallEvent.h:645

const BlockDataRegion * getBlockRegion() const

Returns the region associated with this instance of the block.

bool isConversionFromLambda() const

Definition CallEvent.h:625

friend class CallEventManager

Definition CallEvent.h:588

ArrayRef< ParmVarDecl * > parameters() const override

Return call's formal parameters.

Kind getKind() const override

Returns the kind of call this is.

Definition CallEvent.h:682

void getExtraInvalidatedValues(ValueList &Values, RegionAndSymbolInvalidationTraits *ETraits) const override

Used to specify non-argument regions that will be invalidated as a result of this call.

const VarRegion * getRegionStoringCapturedLambda() const

For a block converted from a C++ lambda, returns the block VarRegion for the variable holding the cap...

Definition CallEvent.h:635

const Expr * getArgExpr(unsigned Index) const override

Returns the expression associated with a given argument.

Definition CallEvent.h:609

BlockCall(const CallExpr *CE, ProgramStateRef St, const LocationContext *LCtx, CFGBlock::ConstCFGElementRef ElemRef)

Definition CallEvent.h:591

BlockCall(const BlockCall &Other)=default

static bool classof(const CallEvent *CA)

Definition CallEvent.h:685

void getInitialStackFrameContents(const StackFrameContext *CalleeCtx, BindingsTy &Bindings) const override

Populates the given SmallVector with the bindings in the callee's stack frame at the start of this ca...

StringRef getKindAsString() const override

Definition CallEvent.h:683

const CallExpr * getOriginExpr() const override

Returns the expression whose value will be the result of this call.

Definition CallEvent.h:603

BlockDataRegion - A region that represents a block instance.

LLVM_ATTRIBUTE_RETURNS_NONNULL const BlockDecl * getDecl() const

llvm::iterator_range< referenced_vars_iterator > referenced_vars() const

unsigned getNumArgs() const override

Returns the number of arguments (explicit and implicit).

Definition CallEvent.h:1165

unsigned getNumImplicitArgs() const

Number of non-placement arguments to the call.

Definition CallEvent.h:1161

const CXXNewExpr * getOriginExpr() const override

Returns the expression whose value will be the result of this call.

Definition CallEvent.h:1145

Kind getKind() const override

Returns the kind of call this is.

Definition CallEvent.h:1196

const Expr * getArgExpr(unsigned Index) const override

Returns the expression associated with a given argument.

Definition CallEvent.h:1181

std::optional< const clang::Expr * > getArraySizeExpr() const

Definition CallEvent.h:1171

friend class CallEventManager

Definition CallEvent.h:1131

static bool classof(const CallEvent *CE)

Definition CallEvent.h:1199

const Expr * getPlacementArgExpr(unsigned Index) const

Number of placement arguments to the operator new() call.

Definition CallEvent.h:1192

CXXAllocatorCall(const CXXAllocatorCall &Other)=default

SVal getArraySizeVal() const

Definition CallEvent.h:1175

const FunctionDecl * getDecl() const override

Returns the declaration of the function or method that will be called.

Definition CallEvent.h:1149

StringRef getKindAsString() const override

Definition CallEvent.h:1197

SVal getObjectUnderConstruction() const

Definition CallEvent.h:1153

CXXAllocatorCall(const CXXNewExpr *E, ProgramStateRef St, const LocationContext *LCtx, CFGBlock::ConstCFGElementRef ElemRef)

Definition CallEvent.h:1134

bool isArray() const

Definition CallEvent.h:1169

void cloneTo(void *Dest) const override

Copies this CallEvent, with vtable intact, into a new block of memory.

Definition CallEvent.h:1140

CXXConstructorCall(const CXXConstructorCall &Other)=default

const CXXConstructorDecl * getDecl() const override

Returns the declaration of the function or method that will be called.

Definition CallEvent.h:1028

friend class CallEventManager

Definition CallEvent.h:998

const CXXConstructExpr * getOriginExpr() const override

Returns the expression whose value will be the result of this call.

Definition CallEvent.h:1024

Kind getKind() const override

Returns the kind of call this is.

Definition CallEvent.h:1038

void cloneTo(void *Dest) const override

Copies this CallEvent, with vtable intact, into a new block of memory.

Definition CallEvent.h:1019

const Expr * getArgExpr(unsigned Index) const override

Returns the expression associated with a given argument.

Definition CallEvent.h:1034

unsigned getNumArgs() const override

Returns the number of arguments (explicit and implicit).

Definition CallEvent.h:1032

CXXConstructorCall(const CXXConstructExpr *CE, const MemRegion *Target, ProgramStateRef St, const LocationContext *LCtx, CFGBlock::ConstCFGElementRef ElemRef)

Creates a constructor call.

Definition CallEvent.h:1012

StringRef getKindAsString() const override

Definition CallEvent.h:1039

static bool classof(const CallEvent *CA)

Definition CallEvent.h:1041

Kind getKind() const override

Returns the kind of call this is.

Definition CallEvent.h:1244

const CXXDeleteExpr * getOriginExpr() const override

Returns the expression whose value will be the result of this call.

Definition CallEvent.h:1229

const Expr * getArgExpr(unsigned Index) const override

Returns the expression associated with a given argument.

Definition CallEvent.h:1239

unsigned getNumArgs() const override

Returns the number of arguments (explicit and implicit).

Definition CallEvent.h:1237

friend class CallEventManager

Definition CallEvent.h:1215

CXXDeallocatorCall(const CXXDeallocatorCall &Other)=default

static bool classof(const CallEvent *CE)

Definition CallEvent.h:1247

StringRef getKindAsString() const override

Definition CallEvent.h:1245

const FunctionDecl * getDecl() const override

Returns the declaration of the function or method that will be called.

Definition CallEvent.h:1233

void cloneTo(void *Dest) const override

Copies this CallEvent, with vtable intact, into a new block of memory.

Definition CallEvent.h:1224

CXXDeallocatorCall(const CXXDeleteExpr *E, ProgramStateRef St, const LocationContext *LCtx, CFGBlock::ConstCFGElementRef ElemRef)

Definition CallEvent.h:1218

static bool classof(const CallEvent *CA)

Definition CallEvent.h:959

SVal getCXXThisVal() const override

Returns the value of the implicit 'this' object.

RuntimeDefinition getRuntimeDefinition() const override

Returns the definition of the function or method that will be called.

bool isBaseDestructor() const

Returns true if this is a call to a base class destructor.

Definition CallEvent.h:952

friend class CallEventManager

Definition CallEvent.h:909

unsigned getNumArgs() const override

Returns the number of arguments (explicit and implicit).

Definition CallEvent.h:944

llvm::PointerIntPair< const MemRegion *, 1, bool > DtorDataTy

Definition CallEvent.h:912

CXXDestructorCall(const CXXDestructorCall &Other)=default

SourceRange getSourceRange() const override

Returns a source range for the entire call, suitable for outputting in diagnostics.

Definition CallEvent.h:943

CXXDestructorCall(const CXXDestructorDecl *DD, const Stmt *Trigger, const MemRegion *Target, bool IsBaseDestructor, ProgramStateRef St, const LocationContext *LCtx, CFGBlock::ConstCFGElementRef ElemRef)

Creates an implicit destructor.

Definition CallEvent.h:927

void cloneTo(void *Dest) const override

Copies this CallEvent, with vtable intact, into a new block of memory.

Definition CallEvent.h:938

StringRef getKindAsString() const override

Definition CallEvent.h:957

Kind getKind() const override

Returns the kind of call this is.

Definition CallEvent.h:956

CXXInheritedConstructorCall(const CXXInheritedCtorInitExpr *CE, const MemRegion *Target, ProgramStateRef St, const LocationContext *LCtx, CFGBlock::ConstCFGElementRef ElemRef)

Definition CallEvent.h:1070

CXXInheritedConstructorCall(const CXXInheritedConstructorCall &Other)=default

static bool classof(const CallEvent *CA)

Definition CallEvent.h:1122

const CXXInheritedCtorInitExpr * getOriginExpr() const override

Returns the expression whose value will be the result of this call.

Definition CallEvent.h:1084

friend class CallEventManager

Definition CallEvent.h:1067

const StackFrameContext * getInheritingStackFrame() const

Obtain the stack frame of the inheriting constructor.

StringRef getKindAsString() const override

Definition CallEvent.h:1118

Kind getKind() const override

Returns the kind of call this is.

Definition CallEvent.h:1117

unsigned getNumArgs() const override

Returns the number of arguments (explicit and implicit).

Definition CallEvent.h:1103

const Expr * getArgExpr(unsigned Index) const override

Returns the expression associated with a given argument.

Definition CallEvent.h:1107

const CXXConstructorDecl * getDecl() const override

Returns the declaration of the function or method that will be called.

Definition CallEvent.h:1088

const CXXConstructExpr * getInheritingConstructor() const

Obtain the CXXConstructExpr for the sub-class that inherited the current constructor (possibly indire...

Definition CallEvent.h:1099

void cloneTo(void *Dest) const override

Copies this CallEvent, with vtable intact, into a new block of memory.

Definition CallEvent.h:1079

SVal getArgSVal(unsigned Index) const override

Returns the value of a given argument at the time of the call.

Definition CallEvent.h:1111

std::pair< const CXXRecordDecl *, bool > getDeclForDynamicType() const

Returns the decl refered to by the "dynamic type" of the current object and if the class can be a sub...

CXXInstanceCall(const CXXInstanceCall &Other)=default

CXXInstanceCall(const CallExpr *CE, ProgramStateRef St, const LocationContext *LCtx, CFGBlock::ConstCFGElementRef ElemRef)

Definition CallEvent.h:692

CXXInstanceCall(const FunctionDecl *D, ProgramStateRef St, const LocationContext *LCtx, CFGBlock::ConstCFGElementRef ElemRef)

Definition CallEvent.h:696

void getExtraInvalidatedValues(ValueList &Values, RegionAndSymbolInvalidationTraits *ETraits) const override

Used to specify non-argument regions that will be invalidated as a result of this call.

virtual SVal getCXXThisVal() const

Returns the value of the implicit 'this' object.

static bool classof(const CallEvent *CA)

Definition CallEvent.h:725

RuntimeDefinition getRuntimeDefinition() const override

Returns the definition of the function or method that will be called.

virtual const Expr * getCXXThisExpr() const

Returns the expression representing the implicit 'this' object.

Definition CallEvent.h:713

const FunctionDecl * getDecl() const override

Returns the declaration of the function or method that will be called.

void getInitialStackFrameContents(const StackFrameContext *CalleeCtx, BindingsTy &Bindings) const override

Populates the given SmallVector with the bindings in the callee's stack frame at the start of this ca...

const Expr * getArgExpr(unsigned Index) const override

Returns the expression associated with a given argument.

Definition CallEvent.h:828

CXXMemberCall(const CXXMemberCall &Other)=default

const CXXMemberCallExpr * getOriginExpr() const override

Returns the expression whose value will be the result of this call.

Definition CallEvent.h:818

static bool classof(const CallEvent *CA)

Definition CallEvent.h:839

friend class CallEventManager

Definition CallEvent.h:806

unsigned getNumArgs() const override

Returns the number of arguments (explicit and implicit).

Definition CallEvent.h:822

CXXMemberCall(const CXXMemberCallExpr *CE, ProgramStateRef St, const LocationContext *LCtx, CFGBlock::ConstCFGElementRef ElemRef)

Definition CallEvent.h:809

const Expr * getCXXThisExpr() const override

Returns the expression representing the implicit 'this' object.

StringRef getKindAsString() const override

Definition CallEvent.h:837

void cloneTo(void *Dest) const override

Copies this CallEvent, with vtable intact, into a new block of memory.

Definition CallEvent.h:815

RuntimeDefinition getRuntimeDefinition() const override

Returns the definition of the function or method that will be called.

Kind getKind() const override

Returns the kind of call this is.

Definition CallEvent.h:836

std::optional< unsigned > getAdjustedParameterIndex(unsigned ASTArgumentIndex) const override

Some calls have parameter numbering mismatched from argument numbering.

Definition CallEvent.h:885

OverloadedOperatorKind getOverloadedOperator() const

Definition CallEvent.h:899

const Expr * getArgExpr(unsigned Index) const override

Returns the expression associated with a given argument.

Definition CallEvent.h:871

unsigned getNumArgs() const override

Returns the number of arguments (explicit and implicit).

Definition CallEvent.h:867

Kind getKind() const override

Returns the kind of call this is.

Definition CallEvent.h:877

StringRef getKindAsString() const override

Definition CallEvent.h:878

const Expr * getCXXThisExpr() const override

Returns the expression representing the implicit 'this' object.

void cloneTo(void *Dest) const override

Copies this CallEvent, with vtable intact, into a new block of memory.

Definition CallEvent.h:858

CXXMemberOperatorCall(const CXXOperatorCallExpr *CE, ProgramStateRef St, const LocationContext *LCtx, CFGBlock::ConstCFGElementRef ElemRef)

Definition CallEvent.h:852

friend class CallEventManager

Definition CallEvent.h:849

const CXXOperatorCallExpr * getOriginExpr() const override

Returns the expression whose value will be the result of this call.

Definition CallEvent.h:863

CXXMemberOperatorCall(const CXXMemberOperatorCall &Other)=default

unsigned getASTArgumentIndex(unsigned CallArgumentIndex) const override

Some call event sub-classes conveniently adjust mismatching AST indices to match parameter indices.

Definition CallEvent.h:893

static bool classof(const CallEvent *CA)

Definition CallEvent.h:880

std::optional< unsigned > getAdjustedParameterIndex(unsigned ASTArgumentIndex) const override

Some calls have parameter numbering mismatched from argument numbering.

Definition CallEvent.h:778

CXXStaticOperatorCall(const CXXStaticOperatorCall &Other)=default

void cloneTo(void *Dest) const override

Copies this CallEvent, with vtable intact, into a new block of memory.

Definition CallEvent.h:757

OverloadedOperatorKind getOverloadedOperator() const

Definition CallEvent.h:790

unsigned getNumArgs() const override

Returns the number of arguments (explicit and implicit).

Definition CallEvent.h:766

friend class CallEventManager

Definition CallEvent.h:748

StringRef getKindAsString() const override

Definition CallEvent.h:795

Kind getKind() const override

Returns the kind of call this is.

Definition CallEvent.h:794

const Expr * getArgExpr(unsigned Index) const override

Returns the expression associated with a given argument.

Definition CallEvent.h:772

const CXXOperatorCallExpr * getOriginExpr() const override

Returns the expression whose value will be the result of this call.

Definition CallEvent.h:762

CXXStaticOperatorCall(const CXXOperatorCallExpr *CE, ProgramStateRef St, const LocationContext *LCtx, CFGBlock::ConstCFGElementRef ElemRef)

Definition CallEvent.h:751

static bool classof(const CallEvent *CA)

Definition CallEvent.h:797

unsigned getASTArgumentIndex(unsigned CallArgumentIndex) const override

Some call event sub-classes conveniently adjust mismatching AST indices to match parameter indices.

Definition CallEvent.h:785

Manages the lifetime of CallEvent objects.

Definition CallEvent.h:1374

CallEventRef< CXXDestructorCall > getCXXDestructorCall(const CXXDestructorDecl *DD, const Stmt *Trigger, const MemRegion *Target, bool IsBase, ProgramStateRef State, const LocationContext *LCtx, CFGBlock::ConstCFGElementRef ElemRef)

Definition CallEvent.h:1467

CallEventRef getCall(const Stmt *S, ProgramStateRef State, const LocationContext *LC, CFGBlock::ConstCFGElementRef ElemRef)

Gets a call event for a function call, Objective-C method call, a 'new', or a 'delete' call.

CallEventRef< CXXDeallocatorCall > getCXXDeallocatorCall(const CXXDeleteExpr *E, ProgramStateRef State, const LocationContext *LCtx, CFGBlock::ConstCFGElementRef ElemRef)

Definition CallEvent.h:1483

CallEventRef getSimpleCall(const CallExpr *E, ProgramStateRef State, const LocationContext *LCtx, CFGBlock::ConstCFGElementRef ElemRef)

CallEventRef< ObjCMethodCall > getObjCMethodCall(const ObjCMessageExpr *E, ProgramStateRef State, const LocationContext *LCtx, CFGBlock::ConstCFGElementRef ElemRef)

Definition CallEvent.h:1445

CallEventManager(llvm::BumpPtrAllocator &alloc)

CallEventRef< CXXAllocatorCall > getCXXAllocatorCall(const CXXNewExpr *E, ProgramStateRef State, const LocationContext *LCtx, CFGBlock::ConstCFGElementRef ElemRef)

Definition CallEvent.h:1476

friend class CallEvent

Definition CallEvent.h:1375

CallEventRef< CXXConstructorCall > getCXXConstructorCall(const CXXConstructExpr *E, const MemRegion *Target, ProgramStateRef State, const LocationContext *LCtx, CFGBlock::ConstCFGElementRef ElemRef)

Definition CallEvent.h:1452

CallEventRef< CXXInheritedConstructorCall > getCXXInheritedConstructorCall(const CXXInheritedCtorInitExpr *E, const MemRegion *Target, ProgramStateRef State, const LocationContext *LCtx, CFGBlock::ConstCFGElementRef ElemRef)

Definition CallEvent.h:1459

CallEventRef getCaller(const StackFrameContext *CalleeCtx, ProgramStateRef State)

Gets an outside caller given a callee context.

Definition CallEvent.h:83

CallEventRef(const T *Call)

Definition CallEvent.h:85

CallEventRef(const CallEventRef &Orig)

Definition CallEvent.h:86

CallEventRef & operator=(const CallEventRef &)=delete

CallEventRef< T > cloneWithState(ProgramStateRef State) const

Definition CallEvent.h:92

Represents an abstract call to a function or method along a particular path.

Definition CallEvent.h:153

virtual SourceRange getArgSourceRange(unsigned Index) const

Returns the source range for errors associated with this argument.

virtual void getExtraInvalidatedValues(ValueList &Values, RegionAndSymbolInvalidationTraits *ETraits) const

Used to specify non-argument regions that will be invalidated as a result of this call.

Definition CallEvent.h:211

virtual StringRef getKindAsString() const =0

void setForeign(bool B) const

Definition CallEvent.h:242

virtual const Expr * getOriginExpr() const

Returns the expression whose value will be the result of this call.

Definition CallEvent.h:263

virtual RuntimeDefinition getRuntimeDefinition() const =0

Returns the definition of the function or method that will be called.

ProgramStateRef getState() const

A state for looking up relevant Environment entries (arguments, return value), dynamic type informati...

Definition CallEvent.h:222

CallEventKind Kind

Definition CallEvent.h:155

CallEventRef cloneWithState(ProgramStateRef NewState) const

Returns a copy of this CallEvent, but using the given state.

Definition CallEvent.h:393

static bool isCallStmt(const Stmt *S)

Returns true if this is a statement is a function or method call of some kind.

CallEvent & operator=(const CallEvent &)=delete

const ConstructionContext * getConstructionContext() const

Returns the construction context of the call, if it is a C++ constructor call or a call of a function...

param_type_iterator param_type_end() const

Definition CallEvent.h:499

const ParamVarRegion * getParameterLocation(unsigned Index, unsigned BlockCount) const

Returns memory location for a parameter variable within the callee stack frame.

bool isCalledFromSystemHeader() const

const IdentifierInfo * getCalleeIdentifier() const

Returns the name of the callee, if its name is a simple identifier.

Definition CallEvent.h:364

AnalysisDeclContext * getCalleeAnalysisDeclContext() const

Returns AnalysisDeclContext for the callee stack frame.

virtual std::optional< unsigned > getAdjustedParameterIndex(unsigned ASTArgumentIndex) const

Some calls have parameter numbering mismatched from argument numbering.

Definition CallEvent.h:445

QualType getResultType() const

Returns the result type, adjusted for references.

CallEvent(const Expr *E, ProgramStateRef state, const LocationContext *lctx, CFGBlock::ConstCFGElementRef ElemRef)

Definition CallEvent.h:184

CallEventRef< T > cloneWithState(ProgramStateRef NewState) const

Returns a copy of this CallEvent, but using the given state.

Definition CallEvent.h:1491

ProgramStateRef invalidateRegions(unsigned BlockCount, ProgramStateRef State) const

Invalidates the regions (arguments, globals, special regions like 'this') that may have been written ...

friend class CallEventManager

Definition CallEvent.h:182

llvm::mapped_iterator< ArrayRef< ParmVarDecl * >::iterator, GetTypeFn > param_type_iterator

Definition CallEvent.h:487

bool isInSystemHeader() const

Returns true if the callee is known to be from a system header.

Definition CallEvent.h:275

bool isForeign() const

Definition CallEvent.h:238

bool isGlobalCFunction(StringRef SpecificName=StringRef()) const

Returns true if the callee is an externally-visible function in the top-level namespace,...

virtual bool argumentsMayEscape() const

Returns true if any of the arguments are known to escape to long- term storage, even if this method w...

Definition CallEvent.h:337

CallEvent(const CallEvent &Original)

Definition CallEvent.h:193

param_type_iterator param_type_begin() const

Returns an iterator over the types of the call's formal parameters.

Definition CallEvent.h:495

SourceLocation Location

Definition CallEvent.h:171

const void * Data

Definition CallEvent.h:166

std::pair< SVal, SVal > FrameBindingTy

Definition CallEvent.h:380

ProgramPoint getProgramPoint(bool IsPreVisit=false, const ProgramPointTag *Tag=nullptr) const

Returns an appropriate ProgramPoint for this call.

virtual ~CallEvent()=default

const StackFrameContext * getCalleeStackFrame(unsigned BlockCount) const

Returns the callee stack frame.

static QualType getDeclaredResultType(const Decl *D)

Returns the result type of a function or method declaration.

SVal getSVal(const Stmt *S) const

Get the value of arbitrary expressions at this point in the path.

Definition CallEvent.h:202

virtual void getInitialStackFrameContents(const StackFrameContext *CalleeCtx, BindingsTy &Bindings) const =0

Populates the given SmallVector with the bindings in the callee's stack frame at the start of this ca...

virtual void cloneTo(void *Dest) const =0

Copies this CallEvent, with vtable intact, into a new block of memory.

static bool isVariadic(const Decl *D)

Returns true if the given decl is known to be variadic.

virtual SVal getArgSVal(unsigned Index) const

Returns the value of a given argument at the time of the call.

bool hasNonNullArgumentsWithType(bool(*Condition)(QualType)) const

Returns true if the type of any of the non-null arguments satisfies the condition.

const ASTContext & getASTContext() const

NOTE: There are plans for refactoring that would eliminate this method.

Definition CallEvent.h:246

std::optional< SVal > getReturnValueUnderConstruction() const

If the call returns a C++ record type then the region of its return value can be retrieved from its c...

virtual const Expr * getArgExpr(unsigned Index) const

Returns the expression associated with a given argument.

Definition CallEvent.h:306

virtual unsigned getNumArgs() const =0

Returns the number of arguments (explicit and implicit).

bool hasVoidPointerToNonConstArg() const

Returns true if any of the arguments is void*.

const CallEventRef getCaller() const

bool isArgumentConstructedDirectly(unsigned Index) const

Returns true if on the current path, the argument was constructed by calling a C++ constructor over i...

Definition CallEvent.h:433

SmallVectorImpl< FrameBindingTy > BindingsTy

Definition CallEvent.h:381

SVal getReturnValue() const

Returns the return value of the call.

virtual const Decl * getDecl() const

Returns the declaration of the function or method that will be called.

Definition CallEvent.h:234

const LocationContext * getLocationContext() const

The context in which the call is being evaluated.

Definition CallEvent.h:251

const CFGBlock::ConstCFGElementRef & getCFGElementRef() const

Definition CallEvent.h:253

CallEvent(const Decl *D, ProgramStateRef state, const LocationContext *lctx, CFGBlock::ConstCFGElementRef ElemRef)

Definition CallEvent.h:188

virtual ArrayRef< ParmVarDecl * > parameters() const =0

Return call's formal parameters.

bool hasNonZeroCallbackArg() const

Returns true if any of the arguments appear to represent callbacks.

virtual Kind getKind() const =0

Returns the kind of call this is.

SmallVectorImpl< SVal > ValueList

Definition CallEvent.h:206

virtual SourceRange getSourceRange() const

Returns a source range for the entire call, suitable for outputting in diagnostics.

Definition CallEvent.h:297

virtual unsigned getASTArgumentIndex(unsigned CallArgumentIndex) const

Some call event sub-classes conveniently adjust mismatching AST indices to match parameter indices.

Definition CallEvent.h:452

bool isValid() const =delete

static std::optional< SVal > getObjectUnderConstruction(ProgramStateRef State, const ConstructionContextItem &Item, const LocationContext *LC)

By looking at a certain item that may be potentially part of an object's ConstructionContext,...

MemRegion - The root abstract class for all memory regions.

ObjCMethodCall(const ObjCMethodCall &Other)=default

const ObjCMethodDecl * getDecl() const override

Returns the declaration of the function or method that will be called.

Definition CallEvent.h:1291

void getExtraInvalidatedValues(ValueList &Values, RegionAndSymbolInvalidationTraits *ETraits) const override

Used to specify non-argument regions that will be invalidated as a result of this call.

static bool classof(const CallEvent *CA)

Definition CallEvent.h:1362

bool isInstanceMessage() const

Definition CallEvent.h:1301

const Expr * getArgExpr(unsigned Index) const override

Returns the expression associated with a given argument.

Definition CallEvent.h:1297

ObjCMessageKind getMessageKind() const

Returns how the message was written in the source (property access, subscript, or explicit message se...

unsigned getNumArgs() const override

Returns the number of arguments (explicit and implicit).

Definition CallEvent.h:1295

friend class CallEventManager

Definition CallEvent.h:1262

bool isSetter() const

Returns true if this property access or subscript is a setter (has the form of an assignment).

Definition CallEvent.h:1333

const ObjCMessageExpr * getOriginExpr() const override

Returns the expression whose value will be the result of this call.

Definition CallEvent.h:1287

ObjCMethodFamily getMethodFamily() const

Definition CallEvent.h:1305

ObjCMethodCall(const ObjCMessageExpr *Msg, ProgramStateRef St, const LocationContext *LCtx, CFGBlock::ConstCFGElementRef ElemRef)

Definition CallEvent.h:1267

ArrayRef< ParmVarDecl * > parameters() const override

Return call's formal parameters.

StringRef getKindAsString() const override

Definition CallEvent.h:1360

SourceRange getSourceRange() const override

Returns a source range for the entire call, suitable for outputting in diagnostics.

virtual bool canBeOverridenInSubclass(ObjCInterfaceDecl *IDecl, Selector Sel) const

Check if the selector may have multiple definitions (may have overrides).

bool argumentsMayEscape() const override

Returns true if any of the arguments are known to escape to long- term storage, even if this method w...

SVal getReceiverSVal() const

Returns the value of the receiver at the time of this call.

RuntimeDefinition getRuntimeDefinition() const override

Returns the definition of the function or method that will be called.

void cloneTo(void *Dest) const override

Copies this CallEvent, with vtable intact, into a new block of memory.

Definition CallEvent.h:1276

const ObjCInterfaceDecl * getReceiverInterface() const

Get the interface for the receiver.

Definition CallEvent.h:1320

bool isReceiverSelfOrSuper() const

Checks if the receiver refers to 'self' or 'super'.

Selector getSelector() const

Definition CallEvent.h:1309

const ObjCPropertyDecl * getAccessedProperty() const

Kind getKind() const override

Returns the kind of call this is.

Definition CallEvent.h:1359

void getInitialStackFrameContents(const StackFrameContext *CalleeCtx, BindingsTy &Bindings) const override

Populates the given SmallVector with the bindings in the callee's stack frame at the start of this ca...

ParamVarRegion - Represents a region for parameters.

Information about invalidation for a particular region/symbol.

Defines the runtime definition of the called function.

Definition CallEvent.h:110

RuntimeDefinition(const Decl *InD, const MemRegion *InR)

Definition CallEvent.h:129

bool isForeign() const

Definition CallEvent.h:132

RuntimeDefinition(const Decl *InD, bool Foreign)

Definition CallEvent.h:128

const MemRegion * getDispatchRegion()

When other definitions are possible, returns the region whose runtime type determines the method defi...

Definition CallEvent.h:141

RuntimeDefinition()=default

RuntimeDefinition(const Decl *InD)

Definition CallEvent.h:127

bool mayHaveOtherDefinitions()

Check if the definition we have is precise.

Definition CallEvent.h:137

const Decl * getDecl()

Definition CallEvent.h:131

SVal - This represents a symbolic expression, which can be either an L-value or an R-value.

Represents a C function or static C++ member function call.

Definition CallEvent.h:547

static bool classof(const CallEvent *CA)

Definition CallEvent.h:579

Kind getKind() const override

Returns the kind of call this is.

Definition CallEvent.h:576

unsigned getNumArgs() const override

Returns the number of arguments (explicit and implicit).

Definition CallEvent.h:570

SimpleFunctionCall(const CallExpr *CE, ProgramStateRef St, const LocationContext *LCtx, CFGBlock::ConstCFGElementRef ElemRef)

Definition CallEvent.h:551

void cloneTo(void *Dest) const override

Copies this CallEvent, with vtable intact, into a new block of memory.

Definition CallEvent.h:557

friend class CallEventManager

Definition CallEvent.h:548

SimpleFunctionCall(const SimpleFunctionCall &Other)=default

StringRef getKindAsString() const override

Definition CallEvent.h:577

RuntimeDefinition getRuntimeDefinition() const override

Returns the definition of the function or method that will be called.

const Expr * getArgExpr(unsigned Index) const override

Returns the expression associated with a given argument.

Definition CallEvent.h:572

const CallExpr * getOriginExpr() const override

Returns the expression whose value will be the result of this call.

Definition CallEvent.h:562

const FunctionDecl * getDecl() const override

Returns the declaration of the function or method that will be called.

const VarDecl * getDecl() const override=0

IntrusiveRefCntPtr< const ProgramState > ProgramStateRef

CallEventKind

Definition CallEvent.h:60

@ CE_Function

Definition CallEvent.h:61

@ CE_CXXMember

Definition CallEvent.h:63

@ CE_ObjCMessage

Definition CallEvent.h:77

@ CE_END_CXX_CONSTRUCTOR_CALLS

Definition CallEvent.h:71

@ CE_Block

Definition CallEvent.h:76

@ CE_CXXInheritedConstructor

Definition CallEvent.h:69

@ CE_END_FUNCTION_CALLS

Definition CallEvent.h:75

@ CE_CXXStaticOperator

Definition CallEvent.h:62

@ CE_END_CXX_INSTANCE_CALLS

Definition CallEvent.h:67

@ CE_CXXDestructor

Definition CallEvent.h:65

@ CE_BEG_CXX_INSTANCE_CALLS

Definition CallEvent.h:66

@ CE_CXXDeallocator

Definition CallEvent.h:73

@ CE_CXXAllocator

Definition CallEvent.h:72

@ CE_CXXConstructor

Definition CallEvent.h:68

@ CE_BEG_CXX_CONSTRUCTOR_CALLS

Definition CallEvent.h:70

@ CE_CXXMemberOperator

Definition CallEvent.h:64

@ CE_BEG_FUNCTION_CALLS

Definition CallEvent.h:74

ObjCMessageKind

Represents the ways an Objective-C message send can occur.

Definition CallEvent.h:1256

@ OCM_Message

Definition CallEvent.h:1256

@ OCM_PropertyAccess

Definition CallEvent.h:1256

@ OCM_Subscript

Definition CallEvent.h:1256

The JSON file list parser is used to communicate input to InstallAPI.

OverloadedOperatorKind

Enumeration specifying the different kinds of C++ overloaded operators.

bool isa(CodeGen::Address addr)

ObjCMethodFamily

A family of Objective-C methods.

const FunctionProtoType * T

U cast(CodeGen::Address addr)

@ Other

Other implicit parameter.

Diagnostic wrappers for TextAPI types for error reporting.

static SimpleType getSimplifiedValue(clang::ento::CallEventRef< T > Val)

Definition CallEvent.h:1531

const T * SimpleType

Definition CallEvent.h:1529