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