1*5ffd83dbSDimitry Andric //===--- ComputeDependence.h -------------------------------------- C++ -*-===// 2*5ffd83dbSDimitry Andric // 3*5ffd83dbSDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4*5ffd83dbSDimitry Andric // See https://llvm.org/LICENSE.txt for license information. 5*5ffd83dbSDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6*5ffd83dbSDimitry Andric // 7*5ffd83dbSDimitry Andric //===----------------------------------------------------------------------===// 8*5ffd83dbSDimitry Andric // 9*5ffd83dbSDimitry Andric // Calculate various template dependency flags for the AST. 10*5ffd83dbSDimitry Andric // 11*5ffd83dbSDimitry Andric //===----------------------------------------------------------------------===// 12*5ffd83dbSDimitry Andric 13*5ffd83dbSDimitry Andric #ifndef LLVM_CLANG_AST_COMPUTE_DEPENDENCE_H 14*5ffd83dbSDimitry Andric #define LLVM_CLANG_AST_COMPUTE_DEPENDENCE_H 15*5ffd83dbSDimitry Andric 16*5ffd83dbSDimitry Andric #include "clang/AST/DependenceFlags.h" 17*5ffd83dbSDimitry Andric #include "clang/Basic/ExceptionSpecificationType.h" 18*5ffd83dbSDimitry Andric #include "llvm/ADT/ArrayRef.h" 19*5ffd83dbSDimitry Andric 20*5ffd83dbSDimitry Andric namespace clang { 21*5ffd83dbSDimitry Andric 22*5ffd83dbSDimitry Andric class ASTContext; 23*5ffd83dbSDimitry Andric 24*5ffd83dbSDimitry Andric class Expr; 25*5ffd83dbSDimitry Andric class FullExpr; 26*5ffd83dbSDimitry Andric class OpaqueValueExpr; 27*5ffd83dbSDimitry Andric class ParenExpr; 28*5ffd83dbSDimitry Andric class UnaryOperator; 29*5ffd83dbSDimitry Andric class UnaryExprOrTypeTraitExpr; 30*5ffd83dbSDimitry Andric class ArraySubscriptExpr; 31*5ffd83dbSDimitry Andric class MatrixSubscriptExpr; 32*5ffd83dbSDimitry Andric class CompoundLiteralExpr; 33*5ffd83dbSDimitry Andric class CastExpr; 34*5ffd83dbSDimitry Andric class BinaryOperator; 35*5ffd83dbSDimitry Andric class ConditionalOperator; 36*5ffd83dbSDimitry Andric class BinaryConditionalOperator; 37*5ffd83dbSDimitry Andric class StmtExpr; 38*5ffd83dbSDimitry Andric class ConvertVectorExpr; 39*5ffd83dbSDimitry Andric class VAArgExpr; 40*5ffd83dbSDimitry Andric class ChooseExpr; 41*5ffd83dbSDimitry Andric class NoInitExpr; 42*5ffd83dbSDimitry Andric class ArrayInitLoopExpr; 43*5ffd83dbSDimitry Andric class ImplicitValueInitExpr; 44*5ffd83dbSDimitry Andric class InitListExpr; 45*5ffd83dbSDimitry Andric class ExtVectorElementExpr; 46*5ffd83dbSDimitry Andric class BlockExpr; 47*5ffd83dbSDimitry Andric class AsTypeExpr; 48*5ffd83dbSDimitry Andric class DeclRefExpr; 49*5ffd83dbSDimitry Andric class RecoveryExpr; 50*5ffd83dbSDimitry Andric class CXXRewrittenBinaryOperator; 51*5ffd83dbSDimitry Andric class CXXStdInitializerListExpr; 52*5ffd83dbSDimitry Andric class CXXTypeidExpr; 53*5ffd83dbSDimitry Andric class MSPropertyRefExpr; 54*5ffd83dbSDimitry Andric class MSPropertySubscriptExpr; 55*5ffd83dbSDimitry Andric class CXXUuidofExpr; 56*5ffd83dbSDimitry Andric class CXXThisExpr; 57*5ffd83dbSDimitry Andric class CXXThrowExpr; 58*5ffd83dbSDimitry Andric class CXXBindTemporaryExpr; 59*5ffd83dbSDimitry Andric class CXXScalarValueInitExpr; 60*5ffd83dbSDimitry Andric class CXXDeleteExpr; 61*5ffd83dbSDimitry Andric class ArrayTypeTraitExpr; 62*5ffd83dbSDimitry Andric class ExpressionTraitExpr; 63*5ffd83dbSDimitry Andric class CXXNoexceptExpr; 64*5ffd83dbSDimitry Andric class PackExpansionExpr; 65*5ffd83dbSDimitry Andric class SubstNonTypeTemplateParmExpr; 66*5ffd83dbSDimitry Andric class CoroutineSuspendExpr; 67*5ffd83dbSDimitry Andric class DependentCoawaitExpr; 68*5ffd83dbSDimitry Andric class CXXNewExpr; 69*5ffd83dbSDimitry Andric class CXXPseudoDestructorExpr; 70*5ffd83dbSDimitry Andric class OverloadExpr; 71*5ffd83dbSDimitry Andric class DependentScopeDeclRefExpr; 72*5ffd83dbSDimitry Andric class CXXConstructExpr; 73*5ffd83dbSDimitry Andric class LambdaExpr; 74*5ffd83dbSDimitry Andric class CXXUnresolvedConstructExpr; 75*5ffd83dbSDimitry Andric class CXXDependentScopeMemberExpr; 76*5ffd83dbSDimitry Andric class MaterializeTemporaryExpr; 77*5ffd83dbSDimitry Andric class CXXFoldExpr; 78*5ffd83dbSDimitry Andric class TypeTraitExpr; 79*5ffd83dbSDimitry Andric class ConceptSpecializationExpr; 80*5ffd83dbSDimitry Andric class PredefinedExpr; 81*5ffd83dbSDimitry Andric class CallExpr; 82*5ffd83dbSDimitry Andric class OffsetOfExpr; 83*5ffd83dbSDimitry Andric class MemberExpr; 84*5ffd83dbSDimitry Andric class ShuffleVectorExpr; 85*5ffd83dbSDimitry Andric class GenericSelectionExpr; 86*5ffd83dbSDimitry Andric class DesignatedInitExpr; 87*5ffd83dbSDimitry Andric class ParenListExpr; 88*5ffd83dbSDimitry Andric class PseudoObjectExpr; 89*5ffd83dbSDimitry Andric class AtomicExpr; 90*5ffd83dbSDimitry Andric class OMPArraySectionExpr; 91*5ffd83dbSDimitry Andric class OMPArrayShapingExpr; 92*5ffd83dbSDimitry Andric class OMPIteratorExpr; 93*5ffd83dbSDimitry Andric class ObjCArrayLiteral; 94*5ffd83dbSDimitry Andric class ObjCDictionaryLiteral; 95*5ffd83dbSDimitry Andric class ObjCBoxedExpr; 96*5ffd83dbSDimitry Andric class ObjCEncodeExpr; 97*5ffd83dbSDimitry Andric class ObjCIvarRefExpr; 98*5ffd83dbSDimitry Andric class ObjCPropertyRefExpr; 99*5ffd83dbSDimitry Andric class ObjCSubscriptRefExpr; 100*5ffd83dbSDimitry Andric class ObjCIsaExpr; 101*5ffd83dbSDimitry Andric class ObjCIndirectCopyRestoreExpr; 102*5ffd83dbSDimitry Andric class ObjCMessageExpr; 103*5ffd83dbSDimitry Andric 104*5ffd83dbSDimitry Andric // The following functions are called from constructors of `Expr`, so they 105*5ffd83dbSDimitry Andric // should not access anything beyond basic 106*5ffd83dbSDimitry Andric ExprDependence computeDependence(FullExpr *E); 107*5ffd83dbSDimitry Andric ExprDependence computeDependence(OpaqueValueExpr *E); 108*5ffd83dbSDimitry Andric ExprDependence computeDependence(ParenExpr *E); 109*5ffd83dbSDimitry Andric ExprDependence computeDependence(UnaryOperator *E); 110*5ffd83dbSDimitry Andric ExprDependence computeDependence(UnaryExprOrTypeTraitExpr *E); 111*5ffd83dbSDimitry Andric ExprDependence computeDependence(ArraySubscriptExpr *E); 112*5ffd83dbSDimitry Andric ExprDependence computeDependence(MatrixSubscriptExpr *E); 113*5ffd83dbSDimitry Andric ExprDependence computeDependence(CompoundLiteralExpr *E); 114*5ffd83dbSDimitry Andric ExprDependence computeDependence(CastExpr *E); 115*5ffd83dbSDimitry Andric ExprDependence computeDependence(BinaryOperator *E); 116*5ffd83dbSDimitry Andric ExprDependence computeDependence(ConditionalOperator *E); 117*5ffd83dbSDimitry Andric ExprDependence computeDependence(BinaryConditionalOperator *E); 118*5ffd83dbSDimitry Andric ExprDependence computeDependence(StmtExpr *E, unsigned TemplateDepth); 119*5ffd83dbSDimitry Andric ExprDependence computeDependence(ConvertVectorExpr *E); 120*5ffd83dbSDimitry Andric ExprDependence computeDependence(VAArgExpr *E); 121*5ffd83dbSDimitry Andric ExprDependence computeDependence(ChooseExpr *E); 122*5ffd83dbSDimitry Andric ExprDependence computeDependence(NoInitExpr *E); 123*5ffd83dbSDimitry Andric ExprDependence computeDependence(ArrayInitLoopExpr *E); 124*5ffd83dbSDimitry Andric ExprDependence computeDependence(ImplicitValueInitExpr *E); 125*5ffd83dbSDimitry Andric ExprDependence computeDependence(InitListExpr *E); 126*5ffd83dbSDimitry Andric ExprDependence computeDependence(ExtVectorElementExpr *E); 127*5ffd83dbSDimitry Andric ExprDependence computeDependence(BlockExpr *E); 128*5ffd83dbSDimitry Andric ExprDependence computeDependence(AsTypeExpr *E); 129*5ffd83dbSDimitry Andric ExprDependence computeDependence(DeclRefExpr *E, const ASTContext &Ctx); 130*5ffd83dbSDimitry Andric ExprDependence computeDependence(RecoveryExpr *E); 131*5ffd83dbSDimitry Andric ExprDependence computeDependence(CXXRewrittenBinaryOperator *E); 132*5ffd83dbSDimitry Andric ExprDependence computeDependence(CXXStdInitializerListExpr *E); 133*5ffd83dbSDimitry Andric ExprDependence computeDependence(CXXTypeidExpr *E); 134*5ffd83dbSDimitry Andric ExprDependence computeDependence(MSPropertyRefExpr *E); 135*5ffd83dbSDimitry Andric ExprDependence computeDependence(MSPropertySubscriptExpr *E); 136*5ffd83dbSDimitry Andric ExprDependence computeDependence(CXXUuidofExpr *E); 137*5ffd83dbSDimitry Andric ExprDependence computeDependence(CXXThisExpr *E); 138*5ffd83dbSDimitry Andric ExprDependence computeDependence(CXXThrowExpr *E); 139*5ffd83dbSDimitry Andric ExprDependence computeDependence(CXXBindTemporaryExpr *E); 140*5ffd83dbSDimitry Andric ExprDependence computeDependence(CXXScalarValueInitExpr *E); 141*5ffd83dbSDimitry Andric ExprDependence computeDependence(CXXDeleteExpr *E); 142*5ffd83dbSDimitry Andric ExprDependence computeDependence(ArrayTypeTraitExpr *E); 143*5ffd83dbSDimitry Andric ExprDependence computeDependence(ExpressionTraitExpr *E); 144*5ffd83dbSDimitry Andric ExprDependence computeDependence(CXXNoexceptExpr *E, CanThrowResult CT); 145*5ffd83dbSDimitry Andric ExprDependence computeDependence(PackExpansionExpr *E); 146*5ffd83dbSDimitry Andric ExprDependence computeDependence(SubstNonTypeTemplateParmExpr *E); 147*5ffd83dbSDimitry Andric ExprDependence computeDependence(CoroutineSuspendExpr *E); 148*5ffd83dbSDimitry Andric ExprDependence computeDependence(DependentCoawaitExpr *E); 149*5ffd83dbSDimitry Andric ExprDependence computeDependence(CXXNewExpr *E); 150*5ffd83dbSDimitry Andric ExprDependence computeDependence(CXXPseudoDestructorExpr *E); 151*5ffd83dbSDimitry Andric ExprDependence computeDependence(OverloadExpr *E, bool KnownDependent, 152*5ffd83dbSDimitry Andric bool KnownInstantiationDependent, 153*5ffd83dbSDimitry Andric bool KnownContainsUnexpandedParameterPack); 154*5ffd83dbSDimitry Andric ExprDependence computeDependence(DependentScopeDeclRefExpr *E); 155*5ffd83dbSDimitry Andric ExprDependence computeDependence(CXXConstructExpr *E); 156*5ffd83dbSDimitry Andric ExprDependence computeDependence(LambdaExpr *E, 157*5ffd83dbSDimitry Andric bool ContainsUnexpandedParameterPack); 158*5ffd83dbSDimitry Andric ExprDependence computeDependence(CXXUnresolvedConstructExpr *E); 159*5ffd83dbSDimitry Andric ExprDependence computeDependence(CXXDependentScopeMemberExpr *E); 160*5ffd83dbSDimitry Andric ExprDependence computeDependence(MaterializeTemporaryExpr *E); 161*5ffd83dbSDimitry Andric ExprDependence computeDependence(CXXFoldExpr *E); 162*5ffd83dbSDimitry Andric ExprDependence computeDependence(TypeTraitExpr *E); 163*5ffd83dbSDimitry Andric ExprDependence computeDependence(ConceptSpecializationExpr *E, 164*5ffd83dbSDimitry Andric bool ValueDependent); 165*5ffd83dbSDimitry Andric 166*5ffd83dbSDimitry Andric ExprDependence computeDependence(PredefinedExpr *E); 167*5ffd83dbSDimitry Andric ExprDependence computeDependence(CallExpr *E, llvm::ArrayRef<Expr *> PreArgs); 168*5ffd83dbSDimitry Andric ExprDependence computeDependence(OffsetOfExpr *E); 169*5ffd83dbSDimitry Andric ExprDependence computeDependence(MemberExpr *E); 170*5ffd83dbSDimitry Andric ExprDependence computeDependence(ShuffleVectorExpr *E); 171*5ffd83dbSDimitry Andric ExprDependence computeDependence(GenericSelectionExpr *E, 172*5ffd83dbSDimitry Andric bool ContainsUnexpandedPack); 173*5ffd83dbSDimitry Andric ExprDependence computeDependence(DesignatedInitExpr *E); 174*5ffd83dbSDimitry Andric ExprDependence computeDependence(ParenListExpr *E); 175*5ffd83dbSDimitry Andric ExprDependence computeDependence(PseudoObjectExpr *E); 176*5ffd83dbSDimitry Andric ExprDependence computeDependence(AtomicExpr *E); 177*5ffd83dbSDimitry Andric 178*5ffd83dbSDimitry Andric ExprDependence computeDependence(OMPArraySectionExpr *E); 179*5ffd83dbSDimitry Andric ExprDependence computeDependence(OMPArrayShapingExpr *E); 180*5ffd83dbSDimitry Andric ExprDependence computeDependence(OMPIteratorExpr *E); 181*5ffd83dbSDimitry Andric 182*5ffd83dbSDimitry Andric ExprDependence computeDependence(ObjCArrayLiteral *E); 183*5ffd83dbSDimitry Andric ExprDependence computeDependence(ObjCDictionaryLiteral *E); 184*5ffd83dbSDimitry Andric ExprDependence computeDependence(ObjCBoxedExpr *E); 185*5ffd83dbSDimitry Andric ExprDependence computeDependence(ObjCEncodeExpr *E); 186*5ffd83dbSDimitry Andric ExprDependence computeDependence(ObjCIvarRefExpr *E); 187*5ffd83dbSDimitry Andric ExprDependence computeDependence(ObjCPropertyRefExpr *E); 188*5ffd83dbSDimitry Andric ExprDependence computeDependence(ObjCSubscriptRefExpr *E); 189*5ffd83dbSDimitry Andric ExprDependence computeDependence(ObjCIsaExpr *E); 190*5ffd83dbSDimitry Andric ExprDependence computeDependence(ObjCIndirectCopyRestoreExpr *E); 191*5ffd83dbSDimitry Andric ExprDependence computeDependence(ObjCMessageExpr *E); 192*5ffd83dbSDimitry Andric 193*5ffd83dbSDimitry Andric } // namespace clang 194*5ffd83dbSDimitry Andric #endif 195