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