clang 23.0.0git
ComputeDependence.cpp
Go to the documentation of this file.
1//===- ComputeDependence.cpp ----------------------------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
10#include "clang/AST/Attr.h"
11#include "clang/AST/DeclCXX.h"
14#include "clang/AST/Expr.h"
15#include "clang/AST/ExprCXX.h"
17#include "clang/AST/ExprObjC.h"
20#include "llvm/ADT/ArrayRef.h"
21
22using namespace clang;
23
27
30 if (auto *S = E->getSourceExpr())
31 D |= S->getDependence();
32 assert(!(D & ExprDependence::UnexpandedPack));
33 return D;
34}
35
39
41 const ASTContext &Ctx) {
42 ExprDependence Dep =
43 // FIXME: Do we need to look at the type?
46
47 // C++ [temp.dep.constexpr]p5:
48 // An expression of the form & qualified-id where the qualified-id names a
49 // dependent member of the current instantiation is value-dependent. An
50 // expression of the form & cast-expression is also value-dependent if
51 // evaluating cast-expression as a core constant expression succeeds and
52 // the result of the evaluation refers to a templated entity that is an
53 // object with static or thread storage duration or a member function.
54 //
55 // What this amounts to is: constant-evaluate the operand and check whether it
56 // refers to a templated entity other than a variable with local storage.
57 if (Ctx.getLangOpts().CPlusPlus && E->getOpcode() == UO_AddrOf &&
58 !(Dep & ExprDependence::Value)) {
60 // FIXME: This doesn't enforce the C++98 constant expression rules.
62 !Result.DiagEmitted && Result.Val.isLValue()) {
63 auto *VD = Result.Val.getLValueBase().dyn_cast<const ValueDecl *>();
64 if (VD && VD->isTemplated()) {
65 auto *VarD = dyn_cast<VarDecl>(VD);
66 if (!VarD || !VarD->hasLocalStorage())
67 Dep |= ExprDependence::Value;
68 }
69 }
70 }
71
72 return Dep;
73}
74
76 // Never type-dependent (C++ [temp.dep.expr]p3).
77 // Value-dependent if the argument is type-dependent.
78 if (E->isArgumentType())
81
82 auto ArgDeps = E->getArgumentExpr()->getDependence();
83 auto Deps = ArgDeps & ~ExprDependence::TypeValue;
84 // Value-dependent if the argument is type-dependent.
85 if (ArgDeps & ExprDependence::Type)
86 Deps |= ExprDependence::Value;
87 // Check to see if we are in the situation where alignof(decl) should be
88 // dependent because decl's alignment is dependent.
89 auto ExprKind = E->getKind();
90 if (ExprKind != UETT_AlignOf && ExprKind != UETT_PreferredAlignOf)
91 return Deps;
92 if ((Deps & ExprDependence::Value) && (Deps & ExprDependence::Instantiation))
93 return Deps;
94
95 auto *NoParens = E->getArgumentExpr()->IgnoreParens();
96 const ValueDecl *D = nullptr;
97 if (const auto *DRE = dyn_cast<DeclRefExpr>(NoParens))
98 D = DRE->getDecl();
99 else if (const auto *ME = dyn_cast<MemberExpr>(NoParens))
100 D = ME->getMemberDecl();
101 if (!D)
102 return Deps;
103 for (const auto *I : D->specific_attrs<AlignedAttr>()) {
104 if (I->isAlignmentErrorDependent())
105 Deps |= ExprDependence::Error;
106 if (I->isAlignmentDependent())
107 Deps |= ExprDependence::ValueInstantiation;
108 }
109 return Deps;
110}
111
115
119
121 return E->getBase()->getDependence() | E->getRowIdx()->getDependence() |
123 : ExprDependence::None);
124}
125
132
134 // We model implicit conversions as combining the dependence of their
135 // subexpression, apart from its type, with the semantic portion of the
136 // target type.
139 if (auto *S = E->getSubExpr())
140 D |= S->getDependence() & ~ExprDependence::Type;
141 return D;
142}
143
145 // Cast expressions are type-dependent if the type is
146 // dependent (C++ [temp.dep.expr]p3).
147 // Cast expressions are value-dependent if the type is
148 // dependent or if the subexpression is value-dependent.
149 //
150 // Note that we also need to consider the dependence of the actual type here,
151 // because when the type as written is a deduced type, that type is not
152 // dependent, but it may be deduced as a dependent type.
155 cast<ExplicitCastExpr>(E)->getTypeAsWritten()->getDependence()) |
157 if (auto *S = E->getSubExpr())
158 D |= S->getDependence() & ~ExprDependence::Type;
159 return D;
160}
161
165
167 // The type of the conditional operator depends on the type of the conditional
168 // to support the GCC vector conditional extension. Additionally,
169 // [temp.dep.expr] does specify that this should be dependent on ALL sub
170 // expressions.
171 return E->getCond()->getDependence() | E->getLHS()->getDependence() |
172 E->getRHS()->getDependence();
173}
174
178
181 // Propagate dependence of the result.
182 if (const auto *CompoundExprResult =
183 dyn_cast_or_null<ValueStmt>(E->getSubStmt()->body_back()))
184 if (const Expr *ResultExpr = CompoundExprResult->getExprStmt())
185 D |= ResultExpr->getDependence();
186 // Note: we treat a statement-expression in a dependent context as always
187 // being value- and instantiation-dependent. This matches the behavior of
188 // lambda-expressions and GCC.
189 if (TemplateDepth)
190 D |= ExprDependence::ValueInstantiation;
191 // A param pack cannot be expanded over stmtexpr boundaries.
192 return D & ~ExprDependence::UnexpandedPack;
193}
194
203
205 if (E->isConditionDependent())
206 return ExprDependence::TypeValueInstantiation |
207 E->getCond()->getDependence() | E->getLHS()->getDependence() |
208 E->getRHS()->getDependence();
209
210 auto Cond = E->getCond()->getDependence();
211 auto Active = E->getLHS()->getDependence();
212 auto Inactive = E->getRHS()->getDependence();
213 if (!E->isConditionTrue())
214 std::swap(Active, Inactive);
215 // Take type- and value- dependency from the active branch. Propagate all
216 // other flags from all branches.
217 return (Active & ExprDependence::TypeValue) |
218 ((Cond | Active | Inactive) & ~ExprDependence::TypeValue);
219}
220
222 auto D = ExprDependence::None;
223 for (auto *E : P->exprs())
224 D |= E->getDependence();
225 return D;
226}
227
231 (E->getSubExpr()->getDependence() & ~ExprDependence::Type);
232 return D;
233}
234
237 (ExprDependence::Instantiation | ExprDependence::Error);
238}
239
241 auto D = E->getCommonExpr()->getDependence() |
242 E->getSubExpr()->getDependence() | ExprDependence::Instantiation;
244 D &= ~ExprDependence::Instantiation;
246}
247
252
256
260
262 bool ContainsUnexpandedParameterPack) {
265 D |= ExprDependence::Instantiation;
266 if (ContainsUnexpandedParameterPack)
267 D |= ExprDependence::UnexpandedPack;
268 return D;
269}
270
272 // FIXME: AsTypeExpr doesn't store the type as written. Assume the expression
273 // type has identical sugar for now, so is a type-as-written.
276 if (!E->getType()->isDependentType())
278 return D;
279}
280
284
290
292 auto D = ExprDependence::None;
293 if (E->isTypeOperand())
296 else
298 // typeid is never type-dependent (C++ [temp.dep.expr]p4)
299 return D & ~ExprDependence::Type;
300}
301
305
309
317
319 // 'this' is type-dependent if the class type of the enclosing
320 // member function is dependent (C++ [temp.dep.expr]p2)
322
323 // If a lambda with an explicit object parameter captures '*this', then
324 // 'this' now refers to the captured copy of lambda, and if the lambda
325 // is type-dependent, so is the object and thus 'this'.
326 //
327 // Note: The standard does not mention this case explicitly, but we need
328 // to do this so we can mark NSDM accesses as dependent.
330 D |= ExprDependence::Type;
331
332 assert(!(D & ExprDependence::UnexpandedPack));
333 return D;
334}
335
337 auto *Op = E->getSubExpr();
338 if (!Op)
339 return ExprDependence::None;
340 return Op->getDependence() & ~ExprDependence::TypeValue;
341}
342
346
349 if (auto *TSI = E->getTypeSourceInfo())
350 D |= toExprDependenceAsWritten(TSI->getType()->getDependence());
351 return D;
352}
353
357
364
366 // Never type-dependent.
368 // Value-dependent if the argument is type-dependent.
370 D |= ExprDependence::Value;
371 return D;
372}
373
375 auto D = E->getOperand()->getDependence() & ~ExprDependence::TypeValue;
376 if (CT == CT_Dependent)
377 D |= ExprDependence::ValueInstantiation;
378 return D;
379}
380
382 return (E->getPattern()->getDependence() & ~ExprDependence::UnexpandedPack) |
383 ExprDependence::TypeValueInstantiation;
384}
385
387
389 ~ExprDependence::UnexpandedPack;
390
392 if (D & ExprDependence::TypeValueInstantiation)
393 D |= E->getIndexExpr()->getDependence() | PatternDep |
394 ExprDependence::Instantiation;
395
396 ArrayRef<Expr *> Exprs = E->getExpressions();
397 if (Exprs.empty() || !E->isFullySubstituted())
398 D |= PatternDep | ExprDependence::Instantiation;
399 else if (!E->getIndexExpr()->isInstantiationDependent()) {
400 UnsignedOrNone Index = E->getSelectedIndex();
401 assert(Index && *Index < Exprs.size() && "pack index out of bound");
402 D |= Exprs[*Index]->getDependence();
403 }
404 return D;
405}
406
410
412 if (auto *Resume = E->getResumeExpr())
413 return (Resume->getDependence() &
414 (ExprDependence::TypeValue | ExprDependence::Error)) |
415 (E->getCommonExpr()->getDependence() & ~ExprDependence::TypeValue);
416 return E->getCommonExpr()->getDependence() |
417 ExprDependence::TypeValueInstantiation;
418}
419
421 return E->getOperand()->getDependence() |
422 ExprDependence::TypeValueInstantiation;
423}
424
428
432
436
438 if (E->isObjectReceiver())
440 if (E->isSuperReceiver())
443 ~ExprDependence::TypeValue;
444 assert(E->isClassReceiver());
445 return ExprDependence::None;
446}
447
451
456
460
462 auto D = E->getBase()->getDependence();
463 if (auto *LB = E->getLowerBound())
464 D |= LB->getDependence();
465 if (auto *Len = E->getLength())
466 D |= Len->getDependence();
467
468 if (E->isOMPArraySection()) {
469 if (auto *Stride = E->getStride())
470 D |= Stride->getDependence();
471 }
472 return D;
473}
474
476 auto D = E->getBase()->getDependence();
477 for (Expr *Dim: E->getDimensions())
478 if (Dim)
479 D |= turnValueToTypeDependence(Dim->getDependence());
480 return D;
481}
482
485 for (unsigned I = 0, End = E->numOfIterators(); I < End; ++I) {
486 if (auto *DD = cast_or_null<DeclaratorDecl>(E->getIteratorDecl(I))) {
487 // If the type is omitted, it's 'int', and is not dependent in any way.
488 if (auto *TSI = DD->getTypeSourceInfo()) {
489 D |= toExprDependenceAsWritten(TSI->getType()->getDependence());
490 }
491 }
493 if (Expr *BE = IR.Begin)
494 D |= BE->getDependence();
495 if (Expr *EE = IR.End)
496 D |= EE->getDependence();
497 if (Expr *SE = IR.Step)
498 D |= SE->getDependence();
499 }
500 return D;
501}
502
503/// Compute the type-, value-, and instantiation-dependence of a
504/// declaration reference
505/// based on the declaration being referenced.
507 auto Deps = ExprDependence::None;
508
510 ~NestedNameSpecifierDependence::Dependent);
511
512 if (auto *FirstArg = E->getTemplateArgs()) {
513 unsigned NumArgs = E->getNumTemplateArgs();
514 for (auto *Arg = FirstArg, *End = FirstArg + NumArgs; Arg < End; ++Arg)
515 Deps |= toExprDependence(Arg->getArgument().getDependence());
516 }
517
518 auto *Decl = E->getDecl();
519 auto Type = E->getType();
520
521 if (Decl->isParameterPack())
522 Deps |= ExprDependence::UnexpandedPack;
524 ExprDependence::Error;
525
526 // C++ [temp.dep.expr]p3:
527 // An id-expression is type-dependent if it contains:
528
529 // - an identifier associated by name lookup with one or more declarations
530 // declared with a dependent type
531 // - an identifier associated by name lookup with an entity captured by
532 // copy ([expr.prim.lambda.capture])
533 // in a lambda-expression that has an explicit object parameter whose
534 // type is dependent ([dcl.fct]),
535 //
536 // [The "or more" case is not modeled as a DeclRefExpr. There are a bunch
537 // more bullets here that we handle by treating the declaration as having a
538 // dependent type if they involve a placeholder type that can't be deduced.]
539 if (Type->isDependentType())
540 Deps |= ExprDependence::TypeValueInstantiation;
542 Deps |= ExprDependence::Instantiation;
543
544 // - an identifier associated by name lookup with an entity captured by
545 // copy ([expr.prim.lambda.capture])
547 Deps |= ExprDependence::Type;
548
549 // - a conversion-function-id that specifies a dependent type
550 if (Decl->getDeclName().getNameKind() ==
552 QualType T = Decl->getDeclName().getCXXNameType();
553 if (T->isDependentType())
554 return Deps | ExprDependence::TypeValueInstantiation;
555
556 if (T->isInstantiationDependentType())
557 Deps |= ExprDependence::Instantiation;
558 }
559
560 // - a template-id that is dependent,
561 // - a nested-name-specifier or a qualified-id that names a member of an
562 // unknown specialization
563 // [These are not modeled as DeclRefExprs.]
564
565 // or if it names a dependent member of the current instantiation that is a
566 // static data member of type "array of unknown bound of T" for some T
567 // [handled below].
568
569 // C++ [temp.dep.constexpr]p2:
570 // An id-expression is value-dependent if:
571
572 // - it is type-dependent [handled above]
573
574 // - it is the name of a non-type template parameter,
576 return Deps | ExprDependence::ValueInstantiation;
577
578 // - it names a potentially-constant variable that is initialized with an
579 // expression that is value-dependent
580 if (const auto *Var = dyn_cast<VarDecl>(Decl)) {
581 if (const Expr *Init = Var->getAnyInitializer()) {
582 if (Init->containsErrors())
583 Deps |= ExprDependence::Error;
584
585 if (Var->mightBeUsableInConstantExpressions(Ctx) &&
586 Init->isValueDependent())
587 Deps |= ExprDependence::ValueInstantiation;
588 }
589
590 // - it names a static data member that is a dependent member of the
591 // current instantiation and is not initialized in a member-declarator,
592 if (Var->isStaticDataMember() &&
593 Var->getDeclContext()->isDependentContext() &&
594 !Var->getFirstDecl()->hasInit()) {
595 const VarDecl *First = Var->getFirstDecl();
596 TypeSourceInfo *TInfo = First->getTypeSourceInfo();
597 if (TInfo->getType()->isIncompleteArrayType()) {
598 Deps |= ExprDependence::TypeValueInstantiation;
599 } else if (!First->hasInit()) {
600 Deps |= ExprDependence::ValueInstantiation;
601 }
602 }
603
604 return Deps;
605 }
606
607 // - it names a static member function that is a dependent member of the
608 // current instantiation
609 //
610 // FIXME: It's unclear that the restriction to static members here has any
611 // effect: any use of a non-static member function name requires either
612 // forming a pointer-to-member or providing an object parameter, either of
613 // which makes the overall expression value-dependent.
614 if (auto *MD = dyn_cast<CXXMethodDecl>(Decl)) {
615 if (MD->isStatic() && Decl->getDeclContext()->isDependentContext())
616 Deps |= ExprDependence::ValueInstantiation;
617 }
618
619 return Deps;
620}
621
623 // RecoveryExpr is
624 // - always value-dependent, and therefore instantiation dependent
625 // - contains errors (ExprDependence::Error), by definition
626 // - type-dependent if we don't know the type (fallback to an opaque
627 // dependent type), or the type is known and dependent, or it has
628 // type-dependent subexpressions.
630 ExprDependence::ErrorDependent;
631 // FIXME: remove the type-dependent bit from subexpressions, if the
632 // RecoveryExpr has a non-dependent type.
633 for (auto *S : E->subExpressions())
634 D |= S->getDependence();
635 return D;
636}
637
642
646
648 auto D = E->getCallee()->getDependence();
649 if (E->getType()->isDependentType())
650 D |= ExprDependence::Type;
651 for (auto *A : ArrayRef(E->getArgs(), E->getNumArgs())) {
652 if (A)
653 D |= A->getDependence();
654 }
655 for (auto *A : PreArgs)
656 D |= A->getDependence();
657 return D;
658}
659
667
669 auto D = ExprDependence::None;
670 if (Name.isInstantiationDependent())
671 D |= ExprDependence::Instantiation;
673 D |= ExprDependence::UnexpandedPack;
674 return D;
675}
676
678 auto D = E->getBase()->getDependence();
680
682 ~NestedNameSpecifierDependence::Dependent);
683
684 for (const auto &A : E->template_arguments())
685 D |= toExprDependence(A.getArgument().getDependence());
686
687 auto *MemberDecl = E->getMemberDecl();
688 if (FieldDecl *FD = dyn_cast<FieldDecl>(MemberDecl)) {
689 DeclContext *DC = MemberDecl->getDeclContext();
690 // dyn_cast_or_null is used to handle objC variables which do not
691 // have a declaration context.
692 CXXRecordDecl *RD = dyn_cast_or_null<CXXRecordDecl>(DC);
693 if (RD && RD->isDependentContext() && RD->isCurrentInstantiation(DC)) {
694 if (!E->getType()->isDependentType())
696 }
697
698 // Bitfield with value-dependent width is type-dependent.
699 if (FD && FD->isBitField() && FD->getBitWidth()->isValueDependent()) {
700 D |= ExprDependence::Type;
701 }
702 }
703 return D;
704}
705
707 auto D = ExprDependence::None;
708 for (auto *A : E->inits())
709 D |= A->getDependence();
710 return D;
711}
712
715 for (auto *C : ArrayRef(E->getSubExprs(), E->getNumSubExprs()))
716 D |= C->getDependence();
717 return D;
718}
719
721 bool ContainsUnexpandedPack) {
722 auto D = ContainsUnexpandedPack ? ExprDependence::UnexpandedPack
723 : ExprDependence::None;
724 for (auto *AE : E->getAssocExprs())
725 D |= AE->getDependence() & ExprDependence::Error;
726
727 if (E->isExprPredicate())
728 D |= E->getControllingExpr()->getDependence() & ExprDependence::Error;
729 else
732
733 if (E->isResultDependent())
734 return D | ExprDependence::TypeValueInstantiation;
735 return D | (E->getResultExpr()->getDependence() &
736 ~ExprDependence::UnexpandedPack);
737}
738
740 auto Deps = E->getInit()->getDependence();
741 for (const auto &D : E->designators()) {
742 auto DesignatorDeps = ExprDependence::None;
743 if (D.isArrayDesignator())
744 DesignatorDeps |= E->getArrayIndex(D)->getDependence();
745 else if (D.isArrayRangeDesignator())
746 DesignatorDeps |= E->getArrayRangeStart(D)->getDependence() |
748 Deps |= DesignatorDeps;
749 if (DesignatorDeps & ExprDependence::TypeValue)
750 Deps |= ExprDependence::TypeValueInstantiation;
751 }
752 return Deps;
753}
754
756 auto D = O->getSyntacticForm()->getDependence();
757 for (auto *E : O->semantics())
758 D |= E->getDependence();
759 return D;
760}
761
763 auto D = ExprDependence::None;
764 for (auto *E : ArrayRef(A->getSubExprs(), A->getNumSubExprs()))
765 D |= E->getDependence();
766 return D;
767}
768
773 auto Size = E->getArraySize();
774 if (Size && *Size)
775 D |= turnTypeToValueDependence((*Size)->getDependence());
776 if (auto *I = E->getInitializer())
777 D |= turnTypeToValueDependence(I->getDependence());
778 for (auto *A : E->placement_arguments())
779 D |= turnTypeToValueDependence(A->getDependence());
780 return D;
781}
782
784 auto D = E->getBase()->getDependence();
785 if (auto *TSI = E->getDestroyedTypeInfo())
786 D |= toExprDependenceAsWritten(TSI->getType()->getDependence());
787 if (auto *ST = E->getScopeTypeInfo())
789 toExprDependenceAsWritten(ST->getType()->getDependence()));
791 ~NestedNameSpecifierDependence::Dependent);
792 return D;
793}
794
797 bool KnownInstantiationDependent,
798 bool KnownContainsUnexpandedParameterPack) {
799 auto Deps = ExprDependence::None;
800 if (KnownDependent)
801 Deps |= ExprDependence::TypeValue;
802 if (KnownInstantiationDependent)
803 Deps |= ExprDependence::Instantiation;
804 if (KnownContainsUnexpandedParameterPack)
805 Deps |= ExprDependence::UnexpandedPack;
806 Deps |= getDependenceInExpr(E->getNameInfo());
808 ~NestedNameSpecifierDependence::Dependent);
809 for (auto *D : E->decls()) {
810 if (D->getDeclContext()->isDependentContext() ||
812 Deps |= ExprDependence::TypeValueInstantiation;
813 }
814 // If we have explicit template arguments, check for dependent
815 // template arguments and whether they contain any unexpanded pack
816 // expansions.
817 for (const auto &A : E->template_arguments())
818 Deps |= toExprDependence(A.getArgument().getDependence());
819 return Deps;
820}
821
823 auto D = ExprDependence::TypeValue;
826 for (const auto &A : E->template_arguments())
827 D |= toExprDependence(A.getArgument().getDependence());
828 return D;
829}
830
834 for (auto *A : E->arguments())
835 D |= A->getDependence() & ~ExprDependence::Type;
836 return D;
837}
838
845
849
853
855 bool ContainsUnexpandedParameterPack) {
857 if (ContainsUnexpandedParameterPack)
858 D |= ExprDependence::UnexpandedPack;
859 return D;
860}
861
863 auto D = ExprDependence::ValueInstantiation;
866 for (auto *A : E->arguments())
867 D |= A->getDependence() &
868 (ExprDependence::UnexpandedPack | ExprDependence::Error);
869 return D;
870}
871
873 auto D = ExprDependence::TypeValueInstantiation;
874 if (!E->isImplicitAccess())
875 D |= E->getBase()->getDependence();
878 for (const auto &A : E->template_arguments())
879 D |= toExprDependence(A.getArgument().getDependence());
880 return D;
881}
882
886
888 auto D = ExprDependence::TypeValueInstantiation;
889 for (const auto *C : {E->getLHS(), E->getRHS()}) {
890 if (C)
891 D |= C->getDependence() & ~ExprDependence::UnexpandedPack;
892 }
893 return D;
894}
895
897 auto D = ExprDependence::None;
898 for (const auto *A : E->getInitExprs())
899 D |= A->getDependence();
900 return D;
901}
902
904 auto D = ExprDependence::None;
905 for (const auto *A : E->getArgs())
906 D |= toExprDependenceAsWritten(A->getType()->getDependence()) &
908 return D;
909}
910
912 bool ValueDependent) {
913 auto TA = TemplateArgumentDependence::None;
914 const auto InterestingDeps = TemplateArgumentDependence::Instantiation |
915 TemplateArgumentDependence::UnexpandedPack;
916 for (const TemplateArgumentLoc &ArgLoc :
918 TA |= ArgLoc.getArgument().getDependence() & InterestingDeps;
919 if (TA == InterestingDeps)
920 break;
921 }
922
924 ValueDependent ? ExprDependence::Value : ExprDependence::None;
925 auto Res = D | toExprDependence(TA);
926 if(!ValueDependent && E->getSatisfaction().ContainsErrors)
927 Res |= ExprDependence::Error;
928 return Res;
929}
930
932 auto D = ExprDependence::None;
933 Expr **Elements = E->getElements();
934 for (unsigned I = 0, N = E->getNumElements(); I != N; ++I)
935 D |= turnTypeToValueDependence(Elements[I]->getDependence());
936 return D;
937}
938
940 auto Deps = ExprDependence::None;
941 for (unsigned I = 0, N = E->getNumElements(); I < N; ++I) {
942 auto KV = E->getKeyValueElement(I);
943 auto KVDeps = turnTypeToValueDependence(KV.Key->getDependence() |
944 KV.Value->getDependence());
945 if (KV.EllipsisLoc.isValid())
946 KVDeps &= ~ExprDependence::UnexpandedPack;
947 Deps |= KVDeps;
948 }
949 return Deps;
950}
951
953 auto D = ExprDependence::None;
954 if (auto *R = E->getInstanceReceiver())
955 D |= R->getDependence();
956 else
958 for (auto *A : E->arguments())
959 D |= A->getDependence();
960 return D;
961}
962
964 // This represents a simple asterisk as typed, so cannot be dependent in any
965 // way.
966 return ExprDependence::None;
967}
static ExprDependence getDependenceInExpr(DeclarationNameInfo Name)
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.
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
Definition ASTContext.h:223
const LangOptions & getLangOpts() const
Definition ASTContext.h:959
Represents a loop initializing the elements of an array.
Definition Expr.h:5971
OpaqueValueExpr * getCommonExpr() const
Get the common subexpression shared by all initializations (the source array).
Definition Expr.h:5986
Expr * getSubExpr() const
Get the initializer to use for each array element.
Definition Expr.h:5991
This class represents BOTH the OpenMP Array Section and OpenACC 'subarray', with a boolean differenti...
Definition Expr.h:7222
Expr * getBase()
Get base of the array section.
Definition Expr.h:7300
Expr * getLength()
Get length of array section.
Definition Expr.h:7310
bool isOMPArraySection() const
Definition Expr.h:7296
Expr * getStride()
Get stride of array section.
Definition Expr.h:7314
Expr * getLowerBound()
Get lower bound of array section.
Definition Expr.h:7304
ArraySubscriptExpr - [C99 6.5.2.1] Array Subscripting.
Definition Expr.h:2727
Expr * getLHS()
An array access can be written A[4] or 4[A] (both are equivalent).
Definition Expr.h:2756
An Embarcadero array type trait, as used in the implementation of __array_rank and __array_extent.
Definition ExprCXX.h:3000
QualType getQueriedType() const
Definition ExprCXX.h:3044
Expr * getDimensionExpression() const
Definition ExprCXX.h:3050
AsTypeExpr - Clang builtin function __builtin_astype [OpenCL 6.2.4.2] This AST node provides support ...
Definition Expr.h:6736
Expr * getSrcExpr() const
getSrcExpr - Return the Expr to be converted.
Definition Expr.h:6755
AtomicExpr - Variadic atomic builtins: __atomic_exchange, __atomic_fetch_*, __atomic_load,...
Definition Expr.h:6931
Expr ** getSubExprs()
Definition Expr.h:7006
static unsigned getNumSubExprs(AtomicOp Op)
Determine the number of arguments the specified atomic builtin should have.
Definition Expr.cpp:5278
BinaryConditionalOperator - The GNU extension to the conditional operator which allows the middle ope...
Definition Expr.h:4459
Expr * getFalseExpr() const
getFalseExpr - Return the subexpression which will be evaluated if the condition evaluates to false; ...
Definition Expr.h:4513
Expr * getCommon() const
getCommon - Return the common expression, written to the left of the condition.
Definition Expr.h:4494
A builtin binary operation expression such as "x + y" or "x <= y".
Definition Expr.h:4044
Expr * getLHS() const
Definition Expr.h:4094
Expr * getRHS() const
Definition Expr.h:4096
BlockExpr - Adaptor class for mixing a BlockDecl with expressions.
Definition Expr.h:6675
const BlockDecl * getBlockDecl() const
Definition Expr.h:6687
Represents binding an expression to a temporary.
Definition ExprCXX.h:1497
const Expr * getSubExpr() const
Definition ExprCXX.h:1519
Represents a call to a C++ constructor.
Definition ExprCXX.h:1552
arg_range arguments()
Definition ExprCXX.h:1676
A default argument (C++ [dcl.fct.default]).
Definition ExprCXX.h:1274
A use of a default initializer in a constructor or in aggregate initialization.
Definition ExprCXX.h:1381
Expr * getExpr()
Get the initialization expression that will be used.
Definition ExprCXX.cpp:1112
Represents a delete expression for memory deallocation and destructor calls, e.g.
Definition ExprCXX.h:2630
Represents a C++ member access expression where the actual member referenced could not be resolved be...
Definition ExprCXX.h:3870
NestedNameSpecifier getQualifier() const
Retrieve the nested-name-specifier that qualifies the member name.
Definition ExprCXX.h:3977
const DeclarationNameInfo & getMemberNameInfo() const
Retrieve the name of the member that this expression refers to.
Definition ExprCXX.h:4003
Expr * getBase() const
Retrieve the base object of this member expressions, e.g., the x in x.m.
Definition ExprCXX.h:3960
bool isImplicitAccess() const
True if this is an implicit access, i.e.
Definition ExprCXX.h:3952
ArrayRef< TemplateArgumentLoc > template_arguments() const
Definition ExprCXX.h:4071
Represents a folding of a pack over an operator.
Definition ExprCXX.h:5032
Expr * getRHS() const
Definition ExprCXX.h:5058
Expr * getLHS() const
Definition ExprCXX.h:5057
Represents a new-expression for memory allocation and constructor calls, e.g: "new CXXNewExpr(foo)".
Definition ExprCXX.h:2359
llvm::iterator_range< arg_iterator > placement_arguments()
Definition ExprCXX.h:2576
QualType getAllocatedType() const
Definition ExprCXX.h:2438
std::optional< Expr * > getArraySize()
This might return std::nullopt even if isArray() returns true, since there might not be an array size...
Definition ExprCXX.h:2473
TypeSourceInfo * getAllocatedTypeSourceInfo() const
Definition ExprCXX.h:2442
Expr * getInitializer()
The initializer of this new-expression.
Definition ExprCXX.h:2537
Represents a C++11 noexcept expression (C++ [expr.unary.noexcept]).
Definition ExprCXX.h:4309
Expr * getOperand() const
Definition ExprCXX.h:4326
Represents a list-initialization with parenthesis.
Definition ExprCXX.h:5141
MutableArrayRef< Expr * > getInitExprs()
Definition ExprCXX.h:5181
Represents a C++ pseudo-destructor (C++ [expr.pseudo]).
Definition ExprCXX.h:2749
TypeSourceInfo * getDestroyedTypeInfo() const
Retrieve the source location information for the type being destroyed.
Definition ExprCXX.h:2843
TypeSourceInfo * getScopeTypeInfo() const
Retrieve the scope type in a qualified pseudo-destructor expression.
Definition ExprCXX.h:2827
NestedNameSpecifier getQualifier() const
If the member name was qualified, retrieves the nested-name-specifier that precedes the member name.
Definition ExprCXX.h:2807
Represents a C++ struct/union/class.
Definition DeclCXX.h:258
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.
Definition ExprCXX.h:290
Expr * getSemanticForm()
Get an equivalent semantic form for this expression.
Definition ExprCXX.h:308
An expression "T()" which creates an rvalue of a non-class type T.
Definition ExprCXX.h:2200
TypeSourceInfo * getTypeSourceInfo() const
Definition ExprCXX.h:2219
Implicit construction of a std::initializer_list<T> object from an array temporary within list-initia...
Definition ExprCXX.h:804
Represents a C++ functional cast expression that builds a temporary object.
Definition ExprCXX.h:1903
TypeSourceInfo * getTypeSourceInfo() const
Definition ExprCXX.h:1932
Represents the this expression in C++.
Definition ExprCXX.h:1158
bool isCapturedByCopyInLambdaWithExplicitObjectParameter() const
Definition ExprCXX.h:1184
A C++ throw-expression (C++ [except.throw]).
Definition ExprCXX.h:1212
const Expr * getSubExpr() const
Definition ExprCXX.h:1232
A C++ typeid expression (C++ [expr.typeid]), which gets the type_info that corresponds to the supplie...
Definition ExprCXX.h:852
bool isTypeOperand() const
Definition ExprCXX.h:888
TypeSourceInfo * getTypeOperandSourceInfo() const
Retrieve source information for the type operand.
Definition ExprCXX.h:895
Expr * getExprOperand() const
Definition ExprCXX.h:899
Describes an explicit type conversion that uses functional notion but could not be resolved because o...
Definition ExprCXX.h:3744
QualType getTypeAsWritten() const
Retrieve the type that is being constructed, as specified in the source code.
Definition ExprCXX.h:3778
A Microsoft C++ __uuidof expression, which gets the _GUID that corresponds to the supplied type or ex...
Definition ExprCXX.h:1072
Expr * getExprOperand() const
Definition ExprCXX.h:1113
bool isTypeOperand() const
Definition ExprCXX.h:1102
TypeSourceInfo * getTypeOperandSourceInfo() const
Retrieve source information for the type operand.
Definition ExprCXX.h:1109
CallExpr - Represents a function call (C99 6.5.2.2, C++ [expr.call]).
Definition Expr.h:2949
Expr * getCallee()
Definition Expr.h:3096
unsigned getNumArgs() const
getNumArgs - Return the number of actual arguments to this call.
Definition Expr.h:3140
Expr ** getArgs()
Retrieve the call arguments.
Definition Expr.h:3143
Expr * getSubExpr()
Definition Expr.h:3732
ChooseExpr - GNU builtin-in function __builtin_choose_expr.
Definition Expr.h:4854
Expr * getLHS() const
Definition Expr.h:4896
bool isConditionDependent() const
Definition Expr.h:4884
bool isConditionTrue() const
isConditionTrue - Return whether the condition is true (i.e.
Definition Expr.h:4877
Expr * getRHS() const
Definition Expr.h:4898
Expr * getCond() const
Definition Expr.h:4894
CompoundLiteralExpr - [C99 6.5.2.5].
Definition Expr.h:3611
const Expr * getInitializer() const
Definition Expr.h:3639
TypeSourceInfo * getTypeSourceInfo() const
Definition Expr.h:3649
Stmt * body_back()
Definition Stmt.h:1818
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 ?
Definition Expr.h:4397
Expr * getLHS() const
Definition Expr.h:4431
Expr * getCond() const
getCond - Return the expression representing the condition for the ?
Definition Expr.h:4420
Expr * getRHS() const
Definition Expr.h:4432
ConvertVectorExpr - Clang builtin function __builtin_convertvector This AST node provides support for...
Definition Expr.h:4725
TypeSourceInfo * getTypeSourceInfo() const
getTypeSourceInfo - Return the destination type.
Definition Expr.h:4818
Expr * getSrcExpr() const
getSrcExpr - Return the Expr to be converted.
Definition Expr.h:4815
Represents an expression that might suspend coroutine execution; either a co_await or co_yield expres...
Definition ExprCXX.h:5251
Expr * getResumeExpr() const
Definition ExprCXX.h:5315
Expr * getCommonExpr() const
Definition ExprCXX.h:5300
DeclContext - This is used only as base class of specific decl types that can act as declaration cont...
Definition DeclBase.h:1462
bool isDependentContext() const
Determines whether this context is dependent on a template parameter.
A reference to a declared variable, function, enum, etc.
Definition Expr.h:1276
unsigned getNumTemplateArgs() const
Retrieve the number of template arguments provided as part of this template-id.
Definition Expr.h:1451
NestedNameSpecifier getQualifier() const
If the name was qualified, retrieves the nested-name-specifier that precedes the name.
Definition Expr.h:1377
bool isCapturedByCopyInLambdaWithExplicitObjectParameter() const
Definition Expr.h:1492
ValueDecl * getDecl()
Definition Expr.h:1344
const TemplateArgumentLoc * getTemplateArgs() const
Retrieve the template arguments provided as part of this template-id.
Definition Expr.h:1443
Decl - This represents one declaration (or definition), e.g.
Definition DeclBase.h:86
bool isParameterPack() const
Whether this declaration is a parameter pack.
Definition DeclBase.cpp:266
llvm::iterator_range< specific_attr_iterator< T > > specific_attrs() const
Definition DeclBase.h:567
DeclContext * getDeclContext()
Definition DeclBase.h:456
Represents a 'co_await' expression while the type of the promise is dependent.
Definition ExprCXX.h:5397
Expr * getOperand() const
Definition ExprCXX.h:5420
A qualified reference to a name whose declaration cannot yet be resolved.
Definition ExprCXX.h:3510
ArrayRef< TemplateArgumentLoc > template_arguments() const
Definition ExprCXX.h:3618
NestedNameSpecifier getQualifier() const
Retrieve the nested-name-specifier that qualifies this declaration.
Definition ExprCXX.h:3562
const DeclarationNameInfo & getNameInfo() const
Retrieve the name that this expression refers to.
Definition ExprCXX.h:3546
Represents a C99 designated initializer expression.
Definition Expr.h:5554
Expr * getArrayRangeEnd(const Designator &D) const
Definition Expr.cpp:4904
Expr * getArrayRangeStart(const Designator &D) const
Definition Expr.cpp:4899
MutableArrayRef< Designator > designators()
Definition Expr.h:5787
Expr * getArrayIndex(const Designator &D) const
Definition Expr.cpp:4894
Expr * getInit() const
Retrieve the initializer value.
Definition Expr.h:5822
const Expr * getBase() const
Definition Expr.h:6584
ExplicitCastExpr - An explicit cast written in the source code.
Definition Expr.h:3934
This represents one expression.
Definition Expr.h:112
bool isTypeDependent() const
Determines whether the type of this expression depends on.
Definition Expr.h:194
Expr * IgnoreParens() LLVM_READONLY
Skip past any parentheses which might surround this expression until reaching a fixed point.
Definition Expr.cpp:3095
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.
Definition Expr.h:223
QualType getType() const
Definition Expr.h:144
ExprDependence getDependence() const
Definition Expr.h:164
An expression trait intrinsic.
Definition ExprCXX.h:3073
Expr * getQueriedExpression() const
Definition ExprCXX.h:3112
ExtVectorElementExpr - This represents access to specific elements of a vector, and may occur on the ...
Definition Expr.h:6613
Represents a member of a struct/union/class.
Definition Decl.h:3182
FullExpr - Represents a "full-expression" node.
Definition Expr.h:1055
const Expr * getSubExpr() const
Definition Expr.h:1068
Represents a C11 generic selection.
Definition Expr.h:6185
TypeSourceInfo * getControllingType()
Return the controlling type of this generic selection expression.
Definition Expr.h:6462
ArrayRef< Expr * > getAssocExprs() const
Definition Expr.h:6482
bool isExprPredicate() const
Whether this generic selection uses an expression as its controlling argument.
Definition Expr.h:6443
Expr * getResultExpr()
Return the result expression of this controlling expression.
Definition Expr.h:6471
bool isResultDependent() const
Whether this generic selection is result-dependent.
Definition Expr.h:6439
Expr * getControllingExpr()
Return the controlling expression of this generic selection expression.
Definition Expr.h:6450
ImplicitCastExpr - Allows us to explicitly represent implicit type conversions, which have no direct ...
Definition Expr.h:3859
Represents an implicitly-generated value initialization of an object of a given type.
Definition Expr.h:6060
Describes an C or C++ initializer list.
Definition Expr.h:5305
ArrayRef< Expr * > inits() const
Definition Expr.h:5358
A C++ lambda expression, which produces a function object (of unspecified type) that can be invoked l...
Definition ExprCXX.h:1972
A member reference to an MSPropertyDecl.
Definition ExprCXX.h:940
Expr * getBaseExpr() const
Definition ExprCXX.h:992
MS property subscript expression.
Definition ExprCXX.h:1010
Represents a prvalue temporary that is written into memory so that a reference can bind to it.
Definition ExprCXX.h:4920
Expr * getSubExpr() const
Retrieve the temporary-generating subexpression whose value will be materialized into a glvalue.
Definition ExprCXX.h:4937
MatrixSingleSubscriptExpr - Matrix single subscript expression for the MatrixType extension when you ...
Definition Expr.h:2801
MatrixSubscriptExpr - Matrix subscript expression for the MatrixType extension.
Definition Expr.h:2871
MemberExpr - [C99 6.5.2.3] Structure and Union Members.
Definition Expr.h:3370
ArrayRef< TemplateArgumentLoc > template_arguments() const
Definition Expr.h:3542
NestedNameSpecifier getQualifier() const
If the member name was qualified, retrieves the nested-name-specifier that precedes the member name.
Definition Expr.h:3481
ValueDecl * getMemberDecl() const
Retrieve the member declaration to which this expression refers.
Definition Expr.h:3453
Expr * getBase() const
Definition Expr.h:3447
DeclarationNameInfo getMemberNameInfo() const
Retrieve the member declaration name info.
Definition Expr.h:3547
NestedNameSpecifierDependence getDependence() const
Represents a place-holder for an object not to be initialized by anything.
Definition Expr.h:5880
An explicit cast in C or a C-style cast in C++, which uses the syntax ([s1][s2]......
Definition ExprOpenMP.h:24
Expr * getBase()
Fetches base expression of array shaping expression.
Definition ExprOpenMP.h:90
ArrayRef< Expr * > getDimensions() const
Fetches the dimensions for array shaping expression.
Definition ExprOpenMP.h:80
OpenMP 5.0 [2.1.6 Iterators] Iterators are identifiers that expand to multiple values in the clause o...
Definition ExprOpenMP.h:151
IteratorRange getIteratorRange(unsigned I)
Gets the iterator range for the given iterator.
Definition Expr.cpp:5563
unsigned numOfIterators() const
Returns number of iterator definitions.
Definition ExprOpenMP.h:275
Decl * getIteratorDecl(unsigned I)
Gets the iterator declaration for the given iterator.
Definition Expr.cpp:5559
ObjCArrayLiteral - used for objective-c array containers; as in: @["Hello", NSApp,...
Definition ExprObjC.h:220
Expr ** getElements()
Retrieve elements of array of literals.
Definition ExprObjC.h:251
unsigned getNumElements() const
getNumElements - Return number of elements of objective-c array literal.
Definition ExprObjC.h:257
ObjCBoxedExpr - used for generalized expression boxing.
Definition ExprObjC.h:159
ObjCDictionaryLiteral - AST node to represent objective-c dictionary literals; as in:"name" : NSUserN...
Definition ExprObjC.h:342
unsigned getNumElements() const
getNumElements - Return number of elements of objective-c dictionary literal.
Definition ExprObjC.h:392
ObjCDictionaryElement getKeyValueElement(unsigned Index) const
Definition ExprObjC.h:394
ObjCEncodeExpr, used for @encode in Objective-C.
Definition ExprObjC.h:441
QualType getEncodedType() const
Definition ExprObjC.h:460
ObjCIndirectCopyRestoreExpr - Represents the passing of a function argument by indirect copy-restore ...
Definition ExprObjC.h:1613
ObjCIsaExpr - Represent X->isa and X.isa when X is an ObjC 'id' type.
Definition ExprObjC.h:1529
Expr * getBase() const
Definition ExprObjC.h:1554
ObjCIvarRefExpr - A reference to an ObjC instance variable.
Definition ExprObjC.h:580
const Expr * getBase() const
Definition ExprObjC.h:614
An expression that sends a message to the given Objective-C object or class.
Definition ExprObjC.h:971
Expr * getInstanceReceiver()
Returns the object expression (receiver) for an instance message, or null for a message that is not a...
Definition ExprObjC.h:1299
llvm::iterator_range< arg_iterator > arguments()
Definition ExprObjC.h:1500
ObjCPropertyRefExpr - A dot-syntax expression to access an ObjC property.
Definition ExprObjC.h:648
const Expr * getBase() const
Definition ExprObjC.h:786
bool isObjectReceiver() const
Definition ExprObjC.h:801
QualType getSuperReceiverType() const
Definition ExprObjC.h:793
bool isClassReceiver() const
Definition ExprObjC.h:803
bool isSuperReceiver() const
Definition ExprObjC.h:802
ObjCSubscriptRefExpr - used for array and dictionary subscripting.
Definition ExprObjC.h:870
Expr * getKeyExpr() const
Definition ExprObjC.h:912
Expr * getBaseExpr() const
Definition ExprObjC.h:909
OffsetOfExpr - [C99 7.17] - This represents an expression of the form offsetof(record-type,...
Definition Expr.h:2533
Expr * getIndexExpr(unsigned Idx)
Definition Expr.h:2592
TypeSourceInfo * getTypeSourceInfo() const
Definition Expr.h:2573
unsigned getNumExpressions() const
Definition Expr.h:2604
OpaqueValueExpr - An expression referring to an opaque object of a fixed type and value class.
Definition Expr.h:1184
Expr * getSourceExpr() const
The source expression of an opaque value expression is the expression which originally generated the ...
Definition Expr.h:1234
This expression type represents an asterisk in an OpenACC Size-Expr, used in the 'tile' and 'gang' cl...
Definition Expr.h:2096
A reference to an overloaded function set, either an UnresolvedLookupExpr or an UnresolvedMemberExpr.
Definition ExprCXX.h:3132
NestedNameSpecifier getQualifier() const
Fetches the nested-name qualifier, if one was given.
Definition ExprCXX.h:3248
const DeclarationNameInfo & getNameInfo() const
Gets the full name info.
Definition ExprCXX.h:3239
llvm::iterator_range< decls_iterator > decls() const
Definition ExprCXX.h:3231
ArrayRef< TemplateArgumentLoc > template_arguments() const
Definition ExprCXX.h:3337
Represents a C++11 pack expansion that produces a sequence of expressions.
Definition ExprCXX.h:4363
Expr * getPattern()
Retrieve the pattern of the pack expansion.
Definition ExprCXX.h:4392
Expr * getIndexExpr() const
Definition ExprCXX.h:4628
ArrayRef< Expr * > getExpressions() const
Return the trailing expressions, regardless of the expansion.
Definition ExprCXX.h:4646
Expr * getPackIdExpression() const
Definition ExprCXX.h:4624
bool isFullySubstituted() const
Definition ExprCXX.h:4602
UnsignedOrNone getSelectedIndex() const
Definition ExprCXX.h:4630
ParenExpr - This represents a parenthesized expression, e.g.
Definition Expr.h:2188
const Expr * getSubExpr() const
Definition Expr.h:2205
ArrayRef< Expr * > exprs() const
Definition Expr.h:6130
[C99 6.4.2.2] - A predefined identifier such as func.
Definition Expr.h:2011
PseudoObjectExpr - An expression which accesses a pseudo-object l-value.
Definition Expr.h:6807
ArrayRef< Expr * > semantics()
Definition Expr.h:6879
Expr * getSyntacticForm()
Return the syntactic form of this expression, i.e.
Definition Expr.h:6844
A (possibly-)qualified type.
Definition TypeBase.h:937
Frontend produces RecoveryExprs on semantic errors that prevent creating other well-formed expression...
Definition Expr.h:7506
ArrayRef< Expr * > subExpressions()
Definition Expr.h:7513
TypeSourceInfo * getTypeSourceInfo()
Definition Expr.h:2149
ShuffleVectorExpr - clang-specific builtin-in function __builtin_shufflevector.
Definition Expr.h:4649
Expr ** getSubExprs()
Retrieve the array of expressions.
Definition Expr.h:4685
unsigned getNumSubExprs() const
getNumSubExprs - Return the size of the SubExprs array.
Definition Expr.h:4682
StmtExpr - This is the GNU Statement Expression extension: ({int X=4; X;}).
Definition Expr.h:4601
CompoundStmt * getSubStmt()
Definition Expr.h:4618
Represents a reference to a non-type template parameter that has been substituted with a template arg...
Definition ExprCXX.h:4664
Location wrapper for a TemplateArgument.
A container of type source information.
Definition TypeBase.h:8418
QualType getType() const
Return the type wrapped by this type source info.
Definition TypeBase.h:8429
A type trait used in the implementation of various C++11 and Library TR1 trait templates.
Definition ExprCXX.h:2900
ArrayRef< TypeSourceInfo * > getArgs() const
Retrieve the argument types.
Definition ExprCXX.h:2971
The base class of the type hierarchy.
Definition TypeBase.h:1875
bool isIncompleteArrayType() const
Definition TypeBase.h:8791
bool isInstantiationDependentType() const
Determine whether this type is an instantiation-dependent type, meaning that the type involves a temp...
Definition TypeBase.h:2854
bool isDependentType() const
Whether this type is a dependent type, meaning that its definition somehow depends on a template para...
Definition TypeBase.h:2846
TypeDependence getDependence() const
Definition TypeBase.h:2835
UnaryExprOrTypeTraitExpr - expression with either a type or (unevaluated) expression operand.
Definition Expr.h:2631
QualType getArgumentType() const
Definition Expr.h:2674
UnaryExprOrTypeTrait getKind() const
Definition Expr.h:2663
UnaryOperator - This represents the unary-expression's (except sizeof and alignof),...
Definition Expr.h:2250
Expr * getSubExpr() const
Definition Expr.h:2291
Opcode getOpcode() const
Definition Expr.h:2286
Represents a call to the builtin function __builtin_va_arg.
Definition Expr.h:4963
TypeSourceInfo * getWrittenTypeInfo() const
Definition Expr.h:4987
const Expr * getSubExpr() const
Definition Expr.h:4979
Represent the declaration of a variable (in which case it is an lvalue) a function (in which case it ...
Definition Decl.h:712
const Expr * getExprStmt() const
Definition Stmt.cpp:420
Represents a variable declaration or definition.
Definition Decl.h:924
The JSON file list parser is used to communicate input to InstallAPI.
bool isa(CodeGen::Address addr)
Definition Address.h:330
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)
Expr * Cond
};
ExprDependence turnValueToTypeDependence(ExprDependence D)
@ Result
The result type of a method or function.
Definition TypeBase.h:905
OptionalUnsigned< unsigned > UnsignedOrNone
ExprDependence toExprDependenceForImpliedType(TypeDependence D)
U cast(CodeGen::Address addr)
Definition Address.h:327
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.
Definition Expr.h:652
Iterator range representation begin:end[:step].
Definition ExprOpenMP.h:154