xref: /freebsd/contrib/llvm-project/clang/include/clang/AST/ComputeDependence.h (revision fe6060f10f634930ff71b7c50291ddc610da2475)
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;
73e8d8bef9SDimitry Andric class CXXDefaultInitExpr;
74*fe6060f1SDimitry Andric class CXXDefaultArgExpr;
755ffd83dbSDimitry Andric class LambdaExpr;
765ffd83dbSDimitry Andric class CXXUnresolvedConstructExpr;
775ffd83dbSDimitry Andric class CXXDependentScopeMemberExpr;
785ffd83dbSDimitry Andric class MaterializeTemporaryExpr;
795ffd83dbSDimitry Andric class CXXFoldExpr;
805ffd83dbSDimitry Andric class TypeTraitExpr;
815ffd83dbSDimitry Andric class ConceptSpecializationExpr;
82*fe6060f1SDimitry Andric class SYCLUniqueStableNameExpr;
835ffd83dbSDimitry Andric class PredefinedExpr;
845ffd83dbSDimitry Andric class CallExpr;
855ffd83dbSDimitry Andric class OffsetOfExpr;
865ffd83dbSDimitry Andric class MemberExpr;
875ffd83dbSDimitry Andric class ShuffleVectorExpr;
885ffd83dbSDimitry Andric class GenericSelectionExpr;
895ffd83dbSDimitry Andric class DesignatedInitExpr;
905ffd83dbSDimitry Andric class ParenListExpr;
915ffd83dbSDimitry Andric class PseudoObjectExpr;
925ffd83dbSDimitry Andric class AtomicExpr;
935ffd83dbSDimitry Andric class OMPArraySectionExpr;
945ffd83dbSDimitry Andric class OMPArrayShapingExpr;
955ffd83dbSDimitry Andric class OMPIteratorExpr;
965ffd83dbSDimitry Andric class ObjCArrayLiteral;
975ffd83dbSDimitry Andric class ObjCDictionaryLiteral;
985ffd83dbSDimitry Andric class ObjCBoxedExpr;
995ffd83dbSDimitry Andric class ObjCEncodeExpr;
1005ffd83dbSDimitry Andric class ObjCIvarRefExpr;
1015ffd83dbSDimitry Andric class ObjCPropertyRefExpr;
1025ffd83dbSDimitry Andric class ObjCSubscriptRefExpr;
1035ffd83dbSDimitry Andric class ObjCIsaExpr;
1045ffd83dbSDimitry Andric class ObjCIndirectCopyRestoreExpr;
1055ffd83dbSDimitry Andric class ObjCMessageExpr;
1065ffd83dbSDimitry Andric 
1075ffd83dbSDimitry Andric // The following functions are called from constructors of `Expr`, so they
1085ffd83dbSDimitry Andric // should not access anything beyond basic
1095ffd83dbSDimitry Andric ExprDependence computeDependence(FullExpr *E);
1105ffd83dbSDimitry Andric ExprDependence computeDependence(OpaqueValueExpr *E);
1115ffd83dbSDimitry Andric ExprDependence computeDependence(ParenExpr *E);
112e8d8bef9SDimitry Andric ExprDependence computeDependence(UnaryOperator *E, const ASTContext &Ctx);
1135ffd83dbSDimitry Andric ExprDependence computeDependence(UnaryExprOrTypeTraitExpr *E);
1145ffd83dbSDimitry Andric ExprDependence computeDependence(ArraySubscriptExpr *E);
1155ffd83dbSDimitry Andric ExprDependence computeDependence(MatrixSubscriptExpr *E);
1165ffd83dbSDimitry Andric ExprDependence computeDependence(CompoundLiteralExpr *E);
1175ffd83dbSDimitry Andric ExprDependence computeDependence(CastExpr *E);
1185ffd83dbSDimitry Andric ExprDependence computeDependence(BinaryOperator *E);
1195ffd83dbSDimitry Andric ExprDependence computeDependence(ConditionalOperator *E);
1205ffd83dbSDimitry Andric ExprDependence computeDependence(BinaryConditionalOperator *E);
1215ffd83dbSDimitry Andric ExprDependence computeDependence(StmtExpr *E, unsigned TemplateDepth);
1225ffd83dbSDimitry Andric ExprDependence computeDependence(ConvertVectorExpr *E);
1235ffd83dbSDimitry Andric ExprDependence computeDependence(VAArgExpr *E);
1245ffd83dbSDimitry Andric ExprDependence computeDependence(ChooseExpr *E);
1255ffd83dbSDimitry Andric ExprDependence computeDependence(NoInitExpr *E);
1265ffd83dbSDimitry Andric ExprDependence computeDependence(ArrayInitLoopExpr *E);
1275ffd83dbSDimitry Andric ExprDependence computeDependence(ImplicitValueInitExpr *E);
1285ffd83dbSDimitry Andric ExprDependence computeDependence(InitListExpr *E);
1295ffd83dbSDimitry Andric ExprDependence computeDependence(ExtVectorElementExpr *E);
1305ffd83dbSDimitry Andric ExprDependence computeDependence(BlockExpr *E);
1315ffd83dbSDimitry Andric ExprDependence computeDependence(AsTypeExpr *E);
1325ffd83dbSDimitry Andric ExprDependence computeDependence(DeclRefExpr *E, const ASTContext &Ctx);
1335ffd83dbSDimitry Andric ExprDependence computeDependence(RecoveryExpr *E);
1345ffd83dbSDimitry Andric ExprDependence computeDependence(CXXRewrittenBinaryOperator *E);
1355ffd83dbSDimitry Andric ExprDependence computeDependence(CXXStdInitializerListExpr *E);
1365ffd83dbSDimitry Andric ExprDependence computeDependence(CXXTypeidExpr *E);
1375ffd83dbSDimitry Andric ExprDependence computeDependence(MSPropertyRefExpr *E);
1385ffd83dbSDimitry Andric ExprDependence computeDependence(MSPropertySubscriptExpr *E);
1395ffd83dbSDimitry Andric ExprDependence computeDependence(CXXUuidofExpr *E);
1405ffd83dbSDimitry Andric ExprDependence computeDependence(CXXThisExpr *E);
1415ffd83dbSDimitry Andric ExprDependence computeDependence(CXXThrowExpr *E);
1425ffd83dbSDimitry Andric ExprDependence computeDependence(CXXBindTemporaryExpr *E);
1435ffd83dbSDimitry Andric ExprDependence computeDependence(CXXScalarValueInitExpr *E);
1445ffd83dbSDimitry Andric ExprDependence computeDependence(CXXDeleteExpr *E);
1455ffd83dbSDimitry Andric ExprDependence computeDependence(ArrayTypeTraitExpr *E);
1465ffd83dbSDimitry Andric ExprDependence computeDependence(ExpressionTraitExpr *E);
1475ffd83dbSDimitry Andric ExprDependence computeDependence(CXXNoexceptExpr *E, CanThrowResult CT);
1485ffd83dbSDimitry Andric ExprDependence computeDependence(PackExpansionExpr *E);
1495ffd83dbSDimitry Andric ExprDependence computeDependence(SubstNonTypeTemplateParmExpr *E);
1505ffd83dbSDimitry Andric ExprDependence computeDependence(CoroutineSuspendExpr *E);
1515ffd83dbSDimitry Andric ExprDependence computeDependence(DependentCoawaitExpr *E);
1525ffd83dbSDimitry Andric ExprDependence computeDependence(CXXNewExpr *E);
1535ffd83dbSDimitry Andric ExprDependence computeDependence(CXXPseudoDestructorExpr *E);
1545ffd83dbSDimitry Andric ExprDependence computeDependence(OverloadExpr *E, bool KnownDependent,
1555ffd83dbSDimitry Andric                                  bool KnownInstantiationDependent,
1565ffd83dbSDimitry Andric                                  bool KnownContainsUnexpandedParameterPack);
1575ffd83dbSDimitry Andric ExprDependence computeDependence(DependentScopeDeclRefExpr *E);
1585ffd83dbSDimitry Andric ExprDependence computeDependence(CXXConstructExpr *E);
159e8d8bef9SDimitry Andric ExprDependence computeDependence(CXXDefaultInitExpr *E);
160*fe6060f1SDimitry Andric ExprDependence computeDependence(CXXDefaultArgExpr *E);
1615ffd83dbSDimitry Andric ExprDependence computeDependence(LambdaExpr *E,
1625ffd83dbSDimitry Andric                                  bool ContainsUnexpandedParameterPack);
1635ffd83dbSDimitry Andric ExprDependence computeDependence(CXXUnresolvedConstructExpr *E);
1645ffd83dbSDimitry Andric ExprDependence computeDependence(CXXDependentScopeMemberExpr *E);
1655ffd83dbSDimitry Andric ExprDependence computeDependence(MaterializeTemporaryExpr *E);
1665ffd83dbSDimitry Andric ExprDependence computeDependence(CXXFoldExpr *E);
1675ffd83dbSDimitry Andric ExprDependence computeDependence(TypeTraitExpr *E);
1685ffd83dbSDimitry Andric ExprDependence computeDependence(ConceptSpecializationExpr *E,
1695ffd83dbSDimitry Andric                                  bool ValueDependent);
1705ffd83dbSDimitry Andric 
171*fe6060f1SDimitry Andric ExprDependence computeDependence(SYCLUniqueStableNameExpr *E);
1725ffd83dbSDimitry Andric ExprDependence computeDependence(PredefinedExpr *E);
1735ffd83dbSDimitry Andric ExprDependence computeDependence(CallExpr *E, llvm::ArrayRef<Expr *> PreArgs);
1745ffd83dbSDimitry Andric ExprDependence computeDependence(OffsetOfExpr *E);
1755ffd83dbSDimitry Andric ExprDependence computeDependence(MemberExpr *E);
1765ffd83dbSDimitry Andric ExprDependence computeDependence(ShuffleVectorExpr *E);
1775ffd83dbSDimitry Andric ExprDependence computeDependence(GenericSelectionExpr *E,
1785ffd83dbSDimitry Andric                                  bool ContainsUnexpandedPack);
1795ffd83dbSDimitry Andric ExprDependence computeDependence(DesignatedInitExpr *E);
1805ffd83dbSDimitry Andric ExprDependence computeDependence(ParenListExpr *E);
1815ffd83dbSDimitry Andric ExprDependence computeDependence(PseudoObjectExpr *E);
1825ffd83dbSDimitry Andric ExprDependence computeDependence(AtomicExpr *E);
1835ffd83dbSDimitry Andric 
1845ffd83dbSDimitry Andric ExprDependence computeDependence(OMPArraySectionExpr *E);
1855ffd83dbSDimitry Andric ExprDependence computeDependence(OMPArrayShapingExpr *E);
1865ffd83dbSDimitry Andric ExprDependence computeDependence(OMPIteratorExpr *E);
1875ffd83dbSDimitry Andric 
1885ffd83dbSDimitry Andric ExprDependence computeDependence(ObjCArrayLiteral *E);
1895ffd83dbSDimitry Andric ExprDependence computeDependence(ObjCDictionaryLiteral *E);
1905ffd83dbSDimitry Andric ExprDependence computeDependence(ObjCBoxedExpr *E);
1915ffd83dbSDimitry Andric ExprDependence computeDependence(ObjCEncodeExpr *E);
1925ffd83dbSDimitry Andric ExprDependence computeDependence(ObjCIvarRefExpr *E);
1935ffd83dbSDimitry Andric ExprDependence computeDependence(ObjCPropertyRefExpr *E);
1945ffd83dbSDimitry Andric ExprDependence computeDependence(ObjCSubscriptRefExpr *E);
1955ffd83dbSDimitry Andric ExprDependence computeDependence(ObjCIsaExpr *E);
1965ffd83dbSDimitry Andric ExprDependence computeDependence(ObjCIndirectCopyRestoreExpr *E);
1975ffd83dbSDimitry Andric ExprDependence computeDependence(ObjCMessageExpr *E);
1985ffd83dbSDimitry Andric 
1995ffd83dbSDimitry Andric } // namespace clang
2005ffd83dbSDimitry Andric #endif
201