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 1304eeddc0SDimitry Andric #ifndef LLVM_CLANG_AST_COMPUTEDEPENDENCE_H 1404eeddc0SDimitry Andric #define LLVM_CLANG_AST_COMPUTEDEPENDENCE_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; 333b7f365eSDimitry Andric class ImplicitCastExpr; 343b7f365eSDimitry Andric class ExplicitCastExpr; 355ffd83dbSDimitry Andric class BinaryOperator; 365ffd83dbSDimitry Andric class ConditionalOperator; 375ffd83dbSDimitry Andric class BinaryConditionalOperator; 385ffd83dbSDimitry Andric class StmtExpr; 395ffd83dbSDimitry Andric class ConvertVectorExpr; 405ffd83dbSDimitry Andric class VAArgExpr; 415ffd83dbSDimitry Andric class ChooseExpr; 425ffd83dbSDimitry Andric class NoInitExpr; 435ffd83dbSDimitry Andric class ArrayInitLoopExpr; 445ffd83dbSDimitry Andric class ImplicitValueInitExpr; 455ffd83dbSDimitry Andric class InitListExpr; 465ffd83dbSDimitry Andric class ExtVectorElementExpr; 475ffd83dbSDimitry Andric class BlockExpr; 485ffd83dbSDimitry Andric class AsTypeExpr; 495ffd83dbSDimitry Andric class DeclRefExpr; 505ffd83dbSDimitry Andric class RecoveryExpr; 515ffd83dbSDimitry Andric class CXXRewrittenBinaryOperator; 525ffd83dbSDimitry Andric class CXXStdInitializerListExpr; 535ffd83dbSDimitry Andric class CXXTypeidExpr; 545ffd83dbSDimitry Andric class MSPropertyRefExpr; 555ffd83dbSDimitry Andric class MSPropertySubscriptExpr; 565ffd83dbSDimitry Andric class CXXUuidofExpr; 575ffd83dbSDimitry Andric class CXXThisExpr; 585ffd83dbSDimitry Andric class CXXThrowExpr; 595ffd83dbSDimitry Andric class CXXBindTemporaryExpr; 605ffd83dbSDimitry Andric class CXXScalarValueInitExpr; 615ffd83dbSDimitry Andric class CXXDeleteExpr; 625ffd83dbSDimitry Andric class ArrayTypeTraitExpr; 635ffd83dbSDimitry Andric class ExpressionTraitExpr; 645ffd83dbSDimitry Andric class CXXNoexceptExpr; 655ffd83dbSDimitry Andric class PackExpansionExpr; 66*0fca6ea1SDimitry Andric class PackIndexingExpr; 675ffd83dbSDimitry Andric class SubstNonTypeTemplateParmExpr; 685ffd83dbSDimitry Andric class CoroutineSuspendExpr; 695ffd83dbSDimitry Andric class DependentCoawaitExpr; 705ffd83dbSDimitry Andric class CXXNewExpr; 715ffd83dbSDimitry Andric class CXXPseudoDestructorExpr; 725ffd83dbSDimitry Andric class OverloadExpr; 735ffd83dbSDimitry Andric class DependentScopeDeclRefExpr; 745ffd83dbSDimitry Andric class CXXConstructExpr; 753b7f365eSDimitry Andric class CXXTemporaryObjectExpr; 76e8d8bef9SDimitry Andric class CXXDefaultInitExpr; 77fe6060f1SDimitry Andric class CXXDefaultArgExpr; 785ffd83dbSDimitry Andric class LambdaExpr; 795ffd83dbSDimitry Andric class CXXUnresolvedConstructExpr; 805ffd83dbSDimitry Andric class CXXDependentScopeMemberExpr; 815ffd83dbSDimitry Andric class MaterializeTemporaryExpr; 825ffd83dbSDimitry Andric class CXXFoldExpr; 83bdd1243dSDimitry Andric class CXXParenListInitExpr; 845ffd83dbSDimitry Andric class TypeTraitExpr; 855ffd83dbSDimitry Andric class ConceptSpecializationExpr; 86fe6060f1SDimitry Andric class SYCLUniqueStableNameExpr; 875ffd83dbSDimitry Andric class PredefinedExpr; 885ffd83dbSDimitry Andric class CallExpr; 895ffd83dbSDimitry Andric class OffsetOfExpr; 905ffd83dbSDimitry Andric class MemberExpr; 915ffd83dbSDimitry Andric class ShuffleVectorExpr; 925ffd83dbSDimitry Andric class GenericSelectionExpr; 935ffd83dbSDimitry Andric class DesignatedInitExpr; 945ffd83dbSDimitry Andric class ParenListExpr; 955ffd83dbSDimitry Andric class PseudoObjectExpr; 965ffd83dbSDimitry Andric class AtomicExpr; 97*0fca6ea1SDimitry Andric class ArraySectionExpr; 985ffd83dbSDimitry Andric class OMPArrayShapingExpr; 995ffd83dbSDimitry Andric class OMPIteratorExpr; 1005ffd83dbSDimitry Andric class ObjCArrayLiteral; 1015ffd83dbSDimitry Andric class ObjCDictionaryLiteral; 1025ffd83dbSDimitry Andric class ObjCBoxedExpr; 1035ffd83dbSDimitry Andric class ObjCEncodeExpr; 1045ffd83dbSDimitry Andric class ObjCIvarRefExpr; 1055ffd83dbSDimitry Andric class ObjCPropertyRefExpr; 1065ffd83dbSDimitry Andric class ObjCSubscriptRefExpr; 1075ffd83dbSDimitry Andric class ObjCIsaExpr; 1085ffd83dbSDimitry Andric class ObjCIndirectCopyRestoreExpr; 1095ffd83dbSDimitry Andric class ObjCMessageExpr; 1105ffd83dbSDimitry Andric 1115ffd83dbSDimitry Andric // The following functions are called from constructors of `Expr`, so they 1125ffd83dbSDimitry Andric // should not access anything beyond basic 1135ffd83dbSDimitry Andric ExprDependence computeDependence(FullExpr *E); 1145ffd83dbSDimitry Andric ExprDependence computeDependence(OpaqueValueExpr *E); 1155ffd83dbSDimitry Andric ExprDependence computeDependence(ParenExpr *E); 116e8d8bef9SDimitry Andric ExprDependence computeDependence(UnaryOperator *E, const ASTContext &Ctx); 1175ffd83dbSDimitry Andric ExprDependence computeDependence(UnaryExprOrTypeTraitExpr *E); 1185ffd83dbSDimitry Andric ExprDependence computeDependence(ArraySubscriptExpr *E); 1195ffd83dbSDimitry Andric ExprDependence computeDependence(MatrixSubscriptExpr *E); 1205ffd83dbSDimitry Andric ExprDependence computeDependence(CompoundLiteralExpr *E); 1213b7f365eSDimitry Andric ExprDependence computeDependence(ImplicitCastExpr *E); 1223b7f365eSDimitry Andric ExprDependence computeDependence(ExplicitCastExpr *E); 1235ffd83dbSDimitry Andric ExprDependence computeDependence(BinaryOperator *E); 1245ffd83dbSDimitry Andric ExprDependence computeDependence(ConditionalOperator *E); 1255ffd83dbSDimitry Andric ExprDependence computeDependence(BinaryConditionalOperator *E); 1265ffd83dbSDimitry Andric ExprDependence computeDependence(StmtExpr *E, unsigned TemplateDepth); 1275ffd83dbSDimitry Andric ExprDependence computeDependence(ConvertVectorExpr *E); 1285ffd83dbSDimitry Andric ExprDependence computeDependence(VAArgExpr *E); 1295ffd83dbSDimitry Andric ExprDependence computeDependence(ChooseExpr *E); 1305ffd83dbSDimitry Andric ExprDependence computeDependence(NoInitExpr *E); 1315ffd83dbSDimitry Andric ExprDependence computeDependence(ArrayInitLoopExpr *E); 1325ffd83dbSDimitry Andric ExprDependence computeDependence(ImplicitValueInitExpr *E); 1335ffd83dbSDimitry Andric ExprDependence computeDependence(InitListExpr *E); 1345ffd83dbSDimitry Andric ExprDependence computeDependence(ExtVectorElementExpr *E); 1355ffd83dbSDimitry Andric ExprDependence computeDependence(BlockExpr *E); 1365ffd83dbSDimitry Andric ExprDependence computeDependence(AsTypeExpr *E); 1375ffd83dbSDimitry Andric ExprDependence computeDependence(DeclRefExpr *E, const ASTContext &Ctx); 1385ffd83dbSDimitry Andric ExprDependence computeDependence(RecoveryExpr *E); 1395ffd83dbSDimitry Andric ExprDependence computeDependence(CXXRewrittenBinaryOperator *E); 1405ffd83dbSDimitry Andric ExprDependence computeDependence(CXXStdInitializerListExpr *E); 1415ffd83dbSDimitry Andric ExprDependence computeDependence(CXXTypeidExpr *E); 1425ffd83dbSDimitry Andric ExprDependence computeDependence(MSPropertyRefExpr *E); 1435ffd83dbSDimitry Andric ExprDependence computeDependence(MSPropertySubscriptExpr *E); 1445ffd83dbSDimitry Andric ExprDependence computeDependence(CXXUuidofExpr *E); 1455ffd83dbSDimitry Andric ExprDependence computeDependence(CXXThisExpr *E); 1465ffd83dbSDimitry Andric ExprDependence computeDependence(CXXThrowExpr *E); 1475ffd83dbSDimitry Andric ExprDependence computeDependence(CXXBindTemporaryExpr *E); 1485ffd83dbSDimitry Andric ExprDependence computeDependence(CXXScalarValueInitExpr *E); 1495ffd83dbSDimitry Andric ExprDependence computeDependence(CXXDeleteExpr *E); 1505ffd83dbSDimitry Andric ExprDependence computeDependence(ArrayTypeTraitExpr *E); 1515ffd83dbSDimitry Andric ExprDependence computeDependence(ExpressionTraitExpr *E); 1525ffd83dbSDimitry Andric ExprDependence computeDependence(CXXNoexceptExpr *E, CanThrowResult CT); 1535ffd83dbSDimitry Andric ExprDependence computeDependence(PackExpansionExpr *E); 154*0fca6ea1SDimitry Andric ExprDependence computeDependence(PackIndexingExpr *E); 1555ffd83dbSDimitry Andric ExprDependence computeDependence(SubstNonTypeTemplateParmExpr *E); 1565ffd83dbSDimitry Andric ExprDependence computeDependence(CoroutineSuspendExpr *E); 1575ffd83dbSDimitry Andric ExprDependence computeDependence(DependentCoawaitExpr *E); 1585ffd83dbSDimitry Andric ExprDependence computeDependence(CXXNewExpr *E); 1595ffd83dbSDimitry Andric ExprDependence computeDependence(CXXPseudoDestructorExpr *E); 1605ffd83dbSDimitry Andric ExprDependence computeDependence(OverloadExpr *E, bool KnownDependent, 1615ffd83dbSDimitry Andric bool KnownInstantiationDependent, 1625ffd83dbSDimitry Andric bool KnownContainsUnexpandedParameterPack); 1635ffd83dbSDimitry Andric ExprDependence computeDependence(DependentScopeDeclRefExpr *E); 1645ffd83dbSDimitry Andric ExprDependence computeDependence(CXXConstructExpr *E); 1653b7f365eSDimitry Andric ExprDependence computeDependence(CXXTemporaryObjectExpr *E); 166e8d8bef9SDimitry Andric ExprDependence computeDependence(CXXDefaultInitExpr *E); 167fe6060f1SDimitry Andric ExprDependence computeDependence(CXXDefaultArgExpr *E); 1685ffd83dbSDimitry Andric ExprDependence computeDependence(LambdaExpr *E, 1695ffd83dbSDimitry Andric bool ContainsUnexpandedParameterPack); 1705ffd83dbSDimitry Andric ExprDependence computeDependence(CXXUnresolvedConstructExpr *E); 1715ffd83dbSDimitry Andric ExprDependence computeDependence(CXXDependentScopeMemberExpr *E); 1725ffd83dbSDimitry Andric ExprDependence computeDependence(MaterializeTemporaryExpr *E); 1735ffd83dbSDimitry Andric ExprDependence computeDependence(CXXFoldExpr *E); 174bdd1243dSDimitry Andric ExprDependence computeDependence(CXXParenListInitExpr *E); 1755ffd83dbSDimitry Andric ExprDependence computeDependence(TypeTraitExpr *E); 1765ffd83dbSDimitry Andric ExprDependence computeDependence(ConceptSpecializationExpr *E, 1775ffd83dbSDimitry Andric bool ValueDependent); 1785ffd83dbSDimitry Andric 179fe6060f1SDimitry Andric ExprDependence computeDependence(SYCLUniqueStableNameExpr *E); 1805ffd83dbSDimitry Andric ExprDependence computeDependence(PredefinedExpr *E); 1815ffd83dbSDimitry Andric ExprDependence computeDependence(CallExpr *E, llvm::ArrayRef<Expr *> PreArgs); 1825ffd83dbSDimitry Andric ExprDependence computeDependence(OffsetOfExpr *E); 1835ffd83dbSDimitry Andric ExprDependence computeDependence(MemberExpr *E); 1845ffd83dbSDimitry Andric ExprDependence computeDependence(ShuffleVectorExpr *E); 1855ffd83dbSDimitry Andric ExprDependence computeDependence(GenericSelectionExpr *E, 1865ffd83dbSDimitry Andric bool ContainsUnexpandedPack); 1875ffd83dbSDimitry Andric ExprDependence computeDependence(DesignatedInitExpr *E); 1885ffd83dbSDimitry Andric ExprDependence computeDependence(ParenListExpr *E); 1895ffd83dbSDimitry Andric ExprDependence computeDependence(PseudoObjectExpr *E); 1905ffd83dbSDimitry Andric ExprDependence computeDependence(AtomicExpr *E); 1915ffd83dbSDimitry Andric 192*0fca6ea1SDimitry Andric ExprDependence computeDependence(ArraySectionExpr *E); 1935ffd83dbSDimitry Andric ExprDependence computeDependence(OMPArrayShapingExpr *E); 1945ffd83dbSDimitry Andric ExprDependence computeDependence(OMPIteratorExpr *E); 1955ffd83dbSDimitry Andric 1965ffd83dbSDimitry Andric ExprDependence computeDependence(ObjCArrayLiteral *E); 1975ffd83dbSDimitry Andric ExprDependence computeDependence(ObjCDictionaryLiteral *E); 1985ffd83dbSDimitry Andric ExprDependence computeDependence(ObjCBoxedExpr *E); 1995ffd83dbSDimitry Andric ExprDependence computeDependence(ObjCEncodeExpr *E); 2005ffd83dbSDimitry Andric ExprDependence computeDependence(ObjCIvarRefExpr *E); 2015ffd83dbSDimitry Andric ExprDependence computeDependence(ObjCPropertyRefExpr *E); 2025ffd83dbSDimitry Andric ExprDependence computeDependence(ObjCSubscriptRefExpr *E); 2035ffd83dbSDimitry Andric ExprDependence computeDependence(ObjCIsaExpr *E); 2045ffd83dbSDimitry Andric ExprDependence computeDependence(ObjCIndirectCopyRestoreExpr *E); 2055ffd83dbSDimitry Andric ExprDependence computeDependence(ObjCMessageExpr *E); 2065ffd83dbSDimitry Andric 2075ffd83dbSDimitry Andric } // namespace clang 2085ffd83dbSDimitry Andric #endif 209