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:223
Represents a loop initializing the elements of an array.
Definition Expr.h:6018
This class represents BOTH the OpenMP Array Section and OpenACC 'subarray', with a boolean differenti...
Definition Expr.h:7269
ArraySubscriptExpr - [C99 6.5.2.1] Array Subscripting.
Definition Expr.h:2765
An Embarcadero array type trait, as used in the implementation of __array_rank and __array_extent.
Definition ExprCXX.h:3010
AsTypeExpr - Clang builtin function __builtin_astype [OpenCL 6.2.4.2] This AST node provides support ...
Definition Expr.h:6783
AtomicExpr - Variadic atomic builtins: __atomic_exchange, __atomic_fetch_*, __atomic_load,...
Definition Expr.h:6978
BinaryConditionalOperator - The GNU extension to the conditional operator which allows the middle ope...
Definition Expr.h:4497
A builtin binary operation expression such as "x + y" or "x <= y".
Definition Expr.h:4082
BlockExpr - Adaptor class for mixing a BlockDecl with expressions.
Definition Expr.h:6722
Represents binding an expression to a temporary.
Definition ExprCXX.h:1497
Represents a call to a C++ constructor.
Definition ExprCXX.h:1552
A default argument (C++ [dcl.fct.default]).
Definition ExprCXX.h:1274
A use of a default initializer in a constructor or in aggregate initialization.
Definition ExprCXX.h:1381
Represents a delete expression for memory deallocation and destructor calls, e.g.
Definition ExprCXX.h:2630
Represents a C++ member access expression where the actual member referenced could not be resolved be...
Definition ExprCXX.h:3923
Represents a folding of a pack over an operator.
Definition ExprCXX.h:5085
Represents a new-expression for memory allocation and constructor calls, e.g: "new CXXNewExpr(foo)".
Definition ExprCXX.h:2359
Represents a C++11 noexcept expression (C++ [expr.unary.noexcept]).
Definition ExprCXX.h:4362
Represents a list-initialization with parenthesis.
Definition ExprCXX.h:5194
Represents a C++ pseudo-destructor (C++ [expr.pseudo]).
Definition ExprCXX.h:2749
A rewritten comparison expression that was originally written using operator syntax.
Definition ExprCXX.h:290
An expression "T()" which creates an rvalue of a non-class type T.
Definition ExprCXX.h:2200
Implicit construction of a std::initializer_list<T> object from an array temporary within list-initia...
Definition ExprCXX.h:804
Represents a C++ functional cast expression that builds a temporary object.
Definition ExprCXX.h:1903
Represents the this expression in C++.
Definition ExprCXX.h:1158
A C++ throw-expression (C++ [except.throw]).
Definition ExprCXX.h:1212
A C++ typeid expression (C++ [expr.typeid]), which gets the type_info that corresponds to the supplie...
Definition ExprCXX.h:852
Describes an explicit type conversion that uses functional notion but could not be resolved because o...
Definition ExprCXX.h:3797
A Microsoft C++ __uuidof expression, which gets the _GUID that corresponds to the supplied type or ex...
Definition ExprCXX.h:1072
CallExpr - Represents a function call (C99 6.5.2.2, C++ [expr.call]).
Definition Expr.h:2987
ChooseExpr - GNU builtin-in function __builtin_choose_expr.
Definition Expr.h:4892
CompoundLiteralExpr - [C99 6.5.2.5].
Definition Expr.h:3649
Represents the specialization of a concept - evaluates to a prvalue of type bool.
ConditionalOperator - The ?
Definition Expr.h:4435
ConvertVectorExpr - Clang builtin function __builtin_convertvector This AST node provides support for...
Definition Expr.h:4763
Represents an expression that might suspend coroutine execution; either a co_await or co_yield expres...
Definition ExprCXX.h:5308
A reference to a declared variable, function, enum, etc.
Definition Expr.h:1290
Represents a 'co_await' expression while the type of the promise is dependent.
Definition ExprCXX.h:5454
A qualified reference to a name whose declaration cannot yet be resolved.
Definition ExprCXX.h:3563
A template-id naming a variable template or a concept through a template template parameter.
Definition ExprCXX.h:3479
Represents a C99 designated initializer expression.
Definition Expr.h:5601
ExplicitCastExpr - An explicit cast written in the source code.
Definition Expr.h:3972
This represents one expression.
Definition Expr.h:113
An expression trait intrinsic.
Definition ExprCXX.h:3083
ExtVectorElementExpr - This represents access to specific elements of a vector, and may occur on the ...
Definition Expr.h:6660
FullExpr - Represents a "full-expression" node.
Definition Expr.h:1069
Represents a C11 generic selection.
Definition Expr.h:6232
ImplicitCastExpr - Allows us to explicitly represent implicit type conversions, which have no direct ...
Definition Expr.h:3897
Represents an implicitly-generated value initialization of an object of a given type.
Definition Expr.h:6107
Describes an C or C++ initializer list.
Definition Expr.h:5352
A C++ lambda expression, which produces a function object (of unspecified type) that can be invoked l...
Definition ExprCXX.h:1972
A member reference to an MSPropertyDecl.
Definition ExprCXX.h:940
MS property subscript expression.
Definition ExprCXX.h:1010
Represents a prvalue temporary that is written into memory so that a reference can bind to it.
Definition ExprCXX.h:4973
MatrixSingleSubscriptExpr - Matrix single subscript expression for the MatrixType extension when you ...
Definition Expr.h:2839
MatrixSubscriptExpr - Matrix subscript expression for the MatrixType extension.
Definition Expr.h:2909
MemberExpr - [C99 6.5.2.3] Structure and Union Members.
Definition Expr.h:3408
Represents a place-holder for an object not to be initialized by anything.
Definition Expr.h:5927
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:2571
OpaqueValueExpr - An expression referring to an opaque object of a fixed type and value class.
Definition Expr.h:1198
This expression type represents an asterisk in an OpenACC Size-Expr, used in the 'tile' and 'gang' cl...
Definition Expr.h:2134
A reference to an overloaded function set, either an UnresolvedLookupExpr or an UnresolvedMemberExpr.
Definition ExprCXX.h:3142
Represents a C++11 pack expansion that produces a sequence of expressions.
Definition ExprCXX.h:4416
ParenExpr - This represents a parenthesized expression, e.g.
Definition Expr.h:2226
[C99 6.4.2.2] - A predefined identifier such as func.
Definition Expr.h:2049
PseudoObjectExpr - An expression which accesses a pseudo-object l-value.
Definition Expr.h:6854
Frontend produces RecoveryExprs on semantic errors that prevent creating other well-formed expression...
Definition Expr.h:7553
ShuffleVectorExpr - clang-specific builtin-in function __builtin_shufflevector.
Definition Expr.h:4687
StmtExpr - This is the GNU Statement Expression extension: ({int X=4; X;}).
Definition Expr.h:4639
Represents a reference to a non-type template parameter that has been substituted with a template arg...
Definition ExprCXX.h:4717
A type trait used in the implementation of various C++11 and Library TR1 trait templates.
Definition ExprCXX.h:2900
UnaryExprOrTypeTraitExpr - expression with either a type or (unevaluated) expression operand.
Definition Expr.h:2669
UnaryOperator - This represents the unary-expression's (except sizeof and alignof),...
Definition Expr.h:2288
Represents a call to the builtin function __builtin_va_arg.
Definition Expr.h:5001
Top level wrappers for InstallAPI frontend operations.
CanThrowResult
Possible results from evaluation of a noexcept expression.
ExprDependenceScope::ExprDependence ExprDependence
ExprDependence computeDependence(FullExpr *E)