clang 19.0.0git
ComputeDependence.h
Go to the documentation of this file.
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
18#include "llvm/ADT/ArrayRef.h"
19
20namespace clang {
21
22class ASTContext;
23
24class Expr;
25class FullExpr;
26class OpaqueValueExpr;
27class ParenExpr;
28class UnaryOperator;
29class UnaryExprOrTypeTraitExpr;
30class ArraySubscriptExpr;
31class MatrixSubscriptExpr;
32class CompoundLiteralExpr;
33class ImplicitCastExpr;
34class ExplicitCastExpr;
35class BinaryOperator;
36class ConditionalOperator;
37class BinaryConditionalOperator;
38class StmtExpr;
39class ConvertVectorExpr;
40class VAArgExpr;
41class ChooseExpr;
42class NoInitExpr;
43class ArrayInitLoopExpr;
44class ImplicitValueInitExpr;
45class InitListExpr;
46class ExtVectorElementExpr;
47class BlockExpr;
48class AsTypeExpr;
49class DeclRefExpr;
50class RecoveryExpr;
51class CXXRewrittenBinaryOperator;
52class CXXStdInitializerListExpr;
53class CXXTypeidExpr;
54class MSPropertyRefExpr;
55class MSPropertySubscriptExpr;
56class CXXUuidofExpr;
57class CXXThisExpr;
58class CXXThrowExpr;
59class CXXBindTemporaryExpr;
60class CXXScalarValueInitExpr;
61class CXXDeleteExpr;
62class ArrayTypeTraitExpr;
63class ExpressionTraitExpr;
64class CXXNoexceptExpr;
65class PackExpansionExpr;
66class PackIndexingExpr;
67class SubstNonTypeTemplateParmExpr;
68class CoroutineSuspendExpr;
69class DependentCoawaitExpr;
70class CXXNewExpr;
71class CXXPseudoDestructorExpr;
72class OverloadExpr;
73class DependentScopeDeclRefExpr;
74class CXXConstructExpr;
75class CXXTemporaryObjectExpr;
76class CXXDefaultInitExpr;
77class CXXDefaultArgExpr;
78class LambdaExpr;
79class CXXUnresolvedConstructExpr;
80class CXXDependentScopeMemberExpr;
81class MaterializeTemporaryExpr;
82class CXXFoldExpr;
83class CXXParenListInitExpr;
84class TypeTraitExpr;
85class ConceptSpecializationExpr;
86class SYCLUniqueStableNameExpr;
87class PredefinedExpr;
88class CallExpr;
89class OffsetOfExpr;
90class MemberExpr;
91class ShuffleVectorExpr;
92class GenericSelectionExpr;
93class DesignatedInitExpr;
94class ParenListExpr;
95class PseudoObjectExpr;
96class AtomicExpr;
97class ArraySectionExpr;
98class OMPArrayShapingExpr;
99class OMPIteratorExpr;
100class ObjCArrayLiteral;
101class ObjCDictionaryLiteral;
102class ObjCBoxedExpr;
103class ObjCEncodeExpr;
104class ObjCIvarRefExpr;
105class ObjCPropertyRefExpr;
106class ObjCSubscriptRefExpr;
107class ObjCIsaExpr;
108class ObjCIndirectCopyRestoreExpr;
109class ObjCMessageExpr;
110
111// The following functions are called from constructors of `Expr`, so they
112// should not access anything beyond basic
114ExprDependence computeDependence(OpaqueValueExpr *E);
116ExprDependence computeDependence(UnaryOperator *E, const ASTContext &Ctx);
117ExprDependence computeDependence(UnaryExprOrTypeTraitExpr *E);
118ExprDependence computeDependence(ArraySubscriptExpr *E);
119ExprDependence computeDependence(MatrixSubscriptExpr *E);
120ExprDependence computeDependence(CompoundLiteralExpr *E);
121ExprDependence computeDependence(ImplicitCastExpr *E);
122ExprDependence computeDependence(ExplicitCastExpr *E);
123ExprDependence computeDependence(BinaryOperator *E);
124ExprDependence computeDependence(ConditionalOperator *E);
125ExprDependence computeDependence(BinaryConditionalOperator *E);
126ExprDependence computeDependence(StmtExpr *E, unsigned TemplateDepth);
127ExprDependence computeDependence(ConvertVectorExpr *E);
131ExprDependence computeDependence(ArrayInitLoopExpr *E);
132ExprDependence computeDependence(ImplicitValueInitExpr *E);
133ExprDependence computeDependence(InitListExpr *E);
134ExprDependence computeDependence(ExtVectorElementExpr *E);
137ExprDependence computeDependence(DeclRefExpr *E, const ASTContext &Ctx);
138ExprDependence computeDependence(RecoveryExpr *E);
139ExprDependence computeDependence(CXXRewrittenBinaryOperator *E);
140ExprDependence computeDependence(CXXStdInitializerListExpr *E);
141ExprDependence computeDependence(CXXTypeidExpr *E);
142ExprDependence computeDependence(MSPropertyRefExpr *E);
143ExprDependence computeDependence(MSPropertySubscriptExpr *E);
144ExprDependence computeDependence(CXXUuidofExpr *E);
146ExprDependence computeDependence(CXXThrowExpr *E);
147ExprDependence computeDependence(CXXBindTemporaryExpr *E);
148ExprDependence computeDependence(CXXScalarValueInitExpr *E);
149ExprDependence computeDependence(CXXDeleteExpr *E);
150ExprDependence computeDependence(ArrayTypeTraitExpr *E);
151ExprDependence computeDependence(ExpressionTraitExpr *E);
153ExprDependence computeDependence(PackExpansionExpr *E);
154ExprDependence computeDependence(PackIndexingExpr *E);
155ExprDependence computeDependence(SubstNonTypeTemplateParmExpr *E);
156ExprDependence computeDependence(CoroutineSuspendExpr *E);
157ExprDependence computeDependence(DependentCoawaitExpr *E);
159ExprDependence computeDependence(CXXPseudoDestructorExpr *E);
160ExprDependence computeDependence(OverloadExpr *E, bool KnownDependent,
161 bool KnownInstantiationDependent,
162 bool KnownContainsUnexpandedParameterPack);
163ExprDependence computeDependence(DependentScopeDeclRefExpr *E);
164ExprDependence computeDependence(CXXConstructExpr *E);
165ExprDependence computeDependence(CXXTemporaryObjectExpr *E);
166ExprDependence computeDependence(CXXDefaultInitExpr *E);
167ExprDependence computeDependence(CXXDefaultArgExpr *E);
169 bool ContainsUnexpandedParameterPack);
170ExprDependence computeDependence(CXXUnresolvedConstructExpr *E);
171ExprDependence computeDependence(CXXDependentScopeMemberExpr *E);
172ExprDependence computeDependence(MaterializeTemporaryExpr *E);
174ExprDependence computeDependence(CXXParenListInitExpr *E);
175ExprDependence computeDependence(TypeTraitExpr *E);
176ExprDependence computeDependence(ConceptSpecializationExpr *E,
177 bool ValueDependent);
178
179ExprDependence computeDependence(SYCLUniqueStableNameExpr *E);
180ExprDependence computeDependence(PredefinedExpr *E);
182ExprDependence computeDependence(OffsetOfExpr *E);
184ExprDependence computeDependence(ShuffleVectorExpr *E);
185ExprDependence computeDependence(GenericSelectionExpr *E,
186 bool ContainsUnexpandedPack);
187ExprDependence computeDependence(DesignatedInitExpr *E);
188ExprDependence computeDependence(ParenListExpr *E);
189ExprDependence computeDependence(PseudoObjectExpr *E);
191
192ExprDependence computeDependence(ArraySectionExpr *E);
193ExprDependence computeDependence(OMPArrayShapingExpr *E);
194ExprDependence computeDependence(OMPIteratorExpr *E);
195
196ExprDependence computeDependence(ObjCArrayLiteral *E);
197ExprDependence computeDependence(ObjCDictionaryLiteral *E);
198ExprDependence computeDependence(ObjCBoxedExpr *E);
199ExprDependence computeDependence(ObjCEncodeExpr *E);
200ExprDependence computeDependence(ObjCIvarRefExpr *E);
201ExprDependence computeDependence(ObjCPropertyRefExpr *E);
202ExprDependence computeDependence(ObjCSubscriptRefExpr *E);
204ExprDependence computeDependence(ObjCIndirectCopyRestoreExpr *E);
205ExprDependence computeDependence(ObjCMessageExpr *E);
206
207} // namespace clang
208#endif
Expr * E
Defines the ExceptionSpecificationType enumeration and various utility functions.
The JSON file list parser is used to communicate input to InstallAPI.
CanThrowResult
Possible results from evaluation of a noexcept expression.
ExprDependenceScope::ExprDependence ExprDependence
ExprDependence computeDependence(FullExpr *E)