clang: lib/AST/ComputeDependence.cpp Source File (original) (raw)

1

2

3

4

5

6

7

8

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

21

22using namespace clang;

23

27

31 D |= S->getDependence();

32 assert(!(D & ExprDependence::UnexpandedPack));

33 return D;

34}

35

39

43

46

47

48

49

50

51

52

53

54

55

56

58 !(Dep & ExprDependence::Value)) {

62

64 Result.Val.isLValue()) {

65 auto *VD = Result.Val.getLValueBase().dyn_cast<const ValueDecl *>();

66 if (VD && VD->isTemplated()) {

67 auto *VarD = dyn_cast(VD);

68 if (!VarD || !VarD->hasLocalStorage())

69 Dep |= ExprDependence::Value;

70 }

71 }

72 }

73

74 return Dep;

75}

76

78

79

83

86

87 if (ArgDeps & ExprDependence::Type)

88 Deps |= ExprDependence::Value;

89

90

91 auto ExprKind = E->getKind();

92 if (ExprKind != UETT_AlignOf && ExprKind != UETT_PreferredAlignOf)

93 return Deps;

94 if ((Deps & ExprDependence::Value) && (Deps & ExprDependence::Instantiation))

95 return Deps;

96

99 if (const auto *DRE = dyn_cast(NoParens))

100 D = DRE->getDecl();

101 else if (const auto *ME = dyn_cast(NoParens))

102 D = ME->getMemberDecl();

103 if (!D)

104 return Deps;

105 for (const auto *I : D->specific_attrs()) {

106 if (I->isAlignmentErrorDependent())

107 Deps |= ExprDependence::Error;

108 if (I->isAlignmentDependent())

109 Deps |= ExprDependence::ValueInstantiation;

110 }

111 return Deps;

112}

113

117

121 : ExprDependence::None);

122}

123

130

132

133

134

139 return D;

140}

141

143

144

145

146

147

148

149

150

157 return D;

158}

159

163

172

176

179

180 if (const auto *CompoundExprResult =

182 if (const Expr *ResultExpr = CompoundExprResult->getExprStmt())

183 D |= ResultExpr->getDependence();

184

185

186

187 if (TemplateDepth)

188 D |= ExprDependence::ValueInstantiation;

189

191}

192

201

204 return ExprDependence::TypeValueInstantiation |

207

212 std::swap(Active, Inactive);

213

214

215 return (Active & ExprDependence::TypeValue) |

217}

218

220 auto D = ExprDependence::None;

221 for (auto *E : P->exprs())

222 D |= E->getDependence();

223 return D;

224}

225

229 (E->getSubExpr()->getDependence() & ~ExprDependence::Type);

230 return D;

231}

232

235 (ExprDependence::Instantiation | ExprDependence::Error);

236}

237

245

248 ExprDependence::Instantiation;

249}

250

254

256 bool ContainsUnexpandedParameterPack) {

259 D |= ExprDependence::Instantiation;

260 if (ContainsUnexpandedParameterPack)

261 D |= ExprDependence::UnexpandedPack;

262 return D;

263}

264

266

267

272 return D;

273}

274

278

284

286 auto D = ExprDependence::None;

290 else

292

294}

295

299

303

311

313

314

316

317

318

319

320

321

322

324 D |= ExprDependence::Type;

325

326 assert(!(D & ExprDependence::UnexpandedPack));

327 return D;

328}

329

332 if (!Op)

333 return ExprDependence::None;

335}

336

340

347

351

355 D |= Dim->getDependence();

357}

358

360

362

364 D |= ExprDependence::Value;

365 return D;

366}

367

371 D |= ExprDependence::ValueInstantiation;

372 return D;

373}

374

377 ExprDependence::TypeValueInstantiation;

378}

379

381

384

386 if (D & ExprDependence::TypeValueInstantiation)

388 ExprDependence::Instantiation;

389

392 D |= PatternDep | ExprDependence::Instantiation;

395 assert(Index && *Index < Exprs.size() && "pack index out of bound");

396 D |= Exprs[*Index]->getDependence();

397 }

398 return D;

399}

400

404

407 return (Resume->getDependence() &

408 (ExprDependence::TypeValue | ExprDependence::Error)) |

409 (E->getCommonExpr()->getDependence() & ~ExprDependence::TypeValue);

411 ExprDependence::TypeValueInstantiation;

412}

413

416 ExprDependence::TypeValueInstantiation;

417}

418

422

426

430

439 return ExprDependence::None;

440}

441

445

450

454

458 D |= LB->getDependence();

460 D |= Len->getDependence();

461

463 if (auto *Stride = E->getStride())

464 D |= Stride->getDependence();

465 }

466 return D;

467}

468

476

479 for (unsigned I = 0, End = E->numOfIterators(); I < End; ++I) {

480 if (auto *DD = cast_or_null(E->getIteratorDecl(I))) {

481

482 if (auto *TSI = DD->getTypeSourceInfo()) {

484 }

485 }

488 D |= BE->getDependence();

490 D |= EE->getDependence();

492 D |= SE->getDependence();

493 }

494 return D;

495}

496

497

498

499

501 auto Deps = ExprDependence::None;

502

504 ~NestedNameSpecifierDependence::Dependent);

505

508 for (auto *Arg = FirstArg, *End = FirstArg + NumArgs; Arg < End; ++Arg)

509 Deps |= toExprDependence(Arg->getArgument().getDependence());

510 }

511

514

516 Deps |= ExprDependence::UnexpandedPack;

518 ExprDependence::Error;

519

520

521

522

523

524

525

526

527

528

529

530

531

532

534 Deps |= ExprDependence::TypeValueInstantiation;

536 Deps |= ExprDependence::Instantiation;

537

538

539

541 Deps |= ExprDependence::Type;

542

543

544 if (Decl->getDeclName().getNameKind() ==

546 QualType T = Decl->getDeclName().getCXXNameType();

547 if (T->isDependentType())

548 return Deps | ExprDependence::TypeValueInstantiation;

549

550 if (T->isInstantiationDependentType())

551 Deps |= ExprDependence::Instantiation;

552 }

553

554

555

556

557

558

559

560

561

562

563

564

565

566

567

568

570 return Deps | ExprDependence::ValueInstantiation;

571

572

573

574 if (const auto *Var = dyn_cast(Decl)) {

575 if (const Expr *Init = Var->getAnyInitializer()) {

576 if (Init->containsErrors())

577 Deps |= ExprDependence::Error;

578

579 if (Var->mightBeUsableInConstantExpressions(Ctx) &&

580 Init->isValueDependent())

581 Deps |= ExprDependence::ValueInstantiation;

582 }

583

584

585

586 if (Var->isStaticDataMember() &&

587 Var->getDeclContext()->isDependentContext() &&

588 !Var->getFirstDecl()->hasInit()) {

592 Deps |= ExprDependence::TypeValueInstantiation;

593 } else if (First->hasInit()) {

594 Deps |= ExprDependence::ValueInstantiation;

595 }

596 }

597

598 return Deps;

599 }

600

601

602

603

604

605

606

607

608 if (auto *MD = dyn_cast(Decl)) {

610 Deps |= ExprDependence::ValueInstantiation;

611 }

612

613 return Deps;

614}

615

617

618

619

620

621

622

624 ExprDependence::ErrorDependent;

625

626

628 D |= S->getDependence();

629 return D;

630}

631

636

640

644 D |= ExprDependence::Type;

646 if (A)

647 D |= A->getDependence();

648 }

649 for (auto *A : PreArgs)

650 D |= A->getDependence();

651 return D;

652}

653

661

663 auto D = ExprDependence::None;

665 D |= ExprDependence::Instantiation;

667 D |= ExprDependence::UnexpandedPack;

668 return D;

669}

670

674

676 ~NestedNameSpecifierDependence::Dependent);

677

680

682 if (FieldDecl *FD = dyn_cast(MemberDecl)) {

683 DeclContext *DC = MemberDecl->getDeclContext();

684

685

686 CXXRecordDecl *RD = dyn_cast_or_null(DC);

690 }

691

692

693 if (FD && FD->isBitField() && FD->getBitWidth()->isValueDependent()) {

694 D |= ExprDependence::Type;

695 }

696 }

697 return D;

698}

699

701 auto D = ExprDependence::None;

702 for (auto *A : E->inits())

703 D |= A->getDependence();

704 return D;

705}

706

710 D |= C->getDependence();

711 return D;

712}

713

715 bool ContainsUnexpandedPack) {

716 auto D = ContainsUnexpandedPack ? ExprDependence::UnexpandedPack

717 : ExprDependence::None;

719 D |= AE->getDependence() & ExprDependence::Error;

720

723 else

726

728 return D | ExprDependence::TypeValueInstantiation;

729 return D | (E->getResultExpr()->getDependence() &

730 ~ExprDependence::UnexpandedPack);

731}

732

736 auto DesignatorDeps = ExprDependence::None;

737 if (D.isArrayDesignator())

739 else if (D.isArrayRangeDesignator())

742 Deps |= DesignatorDeps;

743 if (DesignatorDeps & ExprDependence::TypeValue)

744 Deps |= ExprDependence::TypeValueInstantiation;

745 }

746 return Deps;

747}

748

752 D |= E->getDependence();

753 return D;

754}

755

757 auto D = ExprDependence::None;

759 D |= E->getDependence();

760 return D;

761}

762

768 if (Size && *Size)

774 return D;

775}

776

785 ~NestedNameSpecifierDependence::Dependent);

786 return D;

787}

788

791 bool KnownInstantiationDependent,

792 bool KnownContainsUnexpandedParameterPack) {

793 auto Deps = ExprDependence::None;

794 if (KnownDependent)

795 Deps |= ExprDependence::TypeValue;

796 if (KnownInstantiationDependent)

797 Deps |= ExprDependence::Instantiation;

798 if (KnownContainsUnexpandedParameterPack)

799 Deps |= ExprDependence::UnexpandedPack;

802 ~NestedNameSpecifierDependence::Dependent);

803 for (auto *D : E->decls()) {

804 if (D->getDeclContext()->isDependentContext() ||

806 Deps |= ExprDependence::TypeValueInstantiation;

807 }

808

809

810

813 return Deps;

814}

815

817 auto D = ExprDependence::TypeValue;

822 return D;

823}

824

832

839

843

847

849 bool ContainsUnexpandedParameterPack) {

851 if (ContainsUnexpandedParameterPack)

852 D |= ExprDependence::UnexpandedPack;

853 return D;

854}

855

857 auto D = ExprDependence::ValueInstantiation;

861 D |= A->getDependence() &

862 (ExprDependence::UnexpandedPack | ExprDependence::Error);

863 return D;

864}

865

867 auto D = ExprDependence::TypeValueInstantiation;

874 return D;

875}

876

880

882 auto D = ExprDependence::TypeValueInstantiation;

883 for (const auto *C : {E->getLHS(), E->getRHS()}) {

884 if (C)

886 }

887 return D;

888}

889

891 auto D = ExprDependence::None;

893 D |= A->getDependence();

894 return D;

895}

896

898 auto D = ExprDependence::None;

899 for (const auto *A : E->getArgs())

902 return D;

903}

904

906 bool ValueDependent) {

907 auto TA = TemplateArgumentDependence::None;

908 const auto InterestingDeps = TemplateArgumentDependence::Instantiation |

909 TemplateArgumentDependence::UnexpandedPack;

912 TA |= ArgLoc.getArgument().getDependence() & InterestingDeps;

913 if (TA == InterestingDeps)

914 break;

915 }

916

918 ValueDependent ? ExprDependence::Value : ExprDependence::None;

921 Res |= ExprDependence::Error;

922 return Res;

923}

924

926 auto D = ExprDependence::None;

928 for (unsigned I = 0, N = E->getNumElements(); I != N; ++I)

930 return D;

931}

932

934 auto Deps = ExprDependence::None;

935 for (unsigned I = 0, N = E->getNumElements(); I < N; ++I) {

938 KV.Value->getDependence());

939 if (KV.EllipsisLoc.isValid())

941 Deps |= KVDeps;

942 }

943 return Deps;

944}

945

947 auto D = ExprDependence::None;

949 D |= R->getDependence();

950 else

953 D |= A->getDependence();

954 return D;

955}

956

958

959

960 return ExprDependence::None;

961}

static ExprDependence getDependenceInExpr(DeclarationNameInfo Name)

Definition ComputeDependence.cpp:662

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

Defines the ExceptionSpecificationType enumeration and various utility functions.

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

Defines Expressions and AST nodes for C++2a concepts.

static DiagnosticBuilder Diag(DiagnosticsEngine *Diags, const LangOptions &Features, FullSourceLoc TokLoc, const char *TokBegin, const char *TokRangeBegin, const char *TokRangeEnd, unsigned DiagID)

Produce a diagnostic highlighting some portion of a literal.

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

const LangOptions & getLangOpts() const

Represents a loop initializing the elements of an array.

OpaqueValueExpr * getCommonExpr() const

Get the common subexpression shared by all initializations (the source array).

Expr * getSubExpr() const

Get the initializer to use for each array element.

This class represents BOTH the OpenMP Array Section and OpenACC 'subarray', with a boolean differenti...

Expr * getBase()

Get base of the array section.

Expr * getLength()

Get length of array section.

bool isOMPArraySection() const

Expr * getStride()

Get stride of array section.

Expr * getLowerBound()

Get lower bound of array section.

ArraySubscriptExpr - [C99 6.5.2.1] Array Subscripting.

Expr * getLHS()

An array access can be written A[4] or 4[A] (both are equivalent).

An Embarcadero array type trait, as used in the implementation of __array_rank and __array_extent.

QualType getQueriedType() const

Expr * getDimensionExpression() const

AsTypeExpr - Clang builtin function __builtin_astype [OpenCL 6.2.4.2] This AST node provides support ...

Expr * getSrcExpr() const

getSrcExpr - Return the Expr to be converted.

AtomicExpr - Variadic atomic builtins: __atomic_exchange, __atomic_fetch_*, __atomic_load,...

static unsigned getNumSubExprs(AtomicOp Op)

Determine the number of arguments the specified atomic builtin should have.

BinaryConditionalOperator - The GNU extension to the conditional operator which allows the middle ope...

Expr * getFalseExpr() const

getFalseExpr - Return the subexpression which will be evaluated if the condition evaluates to false; ...

Expr * getCommon() const

getCommon - Return the common expression, written to the left of the condition.

A builtin binary operation expression such as "x + y" or "x <= y".

BlockExpr - Adaptor class for mixing a BlockDecl with expressions.

const BlockDecl * getBlockDecl() const

Represents binding an expression to a temporary.

const Expr * getSubExpr() const

Represents a call to a C++ constructor.

A default argument (C++ [dcl.fct.default]).

A use of a default initializer in a constructor or in aggregate initialization.

Expr * getExpr()

Get the initialization expression that will be used.

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

Represents a C++ member access expression where the actual member referenced could not be resolved be...

NestedNameSpecifier getQualifier() const

Retrieve the nested-name-specifier that qualifies the member name.

const DeclarationNameInfo & getMemberNameInfo() const

Retrieve the name of the member that this expression refers to.

Expr * getBase() const

Retrieve the base object of this member expressions, e.g., the x in x.m.

bool isImplicitAccess() const

True if this is an implicit access, i.e.

ArrayRef< TemplateArgumentLoc > template_arguments() const

Represents a folding of a pack over an operator.

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

llvm::iterator_range< arg_iterator > placement_arguments()

QualType getAllocatedType() const

std::optional< Expr * > getArraySize()

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

TypeSourceInfo * getAllocatedTypeSourceInfo() const

Expr * getInitializer()

The initializer of this new-expression.

Represents a C++11 noexcept expression (C++ [expr.unary.noexcept]).

Expr * getOperand() const

Represents a list-initialization with parenthesis.

MutableArrayRef< Expr * > getInitExprs()

Represents a C++ pseudo-destructor (C++ [expr.pseudo]).

TypeSourceInfo * getDestroyedTypeInfo() const

Retrieve the source location information for the type being destroyed.

TypeSourceInfo * getScopeTypeInfo() const

Retrieve the scope type in a qualified pseudo-destructor expression.

NestedNameSpecifier getQualifier() const

If the member name was qualified, retrieves the nested-name-specifier that precedes the member name.

Represents a C++ struct/union/class.

bool isCurrentInstantiation(const DeclContext *CurContext) const

Determine whether this dependent class is a current instantiation, when viewed from within the given ...

A rewritten comparison expression that was originally written using operator syntax.

Expr * getSemanticForm()

Get an equivalent semantic form for this expression.

An expression "T()" which creates an rvalue of a non-class type T.

TypeSourceInfo * getTypeSourceInfo() const

Implicit construction of a std::initializer_list object from an array temporary within list-initia...

Represents a C++ functional cast expression that builds a temporary object.

TypeSourceInfo * getTypeSourceInfo() const

Represents the this expression in C++.

bool isCapturedByCopyInLambdaWithExplicitObjectParameter() const

A C++ throw-expression (C++ [except.throw]).

const Expr * getSubExpr() const

A C++ typeid expression (C++ [expr.typeid]), which gets the type_info that corresponds to the supplie...

bool isTypeOperand() const

TypeSourceInfo * getTypeOperandSourceInfo() const

Retrieve source information for the type operand.

Expr * getExprOperand() const

Describes an explicit type conversion that uses functional notion but could not be resolved because o...

QualType getTypeAsWritten() const

Retrieve the type that is being constructed, as specified in the source code.

A Microsoft C++ __uuidof expression, which gets the _GUID that corresponds to the supplied type or ex...

Expr * getExprOperand() const

bool isTypeOperand() const

TypeSourceInfo * getTypeOperandSourceInfo() const

Retrieve source information for the type operand.

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

unsigned getNumArgs() const

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

Expr ** getArgs()

Retrieve the call arguments.

ChooseExpr - GNU builtin-in function __builtin_choose_expr.

bool isConditionDependent() const

bool isConditionTrue() const

isConditionTrue - Return whether the condition is true (i.e.

CompoundLiteralExpr - [C99 6.5.2.5].

const Expr * getInitializer() const

TypeSourceInfo * getTypeSourceInfo() const

Represents the specialization of a concept - evaluates to a prvalue of type bool.

const ASTTemplateArgumentListInfo * getTemplateArgsAsWritten() const

const ASTConstraintSatisfaction & getSatisfaction() const

Get elaborated satisfaction info about the template arguments' satisfaction of the named concept.

ConditionalOperator - The ?

Expr * getCond() const

getCond - Return the expression representing the condition for the ?

ConvertVectorExpr - Clang builtin function __builtin_convertvector This AST node provides support for...

TypeSourceInfo * getTypeSourceInfo() const

getTypeSourceInfo - Return the destination type.

Expr * getSrcExpr() const

getSrcExpr - Return the Expr to be converted.

Represents an expression that might suspend coroutine execution; either a co_await or co_yield expres...

Expr * getResumeExpr() const

Expr * getCommonExpr() const

DeclContext - This is used only as base class of specific decl types that can act as declaration cont...

bool isDependentContext() const

Determines whether this context is dependent on a template parameter.

A reference to a declared variable, function, enum, etc.

unsigned getNumTemplateArgs() const

Retrieve the number of template arguments provided as part of this template-id.

NestedNameSpecifier getQualifier() const

If the name was qualified, retrieves the nested-name-specifier that precedes the name.

bool isCapturedByCopyInLambdaWithExplicitObjectParameter() const

const TemplateArgumentLoc * getTemplateArgs() const

Retrieve the template arguments provided as part of this template-id.

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

bool isParameterPack() const

Whether this declaration is a parameter pack.

llvm::iterator_range< specific_attr_iterator< T > > specific_attrs() const

DeclContext * getDeclContext()

@ CXXConversionFunctionName

Represents a 'co_await' expression while the type of the promise is dependent.

Expr * getOperand() const

A qualified reference to a name whose declaration cannot yet be resolved.

ArrayRef< TemplateArgumentLoc > template_arguments() const

NestedNameSpecifier getQualifier() const

Retrieve the nested-name-specifier that qualifies this declaration.

const DeclarationNameInfo & getNameInfo() const

Retrieve the name that this expression refers to.

Represents a C99 designated initializer expression.

Expr * getArrayRangeEnd(const Designator &D) const

Expr * getArrayRangeStart(const Designator &D) const

MutableArrayRef< Designator > designators()

Expr * getArrayIndex(const Designator &D) const

Expr * getInit() const

Retrieve the initializer value.

ExplicitCastExpr - An explicit cast written in the source code.

This represents one expression.

bool isTypeDependent() const

Determines whether the type of this expression depends on.

Expr * IgnoreParens() LLVM_READONLY

Skip past any parentheses which might surround this expression until reaching a fixed point.

bool EvaluateAsConstantExpr(EvalResult &Result, const ASTContext &Ctx, ConstantExprKind Kind=ConstantExprKind::Normal) const

Evaluate an expression that is required to be a constant expression.

bool isInstantiationDependent() const

Whether this expression is instantiation-dependent, meaning that it depends in some way on.

ExprDependence getDependence() const

An expression trait intrinsic.

Expr * getQueriedExpression() const

ExtVectorElementExpr - This represents access to specific elements of a vector, and may occur on the ...

const Expr * getBase() const

Represents a member of a struct/union/class.

FullExpr - Represents a "full-expression" node.

const Expr * getSubExpr() const

Represents a C11 generic selection.

TypeSourceInfo * getControllingType()

Return the controlling type of this generic selection expression.

ArrayRef< Expr * > getAssocExprs() const

bool isExprPredicate() const

Whether this generic selection uses an expression as its controlling argument.

Expr * getResultExpr()

Return the result expression of this controlling expression.

bool isResultDependent() const

Whether this generic selection is result-dependent.

Expr * getControllingExpr()

Return the controlling expression of this generic selection expression.

ImplicitCastExpr - Allows us to explicitly represent implicit type conversions, which have no direct ...

Represents an implicitly-generated value initialization of an object of a given type.

Describes an C or C++ initializer list.

ArrayRef< Expr * > inits()

A C++ lambda expression, which produces a function object (of unspecified type) that can be invoked l...

A member reference to an MSPropertyDecl.

Expr * getBaseExpr() const

MS property subscript expression.

Represents a prvalue temporary that is written into memory so that a reference can bind to it.

Expr * getSubExpr() const

Retrieve the temporary-generating subexpression whose value will be materialized into a glvalue.

MatrixSubscriptExpr - Matrix subscript expression for the MatrixType extension.

MemberExpr - [C99 6.5.2.3] Structure and Union Members.

ArrayRef< TemplateArgumentLoc > template_arguments() const

NestedNameSpecifier getQualifier() const

If the member name was qualified, retrieves the nested-name-specifier that precedes the member name.

ValueDecl * getMemberDecl() const

Retrieve the member declaration to which this expression refers.

DeclarationNameInfo getMemberNameInfo() const

Retrieve the member declaration name info.

NestedNameSpecifierDependence getDependence() const

Represents a place-holder for an object not to be initialized by anything.

An explicit cast in C or a C-style cast in C++, which uses the syntax ([s1][s2]......

Expr * getBase()

Fetches base expression of array shaping expression.

ArrayRef< Expr * > getDimensions() const

Fetches the dimensions for array shaping expression.

OpenMP 5.0 [2.1.6 Iterators] Iterators are identifiers that expand to multiple values in the clause o...

IteratorRange getIteratorRange(unsigned I)

Gets the iterator range for the given iterator.

unsigned numOfIterators() const

Returns number of iterator definitions.

Decl * getIteratorDecl(unsigned I)

Gets the iterator declaration for the given iterator.

ObjCArrayLiteral - used for objective-c array containers; as in: @["Hello", NSApp,...

Expr ** getElements()

Retrieve elements of array of literals.

unsigned getNumElements() const

getNumElements - Return number of elements of objective-c array literal.

ObjCBoxedExpr - used for generalized expression boxing.

ObjCDictionaryLiteral - AST node to represent objective-c dictionary literals; as in:"name" : NSUserN...

unsigned getNumElements() const

getNumElements - Return number of elements of objective-c dictionary literal.

ObjCDictionaryElement getKeyValueElement(unsigned Index) const

ObjCEncodeExpr, used for @encode in Objective-C.

QualType getEncodedType() const

ObjCIndirectCopyRestoreExpr - Represents the passing of a function argument by indirect copy-restore ...

ObjCIsaExpr - Represent X->isa and X.isa when X is an ObjC 'id' type.

ObjCIvarRefExpr - A reference to an ObjC instance variable.

const Expr * getBase() const

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

Expr * getInstanceReceiver()

Returns the object expression (receiver) for an instance message, or null for a message that is not a...

llvm::iterator_range< arg_iterator > arguments()

ObjCPropertyRefExpr - A dot-syntax expression to access an ObjC property.

const Expr * getBase() const

bool isObjectReceiver() const

QualType getSuperReceiverType() const

bool isClassReceiver() const

bool isSuperReceiver() const

ObjCSubscriptRefExpr - used for array and dictionary subscripting.

Expr * getKeyExpr() const

Expr * getBaseExpr() const

OffsetOfExpr - [C99 7.17] - This represents an expression of the form offsetof(record-type,...

Expr * getIndexExpr(unsigned Idx)

TypeSourceInfo * getTypeSourceInfo() const

unsigned getNumExpressions() const

OpaqueValueExpr - An expression referring to an opaque object of a fixed type and value class.

Expr * getSourceExpr() const

The source expression of an opaque value expression is the expression which originally generated the ...

This expression type represents an asterisk in an OpenACC Size-Expr, used in the 'tile' and 'gang' cl...

A reference to an overloaded function set, either an UnresolvedLookupExpr or an UnresolvedMemberExpr.

NestedNameSpecifier getQualifier() const

Fetches the nested-name qualifier, if one was given.

const DeclarationNameInfo & getNameInfo() const

Gets the full name info.

llvm::iterator_range< decls_iterator > decls() const

ArrayRef< TemplateArgumentLoc > template_arguments() const

Represents a C++11 pack expansion that produces a sequence of expressions.

Expr * getPattern()

Retrieve the pattern of the pack expansion.

Expr * getIndexExpr() const

ArrayRef< Expr * > getExpressions() const

Return the trailing expressions, regardless of the expansion.

Expr * getPackIdExpression() const

bool isFullySubstituted() const

UnsignedOrNone getSelectedIndex() const

ParenExpr - This represents a parenthesized expression, e.g.

const Expr * getSubExpr() const

ArrayRef< Expr * > exprs()

[C99 6.4.2.2] - A predefined identifier such as func.

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

ArrayRef< Expr * > semantics()

Expr * getSyntacticForm()

Return the syntactic form of this expression, i.e.

A (possibly-)qualified type.

Frontend produces RecoveryExprs on semantic errors that prevent creating other well-formed expression...

ArrayRef< Expr * > subExpressions()

TypeSourceInfo * getTypeSourceInfo()

ShuffleVectorExpr - clang-specific builtin-in function __builtin_shufflevector.

Expr ** getSubExprs()

Retrieve the array of expressions.

unsigned getNumSubExprs() const

getNumSubExprs - Return the size of the SubExprs array.

StmtExpr - This is the GNU Statement Expression extension: ({int X=4; X;}).

CompoundStmt * getSubStmt()

Represents a reference to a non-type template parameter that has been substituted with a template arg...

Expr * getReplacement() const

Location wrapper for a TemplateArgument.

A container of type source information.

QualType getType() const

Return the type wrapped by this type source info.

A type trait used in the implementation of various C++11 and Library TR1 trait templates.

ArrayRef< TypeSourceInfo * > getArgs() const

Retrieve the argument types.

The base class of the type hierarchy.

bool isIncompleteArrayType() const

bool isInstantiationDependentType() const

Determine whether this type is an instantiation-dependent type, meaning that the type involves a temp...

bool isDependentType() const

Whether this type is a dependent type, meaning that its definition somehow depends on a template para...

TypeDependence getDependence() const

UnaryExprOrTypeTraitExpr - expression with either a type or (unevaluated) expression operand.

QualType getArgumentType() const

bool isArgumentType() const

UnaryExprOrTypeTrait getKind() const

UnaryOperator - This represents the unary-expression's (except sizeof and alignof),...

Expr * getSubExpr() const

Represents a call to the builtin function __builtin_va_arg.

TypeSourceInfo * getWrittenTypeInfo() const

const Expr * getSubExpr() const

Represent the declaration of a variable (in which case it is an lvalue) a function (in which case it ...

const Expr * getExprStmt() const

Represents a variable declaration or definition.

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

bool isa(CodeGen::Address addr)

ExprDependence toExprDependence(TemplateArgumentDependence TA)

Computes dependencies of a reference with the name having template arguments with TA dependencies.

CanThrowResult

Possible results from evaluation of a noexcept expression.

ExprDependenceScope::ExprDependence ExprDependence

ExprDependence turnTypeToValueDependence(ExprDependence D)

ExprDependence toExprDependenceAsWritten(TypeDependence D)

ExprDependence computeDependence(FullExpr *E)

Definition ComputeDependence.cpp:24

ExprDependence turnValueToTypeDependence(ExprDependence D)

@ Result

The result type of a method or function.

const FunctionProtoType * T

ExprDependence toExprDependenceForImpliedType(TypeDependence D)

U cast(CodeGen::Address addr)

ArrayRef< TemplateArgumentLoc > arguments() const

DeclarationNameInfo - A collector data type for bundling together a DeclarationName and the correspon...

bool isInstantiationDependent() const

Determine whether this name involves a template parameter.

bool containsUnexpandedParameterPack() const

Determine whether this name contains an unexpanded parameter pack.

EvalResult is a struct with detailed info about an evaluated expression.

Iterator range representation begin:end[:step].