clang 22.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;
35class BinaryOperator;
38class StmtExpr;
40class VAArgExpr;
41class ChooseExpr;
42class NoInitExpr;
45class InitListExpr;
47class BlockExpr;
48class AsTypeExpr;
49class DeclRefExpr;
50class RecoveryExpr;
53class CXXTypeidExpr;
56class CXXUuidofExpr;
57class CXXThisExpr;
58class CXXThrowExpr;
61class CXXDeleteExpr;
64class CXXNoexceptExpr;
70class CXXNewExpr;
72class OverloadExpr;
78class LambdaExpr;
82class CXXFoldExpr;
84class TypeTraitExpr;
87class PredefinedExpr;
88class CallExpr;
89class OffsetOfExpr;
90class MemberExpr;
94class ParenListExpr;
96class AtomicExpr;
99class OMPIteratorExpr;
100class ObjCArrayLiteral;
102class ObjCBoxedExpr;
103class ObjCEncodeExpr;
104class ObjCIvarRefExpr;
107class ObjCIsaExpr;
109class ObjCMessageExpr;
111
112// The following functions are called from constructors of `Expr`, so they
113// should not access anything beyond basic
127ExprDependence computeDependence(StmtExpr *E, unsigned TemplateDepth);
137 bool ContainsUnexpandedParameterPack);
162ExprDependence computeDependence(OverloadExpr *E, bool KnownDependent,
163 bool KnownInstantiationDependent,
164 bool KnownContainsUnexpandedParameterPack);
171 bool ContainsUnexpandedParameterPack);
179 bool ValueDependent);
180
188 bool ContainsUnexpandedPack);
193
197
209
210} // namespace clang
211#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:188
Represents a loop initializing the elements of an array.
Definition Expr.h:5904
This class represents BOTH the OpenMP Array Section and OpenACC 'subarray', with a boolean differenti...
Definition Expr.h:7092
ArraySubscriptExpr - [C99 6.5.2.1] Array Subscripting.
Definition Expr.h:2723
An Embarcadero array type trait, as used in the implementation of __array_rank and __array_extent.
Definition ExprCXX.h:2990
AsTypeExpr - Clang builtin function __builtin_astype [OpenCL 6.2.4.2] This AST node provides support ...
Definition Expr.h:6621
AtomicExpr - Variadic atomic builtins: __atomic_exchange, __atomic_fetch_*, __atomic_load,...
Definition Expr.h:6816
BinaryConditionalOperator - The GNU extension to the conditional operator which allows the middle ope...
Definition Expr.h:4389
A builtin binary operation expression such as "x + y" or "x <= y".
Definition Expr.h:3974
BlockExpr - Adaptor class for mixing a BlockDecl with expressions.
Definition Expr.h:6560
Represents binding an expression to a temporary.
Definition ExprCXX.h:1494
Represents a call to a C++ constructor.
Definition ExprCXX.h:1549
A default argument (C++ [dcl.fct.default]).
Definition ExprCXX.h:1271
A use of a default initializer in a constructor or in aggregate initialization.
Definition ExprCXX.h:1378
Represents a delete expression for memory deallocation and destructor calls, e.g.
Definition ExprCXX.h:2620
Represents a C++ member access expression where the actual member referenced could not be resolved be...
Definition ExprCXX.h:3864
Represents a folding of a pack over an operator.
Definition ExprCXX.h:5026
Represents a new-expression for memory allocation and constructor calls, e.g: "new CXXNewExpr(foo)".
Definition ExprCXX.h:2349
Represents a C++11 noexcept expression (C++ [expr.unary.noexcept]).
Definition ExprCXX.h:4303
Represents a list-initialization with parenthesis.
Definition ExprCXX.h:5135
Represents a C++ pseudo-destructor (C++ [expr.pseudo]).
Definition ExprCXX.h:2739
A rewritten comparison expression that was originally written using operator syntax.
Definition ExprCXX.h:286
An expression "T()" which creates an rvalue of a non-class type T.
Definition ExprCXX.h:2198
Implicit construction of a std::initializer_list<T> object from an array temporary within list-initia...
Definition ExprCXX.h:800
Represents a C++ functional cast expression that builds a temporary object.
Definition ExprCXX.h:1901
Represents the this expression in C++.
Definition ExprCXX.h:1155
A C++ throw-expression (C++ [except.throw]).
Definition ExprCXX.h:1209
A C++ typeid expression (C++ [expr.typeid]), which gets the type_info that corresponds to the supplie...
Definition ExprCXX.h:848
Describes an explicit type conversion that uses functional notion but could not be resolved because o...
Definition ExprCXX.h:3738
A Microsoft C++ __uuidof expression, which gets the _GUID that corresponds to the supplied type or ex...
Definition ExprCXX.h:1069
CallExpr - Represents a function call (C99 6.5.2.2, C++ [expr.call]).
Definition Expr.h:2879
ChooseExpr - GNU builtin-in function __builtin_choose_expr.
Definition Expr.h:4784
CompoundLiteralExpr - [C99 6.5.2.5].
Definition Expr.h:3541
Represents the specialization of a concept - evaluates to a prvalue of type bool.
ConditionalOperator - The ?
Definition Expr.h:4327
ConvertVectorExpr - Clang builtin function __builtin_convertvector This AST node provides support for...
Definition Expr.h:4655
Represents an expression that might suspend coroutine execution; either a co_await or co_yield expres...
Definition ExprCXX.h:5249
A reference to a declared variable, function, enum, etc.
Definition Expr.h:1272
Represents a 'co_await' expression while the type of the promise is dependent.
Definition ExprCXX.h:5395
A qualified reference to a name whose declaration cannot yet be resolved.
Definition ExprCXX.h:3504
Represents a C99 designated initializer expression.
Definition Expr.h:5487
ExplicitCastExpr - An explicit cast written in the source code.
Definition Expr.h:3864
This represents one expression.
Definition Expr.h:112
An expression trait intrinsic.
Definition ExprCXX.h:3063
ExtVectorElementExpr - This represents access to specific elements of a vector, and may occur on the ...
Definition Expr.h:6500
FullExpr - Represents a "full-expression" node.
Definition Expr.h:1051
Represents a C11 generic selection.
Definition Expr.h:6114
ImplicitCastExpr - Allows us to explicitly represent implicit type conversions, which have no direct ...
Definition Expr.h:3789
Represents an implicitly-generated value initialization of an object of a given type.
Definition Expr.h:5993
Describes an C or C++ initializer list.
Definition Expr.h:5235
A C++ lambda expression, which produces a function object (of unspecified type) that can be invoked l...
Definition ExprCXX.h:1970
A member reference to an MSPropertyDecl.
Definition ExprCXX.h:936
MS property subscript expression.
Definition ExprCXX.h:1007
Represents a prvalue temporary that is written into memory so that a reference can bind to it.
Definition ExprCXX.h:4914
MatrixSubscriptExpr - Matrix subscript expression for the MatrixType extension.
Definition Expr.h:2801
MemberExpr - [C99 6.5.2.3] Structure and Union Members.
Definition Expr.h:3300
Represents a place-holder for an object not to be initialized by anything.
Definition Expr.h:5813
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:192
ObjCBoxedExpr - used for generalized expression boxing.
Definition ExprObjC.h:128
ObjCDictionaryLiteral - AST node to represent objective-c dictionary literals; as in:"name" : NSUserN...
Definition ExprObjC.h:308
ObjCEncodeExpr, used for @encode in Objective-C.
Definition ExprObjC.h:409
ObjCIndirectCopyRestoreExpr - Represents the passing of a function argument by indirect copy-restore ...
Definition ExprObjC.h:1582
ObjCIsaExpr - Represent X->isa and X.isa when X is an ObjC 'id' type.
Definition ExprObjC.h:1498
ObjCIvarRefExpr - A reference to an ObjC instance variable.
Definition ExprObjC.h:548
An expression that sends a message to the given Objective-C object or class.
Definition ExprObjC.h:940
ObjCPropertyRefExpr - A dot-syntax expression to access an ObjC property.
Definition ExprObjC.h:616
ObjCSubscriptRefExpr - used for array and dictionary subscripting.
Definition ExprObjC.h:839
OffsetOfExpr - [C99 7.17] - This represents an expression of the form offsetof(record-type,...
Definition Expr.h:2529
OpaqueValueExpr - An expression referring to an opaque object of a fixed type and value class.
Definition Expr.h:1180
This expression type represents an asterisk in an OpenACC Size-Expr, used in the 'tile' and 'gang' cl...
Definition Expr.h:2092
A reference to an overloaded function set, either an UnresolvedLookupExpr or an UnresolvedMemberExpr.
Definition ExprCXX.h:3122
Represents a C++11 pack expansion that produces a sequence of expressions.
Definition ExprCXX.h:4357
ParenExpr - This represents a parenthesized expression, e.g.
Definition Expr.h:2184
[C99 6.4.2.2] - A predefined identifier such as func.
Definition Expr.h:2007
PseudoObjectExpr - An expression which accesses a pseudo-object l-value.
Definition Expr.h:6692
Frontend produces RecoveryExprs on semantic errors that prevent creating other well-formed expression...
Definition Expr.h:7364
ShuffleVectorExpr - clang-specific builtin-in function __builtin_shufflevector.
Definition Expr.h:4579
StmtExpr - This is the GNU Statement Expression extension: ({int X=4; X;}).
Definition Expr.h:4531
Represents a reference to a non-type template parameter that has been substituted with a template arg...
Definition ExprCXX.h:4658
A type trait used in the implementation of various C++11 and Library TR1 trait templates.
Definition ExprCXX.h:2890
UnaryExprOrTypeTraitExpr - expression with either a type or (unevaluated) expression operand.
Definition Expr.h:2627
UnaryOperator - This represents the unary-expression's (except sizeof and alignof),...
Definition Expr.h:2246
Represents a call to the builtin function __builtin_va_arg.
Definition Expr.h:4893
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)