clang 24.0.0git
ExprConcepts.h
Go to the documentation of this file.
1//===- ExprConcepts.h - C++2a Concepts expressions --------------*- 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/// \file
10/// Defines Expressions and AST nodes for C++2a concepts.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef LLVM_CLANG_AST_EXPRCONCEPTS_H
15#define LLVM_CLANG_AST_EXPRCONCEPTS_H
16
19#include "clang/AST/Decl.h"
22#include "clang/AST/Expr.h"
25#include "clang/AST/Type.h"
27#include "llvm/ADT/STLFunctionalExtras.h"
28#include "llvm/Support/ErrorHandling.h"
29#include "llvm/Support/TrailingObjects.h"
30#include <string>
31#include <utility>
32
33namespace clang {
34class ASTStmtReader;
35class ASTStmtWriter;
36
37/// \brief Represents the specialization of a concept - evaluates to a prvalue
38/// of type bool.
39///
40/// According to C++2a [expr.prim.id]p3 an id-expression that denotes the
41/// specialization of a concept results in a prvalue of type bool.
42class ConceptSpecializationExpr final : public Expr {
43 friend class ASTReader;
44 friend class ASTStmtReader;
45
46private:
47 ConceptReference *ConceptRef;
48
49 /// \brief The Implicit Concept Specialization Decl, which holds the template
50 /// arguments for this specialization.
52
53 /// \brief Information about the satisfaction of the named concept with the
54 /// given arguments. If this expression is value dependent, this is to be
55 /// ignored.
56 ASTConstraintSatisfaction *Satisfaction;
57
58 ConceptSpecializationExpr(const ASTContext &C, ConceptReference *ConceptRef,
60 const ConstraintSatisfaction *Satisfaction);
61
62 ConceptSpecializationExpr(const ASTContext &C, ConceptReference *ConceptRef,
64 const ConstraintSatisfaction *Satisfaction,
65 bool Dependent,
66 bool ContainsUnexpandedParameterPack);
67 ConceptSpecializationExpr(EmptyShell Empty);
68
69public:
70 static ConceptSpecializationExpr *
71 Create(const ASTContext &C, ConceptReference *ConceptRef,
73 const ConstraintSatisfaction *Satisfaction);
74
75 static ConceptSpecializationExpr *
76 Create(const ASTContext &C, ConceptReference *ConceptRef,
78 const ConstraintSatisfaction *Satisfaction, bool Dependent,
79 bool ContainsUnexpandedParameterPack);
80
82 return SpecDecl->getTemplateArguments();
83 }
84
85 ConceptReference *getConceptReference() const { return ConceptRef; }
86
87 TemplateName getNamedConcept() const { return ConceptRef->getNamedConcept(); }
88
90 return cast<ConceptDecl>(getNamedConcept().getAsTemplateDecl());
91 }
92
93 // FIXME: Several of the following functions can be removed. Instead the
94 // caller can directly work with the ConceptReference.
96 return ConceptRef->hasExplicitTemplateArgs();
97 }
98
100 return ConceptRef->getConceptNameLoc();
101 }
103 return ConceptRef->getTemplateArgsAsWritten();
104 }
105
107 return ConceptRef->getNestedNameSpecifierLoc();
108 }
109
111 return ConceptRef->getTemplateKWLoc();
112 }
113
114 NamedDecl *getFoundDecl() const { return ConceptRef->getFoundDecl(); }
115
117 return ConceptRef->getConceptNameInfo();
118 }
119
121 assert(SpecDecl && "Template Argument Decl not initialized");
122 return SpecDecl;
123 }
124
125 /// \brief Whether or not the concept with the given arguments was satisfied
126 /// when the expression was created.
127 /// The expression must not be dependent.
128 bool isSatisfied() const {
129 assert(!isValueDependent() &&
130 "isSatisfied called on a dependent ConceptSpecializationExpr");
131 return Satisfaction->IsSatisfied;
132 }
133
134 /// \brief Get elaborated satisfaction info about the template arguments'
135 /// satisfaction of the named concept.
136 /// The expression must not be dependent.
138 assert(!isValueDependent() &&
139 "getSatisfaction called on dependent ConceptSpecializationExpr");
140 return *Satisfaction;
141 }
142
143 static bool classof(const Stmt *T) {
144 return T->getStmtClass() == ConceptSpecializationExprClass;
145 }
146
147 SourceLocation getBeginLoc() const LLVM_READONLY {
148 return ConceptRef->getBeginLoc();
149 }
150
151 SourceLocation getEndLoc() const LLVM_READONLY {
152 return ConceptRef->getEndLoc();
153 }
154
155 SourceLocation getExprLoc() const LLVM_READONLY {
156 return ConceptRef->getLocation();
157 }
158
159 // Iterators
166};
167
168namespace concepts {
169
170/// \brief A static requirement that can be used in a requires-expression to
171/// check properties of types and expression.
173public:
174 // Note - simple and compound requirements are both represented by the same
175 // class (ExprRequirement).
177private:
178 const RequirementKind Kind;
179 // FIXME: use RequirementDependence to model dependence?
180 LLVM_PREFERRED_TYPE(bool)
181 bool Dependent : 1;
182 LLVM_PREFERRED_TYPE(bool)
183 bool ContainsUnexpandedParameterPack : 1;
184 LLVM_PREFERRED_TYPE(bool)
185 bool Satisfied : 1;
186public:
189 // FIXME: Store diagnostics semantically and not as prerendered strings.
190 // Fixing this probably requires serialization of PartialDiagnostic
191 // objects.
193 StringRef DiagMessage;
194 };
195
196 Requirement(RequirementKind Kind, bool IsDependent,
197 bool ContainsUnexpandedParameterPack, bool IsSatisfied = true) :
198 Kind(Kind), Dependent(IsDependent),
199 ContainsUnexpandedParameterPack(ContainsUnexpandedParameterPack),
200 Satisfied(IsSatisfied) {}
201
202 RequirementKind getKind() const { return Kind; }
203
204 bool isSatisfied() const {
205 assert(!Dependent &&
206 "isSatisfied can only be called on non-dependent requirements.");
207 return Satisfied;
208 }
209
210 void setSatisfied(bool IsSatisfied) {
211 assert(!Dependent &&
212 "setSatisfied can only be called on non-dependent requirements.");
213 Satisfied = IsSatisfied;
214 }
215
216 void setDependent(bool IsDependent) { Dependent = IsDependent; }
217 bool isDependent() const { return Dependent; }
218
220 ContainsUnexpandedParameterPack = Contains;
221 }
223 return ContainsUnexpandedParameterPack;
224 }
225};
226
227/// \brief A requires-expression requirement which queries the existence of a
228/// type name or type template specialization ('type' requirements).
230public:
236private:
237 llvm::PointerUnion<SubstitutionDiagnostic *, TypeSourceInfo *> Value;
238 SatisfactionStatus Status;
239public:
242
243 /// \brief Construct a type requirement from a type. If the given type is not
244 /// dependent, this indicates that the type exists and the requirement will be
245 /// satisfied. Otherwise, the SubstitutionDiagnostic constructor is to be
246 /// used.
248
249 /// \brief Construct a type requirement when the nested name specifier is
250 /// invalid due to a bad substitution. The requirement is unsatisfied.
254
255 SatisfactionStatus getSatisfactionStatus() const { return Status; }
257 this->Status = Status;
258 }
259
261 return Status == SS_SubstitutionFailure;
262 }
263
265 assert(Status == SS_SubstitutionFailure &&
266 "Attempted to get substitution diagnostic when there has been no "
267 "substitution failure.");
268 return cast<SubstitutionDiagnostic *>(Value);
269 }
270
272 assert(!isSubstitutionFailure() &&
273 "Attempted to get type when there has been a substitution failure.");
274 return cast<TypeSourceInfo *>(Value);
275 }
276
277 static bool classof(const Requirement *R) {
278 return R->getKind() == RK_Type;
279 }
280};
281
282/// \brief A requires-expression requirement which queries the validity and
283/// properties of an expression ('simple' and 'compound' requirements).
285public:
295 llvm::PointerIntPair<
296 llvm::PointerUnion<TemplateParameterList *, SubstitutionDiagnostic *>,
297 1, bool>
298 TypeConstraintInfo;
299 public:
302
303 /// \brief No return type requirement was specified.
304 ReturnTypeRequirement() : TypeConstraintInfo(nullptr, false) {}
305
306 /// \brief A return type requirement was specified but it was a
307 /// substitution failure.
309 TypeConstraintInfo(SubstDiag, false) {}
310
311 /// \brief A 'type constraint' style return type requirement.
312 /// \param TPL an invented template parameter list containing a single
313 /// type parameter with a type-constraint.
314 // TODO: Can we maybe not save the whole template parameter list and just
315 // the type constraint? Saving the whole TPL makes it easier to handle in
316 // serialization but is less elegant.
317 ReturnTypeRequirement(TemplateParameterList *TPL, bool IsDependent);
319
320 bool isDependent() const {
321 return TypeConstraintInfo.getInt();
322 }
323
330
331 bool isEmpty() const {
332 return TypeConstraintInfo.getPointer().isNull();
333 }
334
336 return !isEmpty() &&
337 isa<SubstitutionDiagnostic *>(TypeConstraintInfo.getPointer());
338 }
339
340 bool isTypeConstraint() const {
341 return !isEmpty() &&
342 isa<TemplateParameterList *>(TypeConstraintInfo.getPointer());
343 }
344
346 assert(isSubstitutionFailure());
347 return cast<SubstitutionDiagnostic *>(TypeConstraintInfo.getPointer());
348 }
349
350 const TypeConstraint *getTypeConstraint() const;
351
353 assert(isTypeConstraint());
354 return cast<TemplateParameterList *>(TypeConstraintInfo.getPointer());
355 }
356 };
357private:
358 llvm::PointerUnion<Expr *, SubstitutionDiagnostic *> Value;
359 SourceLocation NoexceptLoc; // May be empty if noexcept wasn't specified.
360 ReturnTypeRequirement TypeReq;
361 ConceptSpecializationExpr *SubstitutedConstraintExpr;
362 SatisfactionStatus Status;
363public:
366
367 /// \brief Construct a compound requirement.
368 /// \param E the expression which is checked by this requirement.
369 /// \param IsSimple whether this was a simple requirement in source.
370 /// \param NoexceptLoc the location of the noexcept keyword, if it was
371 /// specified, otherwise an empty location.
372 /// \param Req the requirement for the type of the checked expression.
373 /// \param Status the satisfaction status of this requirement.
375 Expr *E, bool IsSimple, SourceLocation NoexceptLoc,
377 ConceptSpecializationExpr *SubstitutedConstraintExpr = nullptr);
378
379 /// \brief Construct a compound requirement whose expression was a
380 /// substitution failure. The requirement is not satisfied.
381 /// \param E the diagnostic emitted while instantiating the original
382 /// expression.
383 /// \param IsSimple whether this was a simple requirement in source.
384 /// \param NoexceptLoc the location of the noexcept keyword, if it was
385 /// specified, otherwise an empty location.
386 /// \param Req the requirement for the type of the checked expression (omit
387 /// if no requirement was specified).
388 ExprRequirement(SubstitutionDiagnostic *E, bool IsSimple,
389 SourceLocation NoexceptLoc, ReturnTypeRequirement Req = {});
390
391 bool isSimple() const { return getKind() == RK_Simple; }
392 bool isCompound() const { return getKind() == RK_Compound; }
393
394 bool hasNoexceptRequirement() const { return NoexceptLoc.isValid(); }
395 SourceLocation getNoexceptLoc() const { return NoexceptLoc; }
396
397 SatisfactionStatus getSatisfactionStatus() const { return Status; }
398
400 return Status == SS_ExprSubstitutionFailure;
401 }
402
404 return TypeReq;
405 }
406
410 return SubstitutedConstraintExpr;
411 }
412
414 assert(isExprSubstitutionFailure() &&
415 "Attempted to get expression substitution diagnostic when there has "
416 "been no expression substitution failure");
417 return cast<SubstitutionDiagnostic *>(Value);
418 }
419
420 Expr *getExpr() const {
421 assert(!isExprSubstitutionFailure() &&
422 "ExprRequirement has no expression because there has been a "
423 "substitution failure.");
424 return cast<Expr *>(Value);
425 }
426
427 static bool classof(const Requirement *R) {
428 return R->getKind() == RK_Compound || R->getKind() == RK_Simple;
429 }
430};
431
432/// \brief A requires-expression requirement which is satisfied when a general
433/// constraint expression is satisfied ('nested' requirements).
435 Expr *Constraint = nullptr;
436 const ASTConstraintSatisfaction *Satisfaction = nullptr;
437 bool HasInvalidConstraint = false;
438 StringRef InvalidConstraintEntity;
439
440public:
443
445 : Requirement(RK_Nested, /*IsDependent=*/true,
446 Constraint->containsUnexpandedParameterPack()),
447 Constraint(Constraint) {
448 assert(Constraint->isInstantiationDependent() &&
449 "Nested requirement with non-dependent constraint must be "
450 "constructed with a ConstraintSatisfaction object");
451 }
452
454 const ConstraintSatisfaction &Satisfaction)
455 : Requirement(RK_Nested, Constraint->isInstantiationDependent(),
457 Satisfaction.IsSatisfied),
458 Constraint(Constraint),
459 Satisfaction(ASTConstraintSatisfaction::Create(C, Satisfaction)) {}
460
461 NestedRequirement(StringRef InvalidConstraintEntity,
462 const ASTConstraintSatisfaction *Satisfaction)
464 /*IsDependent=*/false,
465 /*ContainsUnexpandedParameterPack*/ false,
466 Satisfaction->IsSatisfied),
467 Satisfaction(Satisfaction), HasInvalidConstraint(true),
468 InvalidConstraintEntity(InvalidConstraintEntity) {}
469
470 NestedRequirement(ASTContext &C, StringRef InvalidConstraintEntity,
471 const ConstraintSatisfaction &Satisfaction)
472 : NestedRequirement(InvalidConstraintEntity,
473 ASTConstraintSatisfaction::Create(C, Satisfaction)) {}
474
475 bool hasInvalidConstraint() const { return HasInvalidConstraint; }
476
478 assert(hasInvalidConstraint());
479 return InvalidConstraintEntity;
480 }
481
483 assert(!hasInvalidConstraint() &&
484 "getConstraintExpr() may not be called "
485 "on nested requirements with invalid constraint.");
486 return Constraint;
487 }
488
490 return *Satisfaction;
491 }
492
493 static bool classof(const Requirement *R) {
494 return R->getKind() == RK_Nested;
495 }
496};
497} // namespace concepts
498
499/// C++2a [expr.prim.req]:
500/// A requires-expression provides a concise way to express requirements on
501/// template arguments. A requirement is one that can be checked by name
502/// lookup (6.4) or by checking properties of types and expressions.
503/// [...]
504/// A requires-expression is a prvalue of type bool [...]
505class RequiresExpr final : public Expr,
506 llvm::TrailingObjects<RequiresExpr, ParmVarDecl *,
507 concepts::Requirement *> {
508 friend TrailingObjects;
509 friend class ASTStmtReader;
510
511 unsigned NumLocalParameters;
512 unsigned NumRequirements;
514 SourceLocation LParenLoc;
515 SourceLocation RParenLoc;
516 SourceLocation RBraceLoc;
517
518 unsigned numTrailingObjects(OverloadToken<ParmVarDecl *>) const {
519 return NumLocalParameters;
520 }
521
522 RequiresExpr(ASTContext &C, SourceLocation RequiresKWLoc,
523 RequiresExprBodyDecl *Body, SourceLocation LParenLoc,
524 ArrayRef<ParmVarDecl *> LocalParameters,
525 SourceLocation RParenLoc,
527 SourceLocation RBraceLoc);
528 RequiresExpr(ASTContext &C, EmptyShell Empty, unsigned NumLocalParameters,
529 unsigned NumRequirements);
530
531public:
532 static RequiresExpr *Create(ASTContext &C, SourceLocation RequiresKWLoc,
534 SourceLocation LParenLoc,
535 ArrayRef<ParmVarDecl *> LocalParameters,
536 SourceLocation RParenLoc,
538 SourceLocation RBraceLoc);
539 static RequiresExpr *
540 Create(ASTContext &C, EmptyShell Empty, unsigned NumLocalParameters,
541 unsigned NumRequirements);
542
544 return getTrailingObjects<ParmVarDecl *>(NumLocalParameters);
545 }
546
547 RequiresExprBodyDecl *getBody() const { return Body; }
548
550 return getTrailingObjects<concepts::Requirement *>(NumRequirements);
551 }
552
553 /// \brief Whether or not the requires clause is satisfied.
554 /// The expression must not be dependent.
555 bool isSatisfied() const {
556 assert(!isValueDependent()
557 && "isSatisfied called on a dependent RequiresExpr");
558 return RequiresExprBits.IsSatisfied;
559 }
560
561 void setSatisfied(bool IsSatisfied) {
562 assert(!isValueDependent() &&
563 "setSatisfied called on a dependent RequiresExpr");
564 RequiresExprBits.IsSatisfied = IsSatisfied;
565 }
566
568 return RequiresExprBits.RequiresKWLoc;
569 }
570
571 SourceLocation getLParenLoc() const { return LParenLoc; }
572 SourceLocation getRParenLoc() const { return RParenLoc; }
573 SourceLocation getRBraceLoc() const { return RBraceLoc; }
574
575 static bool classof(const Stmt *T) {
576 return T->getStmtClass() == RequiresExprClass;
577 }
578
579 SourceLocation getBeginLoc() const LLVM_READONLY {
580 return RequiresExprBits.RequiresKWLoc;
581 }
582 SourceLocation getEndLoc() const LLVM_READONLY {
583 return RBraceLoc;
584 }
585
586 // Iterators
593};
594
595} // namespace clang
596
597#endif // LLVM_CLANG_AST_EXPRCONCEPTS_H
This file provides AST data structures related to concepts.
Defines the clang::ASTContext interface.
Defines the C++ template declaration subclasses.
Defines the clang::SourceLocation class and associated facilities.
C Language Family Type Representation.
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
Definition ASTContext.h:223
Declaration of a C++20 concept.
A reference to a concept and its template args, as it appears in the code.
Definition ASTConcept.h:130
Represents the specialization of a concept - evaluates to a prvalue of type bool.
SourceLocation getEndLoc() const LLVM_READONLY
SourceLocation getBeginLoc() const LLVM_READONLY
SourceLocation getExprLoc() const LLVM_READONLY
const_child_range children() const
bool isSatisfied() const
Whether or not the concept with the given arguments was satisfied when the expression was created.
ArrayRef< TemplateArgument > getTemplateArguments() const
const ASTTemplateArgumentListInfo * getTemplateArgsAsWritten() const
const NestedNameSpecifierLoc & getNestedNameSpecifierLoc() const
NamedDecl * getFoundDecl() const
ConceptDecl * getConceptDecl() const
static bool classof(const Stmt *T)
ConceptReference * getConceptReference() const
TemplateName getNamedConcept() const
SourceLocation getConceptNameLoc() const
const ImplicitConceptSpecializationDecl * getSpecializationDecl() const
const DeclarationNameInfo & getConceptNameInfo() const
const ASTConstraintSatisfaction & getSatisfaction() const
Get elaborated satisfaction info about the template arguments' satisfaction of the named concept.
SourceLocation getTemplateKWLoc() const
The result of a constraint satisfaction check, containing the necessary information to diagnose an un...
Definition ASTConcept.h:47
A little helper class (which is basically a smart pointer that forwards info from DiagnosticsEngine a...
This represents one expression.
Definition Expr.h:113
bool isValueDependent() const
Determines whether the value of this expression depends on.
Definition Expr.h:178
Expr()=delete
This represents a decl that may have a name.
Definition Decl.h:275
A C++ nested-name-specifier augmented with source location information.
Represents the body of a requires-expression.
Definition DeclCXX.h:2118
C++2a [expr.prim.req]: A requires-expression provides a concise way to express requirements on templa...
SourceLocation getLParenLoc() const
SourceLocation getRParenLoc() const
SourceLocation getRBraceLoc() const
void setSatisfied(bool IsSatisfied)
SourceLocation getRequiresKWLoc() const
child_range children()
SourceLocation getEndLoc() const LLVM_READONLY
const_child_range children() const
RequiresExprBodyDecl * getBody() const
ArrayRef< concepts::Requirement * > getRequirements() const
bool isSatisfied() const
Whether or not the requires clause is satisfied.
SourceLocation getBeginLoc() const LLVM_READONLY
static bool classof(const Stmt *T)
ArrayRef< ParmVarDecl * > getLocalParameters() const
friend class ASTStmtReader
Encodes a location in the source.
Stmt - This represents one statement.
Definition Stmt.h:85
StmtIterator child_iterator
Child Iterators: All subclasses must implement 'children' to permit easy iteration over the substatem...
Definition Stmt.h:1591
llvm::iterator_range< child_iterator > child_range
Definition Stmt.h:1594
RequiresExprBitfields RequiresExprBits
Definition Stmt.h:1405
ConstStmtIterator const_child_iterator
Definition Stmt.h:1592
llvm::iterator_range< const_child_iterator > const_child_range
Definition Stmt.h:1595
Represents a C++ template name within the type system.
Stores a list of template parameters for a TemplateDecl and its derived classes.
bool containsUnexpandedParameterPack() const
Determine whether this template parameter list contains an unexpanded parameter pack.
Models the abbreviated syntax to constrain a template type parameter: template <convertible_to<string...
Definition ASTConcept.h:227
A container of type source information.
Definition TypeBase.h:8473
ReturnTypeRequirement()
No return type requirement was specified.
TemplateParameterList * getTypeConstraintTemplateParameterList() const
SubstitutionDiagnostic * getSubstitutionDiagnostic() const
ReturnTypeRequirement(SubstitutionDiagnostic *SubstDiag)
A return type requirement was specified but it was a substitution failure.
SubstitutionDiagnostic * getExprSubstitutionDiagnostic() const
ConceptSpecializationExpr * getReturnTypeRequirementSubstitutedConstraintExpr() const
const ReturnTypeRequirement & getReturnTypeRequirement() const
SatisfactionStatus getSatisfactionStatus() const
SourceLocation getNoexceptLoc() const
static bool classof(const Requirement *R)
ExprRequirement(Expr *E, bool IsSimple, SourceLocation NoexceptLoc, ReturnTypeRequirement Req, SatisfactionStatus Status, ConceptSpecializationExpr *SubstitutedConstraintExpr=nullptr)
Construct a compound requirement.
NestedRequirement(StringRef InvalidConstraintEntity, const ASTConstraintSatisfaction *Satisfaction)
static bool classof(const Requirement *R)
const ASTConstraintSatisfaction & getConstraintSatisfaction() const
NestedRequirement(ASTContext &C, StringRef InvalidConstraintEntity, const ConstraintSatisfaction &Satisfaction)
NestedRequirement(ASTContext &C, Expr *Constraint, const ConstraintSatisfaction &Satisfaction)
void setSatisfied(bool IsSatisfied)
void setContainsUnexpandedParameterPack(bool Contains)
void setDependent(bool IsDependent)
RequirementKind getKind() const
bool containsUnexpandedParameterPack() const
Requirement(RequirementKind Kind, bool IsDependent, bool ContainsUnexpandedParameterPack, bool IsSatisfied=true)
TypeRequirement(SubstitutionDiagnostic *Diagnostic)
Construct a type requirement when the nested name specifier is invalid due to a bad substitution.
static bool classof(const Requirement *R)
SubstitutionDiagnostic * getSubstitutionDiagnostic() const
TypeSourceInfo * getType() const
SatisfactionStatus getSatisfactionStatus() const
TypeRequirement(TypeSourceInfo *T)
Construct a type requirement from a type.
void setSatisfactionStatus(SatisfactionStatus Status)
Top level wrappers for InstallAPI frontend operations.
bool isa(CodeGen::Address addr)
Definition Address.h:330
@ Create
'create' clause, allowed on Compute and Combined constructs, plus 'data', 'enter data',...
nullptr
This class represents a compute construct, representing a 'Kind' of ‘parallel’, 'serial',...
@ Dependent
Parse the block as a dependent block, which may be used in some template instantiations but not other...
Definition Parser.h:142
const FunctionProtoType * T
static OMPLinearClause * Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation LParenLoc, OpenMPLinearClauseKind Modifier, SourceLocation ModifierLoc, SourceLocation ColonLoc, SourceLocation StepModifierLoc, SourceLocation EndLoc, ArrayRef< Expr * > VL, ArrayRef< Expr * > PL, ArrayRef< Expr * > IL, Expr *Step, Expr *CalcStep, Stmt *PreInit, Expr *PostUpdate)
Creates clause with a list of variables VL and a linear step Step.
U cast(CodeGen::Address addr)
Definition Address.h:327
#define false
Definition stdbool.h:26
#define true
Definition stdbool.h:25
The result of a constraint satisfaction check, containing the necessary information to diagnose an un...
Definition ASTConcept.h:91
Represents an explicit template argument list in C++, e.g., the "<int>" in "sort<int>".
DeclarationNameInfo - A collector data type for bundling together a DeclarationName and the correspon...
A placeholder type used to construct an empty shell of a type, that will be filled in later (e....
Definition Stmt.h:1445