15ffd83dbSDimitry Andric //===--- ComputeDependence.h -------------------------------------- C++ -*-===// 25ffd83dbSDimitry Andric // 35ffd83dbSDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 45ffd83dbSDimitry Andric // See https://llvm.org/LICENSE.txt for license information. 55ffd83dbSDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 65ffd83dbSDimitry Andric // 75ffd83dbSDimitry Andric //===----------------------------------------------------------------------===// 85ffd83dbSDimitry Andric // 95ffd83dbSDimitry Andric // Calculate various template dependency flags for the AST. 105ffd83dbSDimitry Andric // 115ffd83dbSDimitry Andric //===----------------------------------------------------------------------===// 125ffd83dbSDimitry Andric 135ffd83dbSDimitry Andric #ifndef LLVM_CLANG_AST_COMPUTE_DEPENDENCE_H 145ffd83dbSDimitry Andric #define LLVM_CLANG_AST_COMPUTE_DEPENDENCE_H 155ffd83dbSDimitry Andric 165ffd83dbSDimitry Andric #include "clang/AST/DependenceFlags.h" 175ffd83dbSDimitry Andric #include "clang/Basic/ExceptionSpecificationType.h" 185ffd83dbSDimitry Andric #include "llvm/ADT/ArrayRef.h" 195ffd83dbSDimitry Andric 205ffd83dbSDimitry Andric namespace clang { 215ffd83dbSDimitry Andric 225ffd83dbSDimitry Andric class ASTContext; 235ffd83dbSDimitry Andric 245ffd83dbSDimitry Andric class Expr; 255ffd83dbSDimitry Andric class FullExpr; 265ffd83dbSDimitry Andric class OpaqueValueExpr; 275ffd83dbSDimitry Andric class ParenExpr; 285ffd83dbSDimitry Andric class UnaryOperator; 295ffd83dbSDimitry Andric class UnaryExprOrTypeTraitExpr; 305ffd83dbSDimitry Andric class ArraySubscriptExpr; 315ffd83dbSDimitry Andric class MatrixSubscriptExpr; 325ffd83dbSDimitry Andric class CompoundLiteralExpr; 335ffd83dbSDimitry Andric class CastExpr; 345ffd83dbSDimitry Andric class BinaryOperator; 355ffd83dbSDimitry Andric class ConditionalOperator; 365ffd83dbSDimitry Andric class BinaryConditionalOperator; 375ffd83dbSDimitry Andric class StmtExpr; 385ffd83dbSDimitry Andric class ConvertVectorExpr; 395ffd83dbSDimitry Andric class VAArgExpr; 405ffd83dbSDimitry Andric class ChooseExpr; 415ffd83dbSDimitry Andric class NoInitExpr; 425ffd83dbSDimitry Andric class ArrayInitLoopExpr; 435ffd83dbSDimitry Andric class ImplicitValueInitExpr; 445ffd83dbSDimitry Andric class InitListExpr; 455ffd83dbSDimitry Andric class ExtVectorElementExpr; 465ffd83dbSDimitry Andric class BlockExpr; 475ffd83dbSDimitry Andric class AsTypeExpr; 485ffd83dbSDimitry Andric class DeclRefExpr; 495ffd83dbSDimitry Andric class RecoveryExpr; 505ffd83dbSDimitry Andric class CXXRewrittenBinaryOperator; 515ffd83dbSDimitry Andric class CXXStdInitializerListExpr; 525ffd83dbSDimitry Andric class CXXTypeidExpr; 535ffd83dbSDimitry Andric class MSPropertyRefExpr; 545ffd83dbSDimitry Andric class MSPropertySubscriptExpr; 555ffd83dbSDimitry Andric class CXXUuidofExpr; 565ffd83dbSDimitry Andric class CXXThisExpr; 575ffd83dbSDimitry Andric class CXXThrowExpr; 585ffd83dbSDimitry Andric class CXXBindTemporaryExpr; 595ffd83dbSDimitry Andric class CXXScalarValueInitExpr; 605ffd83dbSDimitry Andric class CXXDeleteExpr; 615ffd83dbSDimitry Andric class ArrayTypeTraitExpr; 625ffd83dbSDimitry Andric class ExpressionTraitExpr; 635ffd83dbSDimitry Andric class CXXNoexceptExpr; 645ffd83dbSDimitry Andric class PackExpansionExpr; 655ffd83dbSDimitry Andric class SubstNonTypeTemplateParmExpr; 665ffd83dbSDimitry Andric class CoroutineSuspendExpr; 675ffd83dbSDimitry Andric class DependentCoawaitExpr; 685ffd83dbSDimitry Andric class CXXNewExpr; 695ffd83dbSDimitry Andric class CXXPseudoDestructorExpr; 705ffd83dbSDimitry Andric class OverloadExpr; 715ffd83dbSDimitry Andric class DependentScopeDeclRefExpr; 725ffd83dbSDimitry Andric class CXXConstructExpr; 73*e8d8bef9SDimitry Andric class CXXDefaultInitExpr; 745ffd83dbSDimitry Andric class LambdaExpr; 755ffd83dbSDimitry Andric class CXXUnresolvedConstructExpr; 765ffd83dbSDimitry Andric class CXXDependentScopeMemberExpr; 775ffd83dbSDimitry Andric class MaterializeTemporaryExpr; 785ffd83dbSDimitry Andric class CXXFoldExpr; 795ffd83dbSDimitry Andric class TypeTraitExpr; 805ffd83dbSDimitry Andric class ConceptSpecializationExpr; 815ffd83dbSDimitry Andric class PredefinedExpr; 825ffd83dbSDimitry Andric class CallExpr; 835ffd83dbSDimitry Andric class OffsetOfExpr; 845ffd83dbSDimitry Andric class MemberExpr; 855ffd83dbSDimitry Andric class ShuffleVectorExpr; 865ffd83dbSDimitry Andric class GenericSelectionExpr; 875ffd83dbSDimitry Andric class DesignatedInitExpr; 885ffd83dbSDimitry Andric class ParenListExpr; 895ffd83dbSDimitry Andric class PseudoObjectExpr; 905ffd83dbSDimitry Andric class AtomicExpr; 915ffd83dbSDimitry Andric class OMPArraySectionExpr; 925ffd83dbSDimitry Andric class OMPArrayShapingExpr; 935ffd83dbSDimitry Andric class OMPIteratorExpr; 945ffd83dbSDimitry Andric class ObjCArrayLiteral; 955ffd83dbSDimitry Andric class ObjCDictionaryLiteral; 965ffd83dbSDimitry Andric class ObjCBoxedExpr; 975ffd83dbSDimitry Andric class ObjCEncodeExpr; 985ffd83dbSDimitry Andric class ObjCIvarRefExpr; 995ffd83dbSDimitry Andric class ObjCPropertyRefExpr; 1005ffd83dbSDimitry Andric class ObjCSubscriptRefExpr; 1015ffd83dbSDimitry Andric class ObjCIsaExpr; 1025ffd83dbSDimitry Andric class ObjCIndirectCopyRestoreExpr; 1035ffd83dbSDimitry Andric class ObjCMessageExpr; 1045ffd83dbSDimitry Andric 1055ffd83dbSDimitry Andric // The following functions are called from constructors of `Expr`, so they 1065ffd83dbSDimitry Andric // should not access anything beyond basic 1075ffd83dbSDimitry Andric ExprDependence computeDependence(FullExpr *E); 1085ffd83dbSDimitry Andric ExprDependence computeDependence(OpaqueValueExpr *E); 1095ffd83dbSDimitry Andric ExprDependence computeDependence(ParenExpr *E); 110*e8d8bef9SDimitry Andric ExprDependence computeDependence(UnaryOperator *E, const ASTContext &Ctx); 1115ffd83dbSDimitry Andric ExprDependence computeDependence(UnaryExprOrTypeTraitExpr *E); 1125ffd83dbSDimitry Andric ExprDependence computeDependence(ArraySubscriptExpr *E); 1135ffd83dbSDimitry Andric ExprDependence computeDependence(MatrixSubscriptExpr *E); 1145ffd83dbSDimitry Andric ExprDependence computeDependence(CompoundLiteralExpr *E); 1155ffd83dbSDimitry Andric ExprDependence computeDependence(CastExpr *E); 1165ffd83dbSDimitry Andric ExprDependence computeDependence(BinaryOperator *E); 1175ffd83dbSDimitry Andric ExprDependence computeDependence(ConditionalOperator *E); 1185ffd83dbSDimitry Andric ExprDependence computeDependence(BinaryConditionalOperator *E); 1195ffd83dbSDimitry Andric ExprDependence computeDependence(StmtExpr *E, unsigned TemplateDepth); 1205ffd83dbSDimitry Andric ExprDependence computeDependence(ConvertVectorExpr *E); 1215ffd83dbSDimitry Andric ExprDependence computeDependence(VAArgExpr *E); 1225ffd83dbSDimitry Andric ExprDependence computeDependence(ChooseExpr *E); 1235ffd83dbSDimitry Andric ExprDependence computeDependence(NoInitExpr *E); 1245ffd83dbSDimitry Andric ExprDependence computeDependence(ArrayInitLoopExpr *E); 1255ffd83dbSDimitry Andric ExprDependence computeDependence(ImplicitValueInitExpr *E); 1265ffd83dbSDimitry Andric ExprDependence computeDependence(InitListExpr *E); 1275ffd83dbSDimitry Andric ExprDependence computeDependence(ExtVectorElementExpr *E); 1285ffd83dbSDimitry Andric ExprDependence computeDependence(BlockExpr *E); 1295ffd83dbSDimitry Andric ExprDependence computeDependence(AsTypeExpr *E); 1305ffd83dbSDimitry Andric ExprDependence computeDependence(DeclRefExpr *E, const ASTContext &Ctx); 1315ffd83dbSDimitry Andric ExprDependence computeDependence(RecoveryExpr *E); 1325ffd83dbSDimitry Andric ExprDependence computeDependence(CXXRewrittenBinaryOperator *E); 1335ffd83dbSDimitry Andric ExprDependence computeDependence(CXXStdInitializerListExpr *E); 1345ffd83dbSDimitry Andric ExprDependence computeDependence(CXXTypeidExpr *E); 1355ffd83dbSDimitry Andric ExprDependence computeDependence(MSPropertyRefExpr *E); 1365ffd83dbSDimitry Andric ExprDependence computeDependence(MSPropertySubscriptExpr *E); 1375ffd83dbSDimitry Andric ExprDependence computeDependence(CXXUuidofExpr *E); 1385ffd83dbSDimitry Andric ExprDependence computeDependence(CXXThisExpr *E); 1395ffd83dbSDimitry Andric ExprDependence computeDependence(CXXThrowExpr *E); 1405ffd83dbSDimitry Andric ExprDependence computeDependence(CXXBindTemporaryExpr *E); 1415ffd83dbSDimitry Andric ExprDependence computeDependence(CXXScalarValueInitExpr *E); 1425ffd83dbSDimitry Andric ExprDependence computeDependence(CXXDeleteExpr *E); 1435ffd83dbSDimitry Andric ExprDependence computeDependence(ArrayTypeTraitExpr *E); 1445ffd83dbSDimitry Andric ExprDependence computeDependence(ExpressionTraitExpr *E); 1455ffd83dbSDimitry Andric ExprDependence computeDependence(CXXNoexceptExpr *E, CanThrowResult CT); 1465ffd83dbSDimitry Andric ExprDependence computeDependence(PackExpansionExpr *E); 1475ffd83dbSDimitry Andric ExprDependence computeDependence(SubstNonTypeTemplateParmExpr *E); 1485ffd83dbSDimitry Andric ExprDependence computeDependence(CoroutineSuspendExpr *E); 1495ffd83dbSDimitry Andric ExprDependence computeDependence(DependentCoawaitExpr *E); 1505ffd83dbSDimitry Andric ExprDependence computeDependence(CXXNewExpr *E); 1515ffd83dbSDimitry Andric ExprDependence computeDependence(CXXPseudoDestructorExpr *E); 1525ffd83dbSDimitry Andric ExprDependence computeDependence(OverloadExpr *E, bool KnownDependent, 1535ffd83dbSDimitry Andric bool KnownInstantiationDependent, 1545ffd83dbSDimitry Andric bool KnownContainsUnexpandedParameterPack); 1555ffd83dbSDimitry Andric ExprDependence computeDependence(DependentScopeDeclRefExpr *E); 1565ffd83dbSDimitry Andric ExprDependence computeDependence(CXXConstructExpr *E); 157*e8d8bef9SDimitry Andric ExprDependence computeDependence(CXXDefaultInitExpr *E); 1585ffd83dbSDimitry Andric ExprDependence computeDependence(LambdaExpr *E, 1595ffd83dbSDimitry Andric bool ContainsUnexpandedParameterPack); 1605ffd83dbSDimitry Andric ExprDependence computeDependence(CXXUnresolvedConstructExpr *E); 1615ffd83dbSDimitry Andric ExprDependence computeDependence(CXXDependentScopeMemberExpr *E); 1625ffd83dbSDimitry Andric ExprDependence computeDependence(MaterializeTemporaryExpr *E); 1635ffd83dbSDimitry Andric ExprDependence computeDependence(CXXFoldExpr *E); 1645ffd83dbSDimitry Andric ExprDependence computeDependence(TypeTraitExpr *E); 1655ffd83dbSDimitry Andric ExprDependence computeDependence(ConceptSpecializationExpr *E, 1665ffd83dbSDimitry Andric bool ValueDependent); 1675ffd83dbSDimitry Andric 1685ffd83dbSDimitry Andric ExprDependence computeDependence(PredefinedExpr *E); 1695ffd83dbSDimitry Andric ExprDependence computeDependence(CallExpr *E, llvm::ArrayRef<Expr *> PreArgs); 1705ffd83dbSDimitry Andric ExprDependence computeDependence(OffsetOfExpr *E); 1715ffd83dbSDimitry Andric ExprDependence computeDependence(MemberExpr *E); 1725ffd83dbSDimitry Andric ExprDependence computeDependence(ShuffleVectorExpr *E); 1735ffd83dbSDimitry Andric ExprDependence computeDependence(GenericSelectionExpr *E, 1745ffd83dbSDimitry Andric bool ContainsUnexpandedPack); 1755ffd83dbSDimitry Andric ExprDependence computeDependence(DesignatedInitExpr *E); 1765ffd83dbSDimitry Andric ExprDependence computeDependence(ParenListExpr *E); 1775ffd83dbSDimitry Andric ExprDependence computeDependence(PseudoObjectExpr *E); 1785ffd83dbSDimitry Andric ExprDependence computeDependence(AtomicExpr *E); 1795ffd83dbSDimitry Andric 1805ffd83dbSDimitry Andric ExprDependence computeDependence(OMPArraySectionExpr *E); 1815ffd83dbSDimitry Andric ExprDependence computeDependence(OMPArrayShapingExpr *E); 1825ffd83dbSDimitry Andric ExprDependence computeDependence(OMPIteratorExpr *E); 1835ffd83dbSDimitry Andric 1845ffd83dbSDimitry Andric ExprDependence computeDependence(ObjCArrayLiteral *E); 1855ffd83dbSDimitry Andric ExprDependence computeDependence(ObjCDictionaryLiteral *E); 1865ffd83dbSDimitry Andric ExprDependence computeDependence(ObjCBoxedExpr *E); 1875ffd83dbSDimitry Andric ExprDependence computeDependence(ObjCEncodeExpr *E); 1885ffd83dbSDimitry Andric ExprDependence computeDependence(ObjCIvarRefExpr *E); 1895ffd83dbSDimitry Andric ExprDependence computeDependence(ObjCPropertyRefExpr *E); 1905ffd83dbSDimitry Andric ExprDependence computeDependence(ObjCSubscriptRefExpr *E); 1915ffd83dbSDimitry Andric ExprDependence computeDependence(ObjCIsaExpr *E); 1925ffd83dbSDimitry Andric ExprDependence computeDependence(ObjCIndirectCopyRestoreExpr *E); 1935ffd83dbSDimitry Andric ExprDependence computeDependence(ObjCMessageExpr *E); 1945ffd83dbSDimitry Andric 1955ffd83dbSDimitry Andric } // namespace clang 1965ffd83dbSDimitry Andric #endif 197