clang 24.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 "clang/Basic/LLVM.h"
19
20namespace clang {
21
22class ASTContext;
23
24class Expr;
25class FullExpr;
26class OpaqueValueExpr;
27class ParenExpr;
28class UnaryOperator;
36class BinaryOperator;
39class StmtExpr;
41class VAArgExpr;
42class ChooseExpr;
43class NoInitExpr;
46class InitListExpr;
49class BlockExpr;
50class AsTypeExpr;
51class DeclRefExpr;
52class RecoveryExpr;
55class CXXTypeidExpr;
58class CXXUuidofExpr;
59class CXXThisExpr;
60class CXXThrowExpr;
63class CXXDeleteExpr;
66class CXXNoexceptExpr;
72class CXXNewExpr;
74class OverloadExpr;
80class LambdaExpr;
85class CXXFoldExpr;
87class TypeTraitExpr;
90class PredefinedExpr;
91class CallExpr;
92class OffsetOfExpr;
93class MemberExpr;
97class ParenListExpr;
99class AtomicExpr;
100class ArraySectionExpr;
102class OMPIteratorExpr;
103class ObjCArrayLiteral;
105class ObjCBoxedExpr;
106class ObjCEncodeExpr;
107class ObjCIvarRefExpr;
110class ObjCIsaExpr;
112class ObjCMessageExpr;
114
115// The following functions are called from constructors of `Expr`, so they
116// should not access anything beyond basic
131ExprDependence computeDependence(StmtExpr *E, unsigned TemplateDepth);
142 bool ContainsUnexpandedParameterPack);
167ExprDependence computeDependence(OverloadExpr *E, bool KnownDependent,
168 bool KnownInstantiationDependent,
169 bool KnownContainsUnexpandedParameterPack);
176 bool ContainsUnexpandedParameterPack);
185 bool ValueDependent);
186
194 bool ContainsUnexpandedPack);
199
203
215
216} // namespace clang
217#endif
Defines the ExceptionSpecificationType enumeration and various utility functions.
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified.
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
Definition ASTContext.h:245
Represents a loop initializing the elements of an array.
Definition Expr.h:6022
This class represents BOTH the OpenMP Array Section and OpenACC 'subarray', with a boolean differenti...
Definition Expr.h:7273
ArraySubscriptExpr - [C99 6.5.2.1] Array Subscripting.
Definition Expr.h:2769
An Embarcadero array type trait, as used in the implementation of __array_rank and __array_extent.
Definition ExprCXX.h:3011
AsTypeExpr - Clang builtin function __builtin_astype [OpenCL 6.2.4.2] This AST node provides support ...
Definition Expr.h:6787
AtomicExpr - Variadic atomic builtins: __atomic_exchange, __atomic_fetch_*, __atomic_load,...
Definition Expr.h:6982
BinaryConditionalOperator - The GNU extension to the conditional operator which allows the middle ope...
Definition Expr.h:4501
A builtin binary operation expression such as "x + y" or "x <= y".
Definition Expr.h:4086
BlockExpr - Adaptor class for mixing a BlockDecl with expressions.
Definition Expr.h:6726
Represents binding an expression to a temporary.
Definition ExprCXX.h:1498
Represents a call to a C++ constructor.
Definition ExprCXX.h:1553
A default argument (C++ [dcl.fct.default]).
Definition ExprCXX.h:1275
A use of a default initializer in a constructor or in aggregate initialization.
Definition ExprCXX.h:1382
Represents a delete expression for memory deallocation and destructor calls, e.g.
Definition ExprCXX.h:2631
Represents a C++ member access expression where the actual member referenced could not be resolved be...
Definition ExprCXX.h:3924
Represents a folding of a pack over an operator.
Definition ExprCXX.h:5086
Represents a new-expression for memory allocation and constructor calls, e.g: "new CXXNewExpr(foo)".
Definition ExprCXX.h:2360
Represents a C++11 noexcept expression (C++ [expr.unary.noexcept]).
Definition ExprCXX.h:4363
Represents a list-initialization with parenthesis.
Definition ExprCXX.h:5195
Represents a C++ pseudo-destructor (C++ [expr.pseudo]).
Definition ExprCXX.h:2750
A rewritten comparison expression that was originally written using operator syntax.
Definition ExprCXX.h:291
An expression "T()" which creates an rvalue of a non-class type T.
Definition ExprCXX.h:2201
Implicit construction of a std::initializer_list<T> object from an array temporary within list-initia...
Definition ExprCXX.h:805
Represents a C++ functional cast expression that builds a temporary object.
Definition ExprCXX.h:1904
Represents the this expression in C++.
Definition ExprCXX.h:1159
A C++ throw-expression (C++ [except.throw]).
Definition ExprCXX.h:1213
A C++ typeid expression (C++ [expr.typeid]), which gets the type_info that corresponds to the supplie...
Definition ExprCXX.h:853
Describes an explicit type conversion that uses functional notion but could not be resolved because o...
Definition ExprCXX.h:3798
A Microsoft C++ __uuidof expression, which gets the _GUID that corresponds to the supplied type or ex...
Definition ExprCXX.h:1073
CallExpr - Represents a function call (C99 6.5.2.2, C++ [expr.call]).
Definition Expr.h:2991
ChooseExpr - GNU builtin-in function __builtin_choose_expr.
Definition Expr.h:4896
CompoundLiteralExpr - [C99 6.5.2.5].
Definition Expr.h:3653
Represents the specialization of a concept - evaluates to a prvalue of type bool.
ConditionalOperator - The ?
Definition Expr.h:4439
ConvertVectorExpr - Clang builtin function __builtin_convertvector This AST node provides support for...
Definition Expr.h:4767
Represents an expression that might suspend coroutine execution; either a co_await or co_yield expres...
Definition ExprCXX.h:5309
A reference to a declared variable, function, enum, etc.
Definition Expr.h:1294
Represents a 'co_await' expression while the type of the promise is dependent.
Definition ExprCXX.h:5455
A qualified reference to a name whose declaration cannot yet be resolved.
Definition ExprCXX.h:3564
A template-id naming a variable template or a concept through a template template parameter.
Definition ExprCXX.h:3480
Represents a C99 designated initializer expression.
Definition Expr.h:5605
ExplicitCastExpr - An explicit cast written in the source code.
Definition Expr.h:3976
This represents one expression.
Definition Expr.h:113
An expression trait intrinsic.
Definition ExprCXX.h:3084
ExtVectorElementExpr - This represents access to specific elements of a vector, and may occur on the ...
Definition Expr.h:6664
FullExpr - Represents a "full-expression" node.
Definition Expr.h:1073
Represents a C11 generic selection.
Definition Expr.h:6236
ImplicitCastExpr - Allows us to explicitly represent implicit type conversions, which have no direct ...
Definition Expr.h:3901
Represents an implicitly-generated value initialization of an object of a given type.
Definition Expr.h:6111
Describes an C or C++ initializer list.
Definition Expr.h:5356
A C++ lambda expression, which produces a function object (of unspecified type) that can be invoked l...
Definition ExprCXX.h:1973
A member reference to an MSPropertyDecl.
Definition ExprCXX.h:941
MS property subscript expression.
Definition ExprCXX.h:1011
Represents a prvalue temporary that is written into memory so that a reference can bind to it.
Definition ExprCXX.h:4974
MatrixSingleSubscriptExpr - Matrix single subscript expression for the MatrixType extension when you ...
Definition Expr.h:2843
MatrixSubscriptExpr - Matrix subscript expression for the MatrixType extension.
Definition Expr.h:2913
MemberExpr - [C99 6.5.2.3] Structure and Union Members.
Definition Expr.h:3412
Represents a place-holder for an object not to be initialized by anything.
Definition Expr.h:5931
An explicit cast in C or a C-style cast in C++, which uses the syntax ([s1][s2]......
Definition ExprOpenMP.h:24
OpenMP 5.0 [2.1.6 Iterators] Iterators are identifiers that expand to multiple values in the clause o...
Definition ExprOpenMP.h:151
ObjCArrayLiteral - used for objective-c array containers; as in: @["Hello", NSApp,...
Definition ExprObjC.h:219
ObjCBoxedExpr - used for generalized expression boxing.
Definition ExprObjC.h:158
ObjCDictionaryLiteral - AST node to represent objective-c dictionary literals; as in:"name" : NSUserN...
Definition ExprObjC.h:341
ObjCEncodeExpr, used for @encode in Objective-C.
Definition ExprObjC.h:440
ObjCIndirectCopyRestoreExpr - Represents the passing of a function argument by indirect copy-restore ...
Definition ExprObjC.h:1614
ObjCIsaExpr - Represent X->isa and X.isa when X is an ObjC 'id' type.
Definition ExprObjC.h:1530
ObjCIvarRefExpr - A reference to an ObjC instance variable.
Definition ExprObjC.h:581
An expression that sends a message to the given Objective-C object or class.
Definition ExprObjC.h:972
ObjCPropertyRefExpr - A dot-syntax expression to access an ObjC property.
Definition ExprObjC.h:649
ObjCSubscriptRefExpr - used for array and dictionary subscripting.
Definition ExprObjC.h:871
OffsetOfExpr - [C99 7.17] - This represents an expression of the form offsetof(record-type,...
Definition Expr.h:2575
OpaqueValueExpr - An expression referring to an opaque object of a fixed type and value class.
Definition Expr.h:1202
This expression type represents an asterisk in an OpenACC Size-Expr, used in the 'tile' and 'gang' cl...
Definition Expr.h:2138
A reference to an overloaded function set, either an UnresolvedLookupExpr or an UnresolvedMemberExpr.
Definition ExprCXX.h:3143
Represents a C++11 pack expansion that produces a sequence of expressions.
Definition ExprCXX.h:4417
ParenExpr - This represents a parenthesized expression, e.g.
Definition Expr.h:2230
[C99 6.4.2.2] - A predefined identifier such as func.
Definition Expr.h:2053
PseudoObjectExpr - An expression which accesses a pseudo-object l-value.
Definition Expr.h:6858
Frontend produces RecoveryExprs on semantic errors that prevent creating other well-formed expression...
Definition Expr.h:7557
ShuffleVectorExpr - clang-specific builtin-in function __builtin_shufflevector.
Definition Expr.h:4691
StmtExpr - This is the GNU Statement Expression extension: ({int X=4; X;}).
Definition Expr.h:4643
Represents a reference to a non-type template parameter that has been substituted with a template arg...
Definition ExprCXX.h:4718
A type trait used in the implementation of various C++11 and Library TR1 trait templates.
Definition ExprCXX.h:2901
UnaryExprOrTypeTraitExpr - expression with either a type or (unevaluated) expression operand.
Definition Expr.h:2673
UnaryOperator - This represents the unary-expression's (except sizeof and alignof),...
Definition Expr.h:2292
Represents a call to the builtin function __builtin_va_arg.
Definition Expr.h:5005
Top level wrappers for InstallAPI frontend operations.
CanThrowResult
Possible results from evaluation of a noexcept expression.
ExprDependenceScope::ExprDependence ExprDependence
ExprDependence computeDependence(FullExpr *E)