clang  15.0.0git
StmtProfile.cpp
Go to the documentation of this file.
1 //===---- StmtProfile.cpp - Profile implementation for Stmt ASTs ----------===//
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 // This file implements the Stmt::Profile method, which builds a unique bit
10 // representation that identifies a statement/expression.
11 //
12 //===----------------------------------------------------------------------===//
13 #include "clang/AST/ASTContext.h"
14 #include "clang/AST/DeclCXX.h"
15 #include "clang/AST/DeclObjC.h"
16 #include "clang/AST/DeclTemplate.h"
17 #include "clang/AST/Expr.h"
18 #include "clang/AST/ExprCXX.h"
19 #include "clang/AST/ExprObjC.h"
20 #include "clang/AST/ExprOpenMP.h"
21 #include "clang/AST/ODRHash.h"
22 #include "clang/AST/OpenMPClause.h"
23 #include "clang/AST/StmtVisitor.h"
24 #include "llvm/ADT/FoldingSet.h"
25 using namespace clang;
26 
27 namespace {
28  class StmtProfiler : public ConstStmtVisitor<StmtProfiler> {
29  protected:
30  llvm::FoldingSetNodeID &ID;
31  bool Canonical;
32 
33  public:
34  StmtProfiler(llvm::FoldingSetNodeID &ID, bool Canonical)
35  : ID(ID), Canonical(Canonical) {}
36 
37  virtual ~StmtProfiler() {}
38 
39  void VisitStmt(const Stmt *S);
40 
41  void VisitStmtNoChildren(const Stmt *S) {
42  HandleStmtClass(S->getStmtClass());
43  }
44 
45  virtual void HandleStmtClass(Stmt::StmtClass SC) = 0;
46 
47 #define STMT(Node, Base) void Visit##Node(const Node *S);
48 #include "clang/AST/StmtNodes.inc"
49 
50  /// Visit a declaration that is referenced within an expression
51  /// or statement.
52  virtual void VisitDecl(const Decl *D) = 0;
53 
54  /// Visit a type that is referenced within an expression or
55  /// statement.
56  virtual void VisitType(QualType T) = 0;
57 
58  /// Visit a name that occurs within an expression or statement.
59  virtual void VisitName(DeclarationName Name, bool TreatAsDecl = false) = 0;
60 
61  /// Visit identifiers that are not in Decl's or Type's.
62  virtual void VisitIdentifierInfo(IdentifierInfo *II) = 0;
63 
64  /// Visit a nested-name-specifier that occurs within an expression
65  /// or statement.
66  virtual void VisitNestedNameSpecifier(NestedNameSpecifier *NNS) = 0;
67 
68  /// Visit a template name that occurs within an expression or
69  /// statement.
70  virtual void VisitTemplateName(TemplateName Name) = 0;
71 
72  /// Visit template arguments that occur within an expression or
73  /// statement.
74  void VisitTemplateArguments(const TemplateArgumentLoc *Args,
75  unsigned NumArgs);
76 
77  /// Visit a single template argument.
78  void VisitTemplateArgument(const TemplateArgument &Arg);
79  };
80 
81  class StmtProfilerWithPointers : public StmtProfiler {
82  const ASTContext &Context;
83 
84  public:
85  StmtProfilerWithPointers(llvm::FoldingSetNodeID &ID,
86  const ASTContext &Context, bool Canonical)
87  : StmtProfiler(ID, Canonical), Context(Context) {}
88  private:
89  void HandleStmtClass(Stmt::StmtClass SC) override {
90  ID.AddInteger(SC);
91  }
92 
93  void VisitDecl(const Decl *D) override {
94  ID.AddInteger(D ? D->getKind() : 0);
95 
96  if (Canonical && D) {
97  if (const NonTypeTemplateParmDecl *NTTP =
98  dyn_cast<NonTypeTemplateParmDecl>(D)) {
99  ID.AddInteger(NTTP->getDepth());
100  ID.AddInteger(NTTP->getIndex());
101  ID.AddBoolean(NTTP->isParameterPack());
102  VisitType(NTTP->getType());
103  return;
104  }
105 
106  if (const ParmVarDecl *Parm = dyn_cast<ParmVarDecl>(D)) {
107  // The Itanium C++ ABI uses the type, scope depth, and scope
108  // index of a parameter when mangling expressions that involve
109  // function parameters, so we will use the parameter's type for
110  // establishing function parameter identity. That way, our
111  // definition of "equivalent" (per C++ [temp.over.link]) is at
112  // least as strong as the definition of "equivalent" used for
113  // name mangling.
114  VisitType(Parm->getType());
115  ID.AddInteger(Parm->getFunctionScopeDepth());
116  ID.AddInteger(Parm->getFunctionScopeIndex());
117  return;
118  }
119 
120  if (const TemplateTypeParmDecl *TTP =
121  dyn_cast<TemplateTypeParmDecl>(D)) {
122  ID.AddInteger(TTP->getDepth());
123  ID.AddInteger(TTP->getIndex());
124  ID.AddBoolean(TTP->isParameterPack());
125  return;
126  }
127 
128  if (const TemplateTemplateParmDecl *TTP =
129  dyn_cast<TemplateTemplateParmDecl>(D)) {
130  ID.AddInteger(TTP->getDepth());
131  ID.AddInteger(TTP->getIndex());
132  ID.AddBoolean(TTP->isParameterPack());
133  return;
134  }
135  }
136 
137  ID.AddPointer(D ? D->getCanonicalDecl() : nullptr);
138  }
139 
140  void VisitType(QualType T) override {
141  if (Canonical && !T.isNull())
142  T = Context.getCanonicalType(T);
143 
144  ID.AddPointer(T.getAsOpaquePtr());
145  }
146 
147  void VisitName(DeclarationName Name, bool /*TreatAsDecl*/) override {
148  ID.AddPointer(Name.getAsOpaquePtr());
149  }
150 
151  void VisitIdentifierInfo(IdentifierInfo *II) override {
152  ID.AddPointer(II);
153  }
154 
155  void VisitNestedNameSpecifier(NestedNameSpecifier *NNS) override {
156  if (Canonical)
157  NNS = Context.getCanonicalNestedNameSpecifier(NNS);
158  ID.AddPointer(NNS);
159  }
160 
161  void VisitTemplateName(TemplateName Name) override {
162  if (Canonical)
163  Name = Context.getCanonicalTemplateName(Name);
164 
165  Name.Profile(ID);
166  }
167  };
168 
169  class StmtProfilerWithoutPointers : public StmtProfiler {
170  ODRHash &Hash;
171  public:
172  StmtProfilerWithoutPointers(llvm::FoldingSetNodeID &ID, ODRHash &Hash)
173  : StmtProfiler(ID, false), Hash(Hash) {}
174 
175  private:
176  void HandleStmtClass(Stmt::StmtClass SC) override {
177  if (SC == Stmt::UnresolvedLookupExprClass) {
178  // Pretend that the name looked up is a Decl due to how templates
179  // handle some Decl lookups.
180  ID.AddInteger(Stmt::DeclRefExprClass);
181  } else {
182  ID.AddInteger(SC);
183  }
184  }
185 
186  void VisitType(QualType T) override {
187  Hash.AddQualType(T);
188  }
189 
190  void VisitName(DeclarationName Name, bool TreatAsDecl) override {
191  if (TreatAsDecl) {
192  // A Decl can be null, so each Decl is preceded by a boolean to
193  // store its nullness. Add a boolean here to match.
194  ID.AddBoolean(true);
195  }
196  Hash.AddDeclarationName(Name, TreatAsDecl);
197  }
198  void VisitIdentifierInfo(IdentifierInfo *II) override {
199  ID.AddBoolean(II);
200  if (II) {
201  Hash.AddIdentifierInfo(II);
202  }
203  }
204  void VisitDecl(const Decl *D) override {
205  ID.AddBoolean(D);
206  if (D) {
207  Hash.AddDecl(D);
208  }
209  }
210  void VisitTemplateName(TemplateName Name) override {
211  Hash.AddTemplateName(Name);
212  }
213  void VisitNestedNameSpecifier(NestedNameSpecifier *NNS) override {
214  ID.AddBoolean(NNS);
215  if (NNS) {
216  Hash.AddNestedNameSpecifier(NNS);
217  }
218  }
219  };
220 }
221 
222 void StmtProfiler::VisitStmt(const Stmt *S) {
223  assert(S && "Requires non-null Stmt pointer");
224 
225  VisitStmtNoChildren(S);
226 
227  for (const Stmt *SubStmt : S->children()) {
228  if (SubStmt)
229  Visit(SubStmt);
230  else
231  ID.AddInteger(0);
232  }
233 }
234 
235 void StmtProfiler::VisitDeclStmt(const DeclStmt *S) {
236  VisitStmt(S);
237  for (const auto *D : S->decls())
238  VisitDecl(D);
239 }
240 
241 void StmtProfiler::VisitNullStmt(const NullStmt *S) {
242  VisitStmt(S);
243 }
244 
245 void StmtProfiler::VisitCompoundStmt(const CompoundStmt *S) {
246  VisitStmt(S);
247 }
248 
249 void StmtProfiler::VisitCaseStmt(const CaseStmt *S) {
250  VisitStmt(S);
251 }
252 
253 void StmtProfiler::VisitDefaultStmt(const DefaultStmt *S) {
254  VisitStmt(S);
255 }
256 
257 void StmtProfiler::VisitLabelStmt(const LabelStmt *S) {
258  VisitStmt(S);
259  VisitDecl(S->getDecl());
260 }
261 
262 void StmtProfiler::VisitAttributedStmt(const AttributedStmt *S) {
263  VisitStmt(S);
264  // TODO: maybe visit attributes?
265 }
266 
267 void StmtProfiler::VisitIfStmt(const IfStmt *S) {
268  VisitStmt(S);
269  VisitDecl(S->getConditionVariable());
270 }
271 
272 void StmtProfiler::VisitSwitchStmt(const SwitchStmt *S) {
273  VisitStmt(S);
274  VisitDecl(S->getConditionVariable());
275 }
276 
277 void StmtProfiler::VisitWhileStmt(const WhileStmt *S) {
278  VisitStmt(S);
279  VisitDecl(S->getConditionVariable());
280 }
281 
282 void StmtProfiler::VisitDoStmt(const DoStmt *S) {
283  VisitStmt(S);
284 }
285 
286 void StmtProfiler::VisitForStmt(const ForStmt *S) {
287  VisitStmt(S);
288 }
289 
290 void StmtProfiler::VisitGotoStmt(const GotoStmt *S) {
291  VisitStmt(S);
292  VisitDecl(S->getLabel());
293 }
294 
295 void StmtProfiler::VisitIndirectGotoStmt(const IndirectGotoStmt *S) {
296  VisitStmt(S);
297 }
298 
299 void StmtProfiler::VisitContinueStmt(const ContinueStmt *S) {
300  VisitStmt(S);
301 }
302 
303 void StmtProfiler::VisitBreakStmt(const BreakStmt *S) {
304  VisitStmt(S);
305 }
306 
307 void StmtProfiler::VisitReturnStmt(const ReturnStmt *S) {
308  VisitStmt(S);
309 }
310 
311 void StmtProfiler::VisitGCCAsmStmt(const GCCAsmStmt *S) {
312  VisitStmt(S);
313  ID.AddBoolean(S->isVolatile());
314  ID.AddBoolean(S->isSimple());
315  VisitStringLiteral(S->getAsmString());
316  ID.AddInteger(S->getNumOutputs());
317  for (unsigned I = 0, N = S->getNumOutputs(); I != N; ++I) {
318  ID.AddString(S->getOutputName(I));
319  VisitStringLiteral(S->getOutputConstraintLiteral(I));
320  }
321  ID.AddInteger(S->getNumInputs());
322  for (unsigned I = 0, N = S->getNumInputs(); I != N; ++I) {
323  ID.AddString(S->getInputName(I));
324  VisitStringLiteral(S->getInputConstraintLiteral(I));
325  }
326  ID.AddInteger(S->getNumClobbers());
327  for (unsigned I = 0, N = S->getNumClobbers(); I != N; ++I)
328  VisitStringLiteral(S->getClobberStringLiteral(I));
329  ID.AddInteger(S->getNumLabels());
330  for (auto *L : S->labels())
331  VisitDecl(L->getLabel());
332 }
333 
334 void StmtProfiler::VisitMSAsmStmt(const MSAsmStmt *S) {
335  // FIXME: Implement MS style inline asm statement profiler.
336  VisitStmt(S);
337 }
338 
339 void StmtProfiler::VisitCXXCatchStmt(const CXXCatchStmt *S) {
340  VisitStmt(S);
341  VisitType(S->getCaughtType());
342 }
343 
344 void StmtProfiler::VisitCXXTryStmt(const CXXTryStmt *S) {
345  VisitStmt(S);
346 }
347 
348 void StmtProfiler::VisitCXXForRangeStmt(const CXXForRangeStmt *S) {
349  VisitStmt(S);
350 }
351 
352 void StmtProfiler::VisitMSDependentExistsStmt(const MSDependentExistsStmt *S) {
353  VisitStmt(S);
354  ID.AddBoolean(S->isIfExists());
355  VisitNestedNameSpecifier(S->getQualifierLoc().getNestedNameSpecifier());
356  VisitName(S->getNameInfo().getName());
357 }
358 
359 void StmtProfiler::VisitSEHTryStmt(const SEHTryStmt *S) {
360  VisitStmt(S);
361 }
362 
363 void StmtProfiler::VisitSEHFinallyStmt(const SEHFinallyStmt *S) {
364  VisitStmt(S);
365 }
366 
367 void StmtProfiler::VisitSEHExceptStmt(const SEHExceptStmt *S) {
368  VisitStmt(S);
369 }
370 
371 void StmtProfiler::VisitSEHLeaveStmt(const SEHLeaveStmt *S) {
372  VisitStmt(S);
373 }
374 
375 void StmtProfiler::VisitCapturedStmt(const CapturedStmt *S) {
376  VisitStmt(S);
377 }
378 
379 void StmtProfiler::VisitObjCForCollectionStmt(const ObjCForCollectionStmt *S) {
380  VisitStmt(S);
381 }
382 
383 void StmtProfiler::VisitObjCAtCatchStmt(const ObjCAtCatchStmt *S) {
384  VisitStmt(S);
385  ID.AddBoolean(S->hasEllipsis());
386  if (S->getCatchParamDecl())
387  VisitType(S->getCatchParamDecl()->getType());
388 }
389 
390 void StmtProfiler::VisitObjCAtFinallyStmt(const ObjCAtFinallyStmt *S) {
391  VisitStmt(S);
392 }
393 
394 void StmtProfiler::VisitObjCAtTryStmt(const ObjCAtTryStmt *S) {
395  VisitStmt(S);
396 }
397 
398 void
399 StmtProfiler::VisitObjCAtSynchronizedStmt(const ObjCAtSynchronizedStmt *S) {
400  VisitStmt(S);
401 }
402 
403 void StmtProfiler::VisitObjCAtThrowStmt(const ObjCAtThrowStmt *S) {
404  VisitStmt(S);
405 }
406 
407 void
408 StmtProfiler::VisitObjCAutoreleasePoolStmt(const ObjCAutoreleasePoolStmt *S) {
409  VisitStmt(S);
410 }
411 
412 namespace {
413 class OMPClauseProfiler : public ConstOMPClauseVisitor<OMPClauseProfiler> {
414  StmtProfiler *Profiler;
415  /// Process clauses with list of variables.
416  template <typename T>
417  void VisitOMPClauseList(T *Node);
418 
419 public:
420  OMPClauseProfiler(StmtProfiler *P) : Profiler(P) { }
421 #define GEN_CLANG_CLAUSE_CLASS
422 #define CLAUSE_CLASS(Enum, Str, Class) void Visit##Class(const Class *C);
423 #include "llvm/Frontend/OpenMP/OMP.inc"
424  void VistOMPClauseWithPreInit(const OMPClauseWithPreInit *C);
425  void VistOMPClauseWithPostUpdate(const OMPClauseWithPostUpdate *C);
426 };
427 
428 void OMPClauseProfiler::VistOMPClauseWithPreInit(
429  const OMPClauseWithPreInit *C) {
430  if (auto *S = C->getPreInitStmt())
431  Profiler->VisitStmt(S);
432 }
433 
434 void OMPClauseProfiler::VistOMPClauseWithPostUpdate(
435  const OMPClauseWithPostUpdate *C) {
436  VistOMPClauseWithPreInit(C);
437  if (auto *E = C->getPostUpdateExpr())
438  Profiler->VisitStmt(E);
439 }
440 
441 void OMPClauseProfiler::VisitOMPIfClause(const OMPIfClause *C) {
442  VistOMPClauseWithPreInit(C);
443  if (C->getCondition())
444  Profiler->VisitStmt(C->getCondition());
445 }
446 
447 void OMPClauseProfiler::VisitOMPFinalClause(const OMPFinalClause *C) {
448  VistOMPClauseWithPreInit(C);
449  if (C->getCondition())
450  Profiler->VisitStmt(C->getCondition());
451 }
452 
453 void OMPClauseProfiler::VisitOMPNumThreadsClause(const OMPNumThreadsClause *C) {
454  VistOMPClauseWithPreInit(C);
455  if (C->getNumThreads())
456  Profiler->VisitStmt(C->getNumThreads());
457 }
458 
459 void OMPClauseProfiler::VisitOMPAlignClause(const OMPAlignClause *C) {
460  if (C->getAlignment())
461  Profiler->VisitStmt(C->getAlignment());
462 }
463 
464 void OMPClauseProfiler::VisitOMPSafelenClause(const OMPSafelenClause *C) {
465  if (C->getSafelen())
466  Profiler->VisitStmt(C->getSafelen());
467 }
468 
469 void OMPClauseProfiler::VisitOMPSimdlenClause(const OMPSimdlenClause *C) {
470  if (C->getSimdlen())
471  Profiler->VisitStmt(C->getSimdlen());
472 }
473 
474 void OMPClauseProfiler::VisitOMPSizesClause(const OMPSizesClause *C) {
475  for (auto E : C->getSizesRefs())
476  if (E)
477  Profiler->VisitExpr(E);
478 }
479 
480 void OMPClauseProfiler::VisitOMPFullClause(const OMPFullClause *C) {}
481 
482 void OMPClauseProfiler::VisitOMPPartialClause(const OMPPartialClause *C) {
483  if (const Expr *Factor = C->getFactor())
484  Profiler->VisitExpr(Factor);
485 }
486 
487 void OMPClauseProfiler::VisitOMPAllocatorClause(const OMPAllocatorClause *C) {
488  if (C->getAllocator())
489  Profiler->VisitStmt(C->getAllocator());
490 }
491 
492 void OMPClauseProfiler::VisitOMPCollapseClause(const OMPCollapseClause *C) {
493  if (C->getNumForLoops())
494  Profiler->VisitStmt(C->getNumForLoops());
495 }
496 
497 void OMPClauseProfiler::VisitOMPDetachClause(const OMPDetachClause *C) {
498  if (Expr *Evt = C->getEventHandler())
499  Profiler->VisitStmt(Evt);
500 }
501 
502 void OMPClauseProfiler::VisitOMPNovariantsClause(const OMPNovariantsClause *C) {
503  VistOMPClauseWithPreInit(C);
504  if (C->getCondition())
505  Profiler->VisitStmt(C->getCondition());
506 }
507 
508 void OMPClauseProfiler::VisitOMPNocontextClause(const OMPNocontextClause *C) {
509  VistOMPClauseWithPreInit(C);
510  if (C->getCondition())
511  Profiler->VisitStmt(C->getCondition());
512 }
513 
514 void OMPClauseProfiler::VisitOMPDefaultClause(const OMPDefaultClause *C) { }
515 
516 void OMPClauseProfiler::VisitOMPProcBindClause(const OMPProcBindClause *C) { }
517 
518 void OMPClauseProfiler::VisitOMPUnifiedAddressClause(
519  const OMPUnifiedAddressClause *C) {}
520 
521 void OMPClauseProfiler::VisitOMPUnifiedSharedMemoryClause(
522  const OMPUnifiedSharedMemoryClause *C) {}
523 
524 void OMPClauseProfiler::VisitOMPReverseOffloadClause(
525  const OMPReverseOffloadClause *C) {}
526 
527 void OMPClauseProfiler::VisitOMPDynamicAllocatorsClause(
528  const OMPDynamicAllocatorsClause *C) {}
529 
530 void OMPClauseProfiler::VisitOMPAtomicDefaultMemOrderClause(
531  const OMPAtomicDefaultMemOrderClause *C) {}
532 
533 void OMPClauseProfiler::VisitOMPScheduleClause(const OMPScheduleClause *C) {
534  VistOMPClauseWithPreInit(C);
535  if (auto *S = C->getChunkSize())
536  Profiler->VisitStmt(S);
537 }
538 
539 void OMPClauseProfiler::VisitOMPOrderedClause(const OMPOrderedClause *C) {
540  if (auto *Num = C->getNumForLoops())
541  Profiler->VisitStmt(Num);
542 }
543 
544 void OMPClauseProfiler::VisitOMPNowaitClause(const OMPNowaitClause *) {}
545 
546 void OMPClauseProfiler::VisitOMPUntiedClause(const OMPUntiedClause *) {}
547 
548 void OMPClauseProfiler::VisitOMPMergeableClause(const OMPMergeableClause *) {}
549 
550 void OMPClauseProfiler::VisitOMPReadClause(const OMPReadClause *) {}
551 
552 void OMPClauseProfiler::VisitOMPWriteClause(const OMPWriteClause *) {}
553 
554 void OMPClauseProfiler::VisitOMPUpdateClause(const OMPUpdateClause *) {}
555 
556 void OMPClauseProfiler::VisitOMPCaptureClause(const OMPCaptureClause *) {}
557 
558 void OMPClauseProfiler::VisitOMPCompareClause(const OMPCompareClause *) {}
559 
560 void OMPClauseProfiler::VisitOMPSeqCstClause(const OMPSeqCstClause *) {}
561 
562 void OMPClauseProfiler::VisitOMPAcqRelClause(const OMPAcqRelClause *) {}
563 
564 void OMPClauseProfiler::VisitOMPAcquireClause(const OMPAcquireClause *) {}
565 
566 void OMPClauseProfiler::VisitOMPReleaseClause(const OMPReleaseClause *) {}
567 
568 void OMPClauseProfiler::VisitOMPRelaxedClause(const OMPRelaxedClause *) {}
569 
570 void OMPClauseProfiler::VisitOMPThreadsClause(const OMPThreadsClause *) {}
571 
572 void OMPClauseProfiler::VisitOMPSIMDClause(const OMPSIMDClause *) {}
573 
574 void OMPClauseProfiler::VisitOMPNogroupClause(const OMPNogroupClause *) {}
575 
576 void OMPClauseProfiler::VisitOMPInitClause(const OMPInitClause *C) {
577  VisitOMPClauseList(C);
578 }
579 
580 void OMPClauseProfiler::VisitOMPUseClause(const OMPUseClause *C) {
581  if (C->getInteropVar())
582  Profiler->VisitStmt(C->getInteropVar());
583 }
584 
585 void OMPClauseProfiler::VisitOMPDestroyClause(const OMPDestroyClause *C) {
586  if (C->getInteropVar())
587  Profiler->VisitStmt(C->getInteropVar());
588 }
589 
590 void OMPClauseProfiler::VisitOMPFilterClause(const OMPFilterClause *C) {
591  VistOMPClauseWithPreInit(C);
592  if (C->getThreadID())
593  Profiler->VisitStmt(C->getThreadID());
594 }
595 
596 template<typename T>
597 void OMPClauseProfiler::VisitOMPClauseList(T *Node) {
598  for (auto *E : Node->varlists()) {
599  if (E)
600  Profiler->VisitStmt(E);
601  }
602 }
603 
604 void OMPClauseProfiler::VisitOMPPrivateClause(const OMPPrivateClause *C) {
605  VisitOMPClauseList(C);
606  for (auto *E : C->private_copies()) {
607  if (E)
608  Profiler->VisitStmt(E);
609  }
610 }
611 void
612 OMPClauseProfiler::VisitOMPFirstprivateClause(const OMPFirstprivateClause *C) {
613  VisitOMPClauseList(C);
614  VistOMPClauseWithPreInit(C);
615  for (auto *E : C->private_copies()) {
616  if (E)
617  Profiler->VisitStmt(E);
618  }
619  for (auto *E : C->inits()) {
620  if (E)
621  Profiler->VisitStmt(E);
622  }
623 }
624 void
625 OMPClauseProfiler::VisitOMPLastprivateClause(const OMPLastprivateClause *C) {
626  VisitOMPClauseList(C);
627  VistOMPClauseWithPostUpdate(C);
628  for (auto *E : C->source_exprs()) {
629  if (E)
630  Profiler->VisitStmt(E);
631  }
632  for (auto *E : C->destination_exprs()) {
633  if (E)
634  Profiler->VisitStmt(E);
635  }
636  for (auto *E : C->assignment_ops()) {
637  if (E)
638  Profiler->VisitStmt(E);
639  }
640 }
641 void OMPClauseProfiler::VisitOMPSharedClause(const OMPSharedClause *C) {
642  VisitOMPClauseList(C);
643 }
644 void OMPClauseProfiler::VisitOMPReductionClause(
645  const OMPReductionClause *C) {
646  Profiler->VisitNestedNameSpecifier(
647  C->getQualifierLoc().getNestedNameSpecifier());
648  Profiler->VisitName(C->getNameInfo().getName());
649  VisitOMPClauseList(C);
650  VistOMPClauseWithPostUpdate(C);
651  for (auto *E : C->privates()) {
652  if (E)
653  Profiler->VisitStmt(E);
654  }
655  for (auto *E : C->lhs_exprs()) {
656  if (E)
657  Profiler->VisitStmt(E);
658  }
659  for (auto *E : C->rhs_exprs()) {
660  if (E)
661  Profiler->VisitStmt(E);
662  }
663  for (auto *E : C->reduction_ops()) {
664  if (E)
665  Profiler->VisitStmt(E);
666  }
667  if (C->getModifier() == clang::OMPC_REDUCTION_inscan) {
668  for (auto *E : C->copy_ops()) {
669  if (E)
670  Profiler->VisitStmt(E);
671  }
672  for (auto *E : C->copy_array_temps()) {
673  if (E)
674  Profiler->VisitStmt(E);
675  }
676  for (auto *E : C->copy_array_elems()) {
677  if (E)
678  Profiler->VisitStmt(E);
679  }
680  }
681 }
682 void OMPClauseProfiler::VisitOMPTaskReductionClause(
683  const OMPTaskReductionClause *C) {
684  Profiler->VisitNestedNameSpecifier(
685  C->getQualifierLoc().getNestedNameSpecifier());
686  Profiler->VisitName(C->getNameInfo().getName());
687  VisitOMPClauseList(C);
688  VistOMPClauseWithPostUpdate(C);
689  for (auto *E : C->privates()) {
690  if (E)
691  Profiler->VisitStmt(E);
692  }
693  for (auto *E : C->lhs_exprs()) {
694  if (E)
695  Profiler->VisitStmt(E);
696  }
697  for (auto *E : C->rhs_exprs()) {
698  if (E)
699  Profiler->VisitStmt(E);
700  }
701  for (auto *E : C->reduction_ops()) {
702  if (E)
703  Profiler->VisitStmt(E);
704  }
705 }
706 void OMPClauseProfiler::VisitOMPInReductionClause(
707  const OMPInReductionClause *C) {
708  Profiler->VisitNestedNameSpecifier(
709  C->getQualifierLoc().getNestedNameSpecifier());
710  Profiler->VisitName(C->getNameInfo().getName());
711  VisitOMPClauseList(C);
712  VistOMPClauseWithPostUpdate(C);
713  for (auto *E : C->privates()) {
714  if (E)
715  Profiler->VisitStmt(E);
716  }
717  for (auto *E : C->lhs_exprs()) {
718  if (E)
719  Profiler->VisitStmt(E);
720  }
721  for (auto *E : C->rhs_exprs()) {
722  if (E)
723  Profiler->VisitStmt(E);
724  }
725  for (auto *E : C->reduction_ops()) {
726  if (E)
727  Profiler->VisitStmt(E);
728  }
729  for (auto *E : C->taskgroup_descriptors()) {
730  if (E)
731  Profiler->VisitStmt(E);
732  }
733 }
734 void OMPClauseProfiler::VisitOMPLinearClause(const OMPLinearClause *C) {
735  VisitOMPClauseList(C);
736  VistOMPClauseWithPostUpdate(C);
737  for (auto *E : C->privates()) {
738  if (E)
739  Profiler->VisitStmt(E);
740  }
741  for (auto *E : C->inits()) {
742  if (E)
743  Profiler->VisitStmt(E);
744  }
745  for (auto *E : C->updates()) {
746  if (E)
747  Profiler->VisitStmt(E);
748  }
749  for (auto *E : C->finals()) {
750  if (E)
751  Profiler->VisitStmt(E);
752  }
753  if (C->getStep())
754  Profiler->VisitStmt(C->getStep());
755  if (C->getCalcStep())
756  Profiler->VisitStmt(C->getCalcStep());
757 }
758 void OMPClauseProfiler::VisitOMPAlignedClause(const OMPAlignedClause *C) {
759  VisitOMPClauseList(C);
760  if (C->getAlignment())
761  Profiler->VisitStmt(C->getAlignment());
762 }
763 void OMPClauseProfiler::VisitOMPCopyinClause(const OMPCopyinClause *C) {
764  VisitOMPClauseList(C);
765  for (auto *E : C->source_exprs()) {
766  if (E)
767  Profiler->VisitStmt(E);
768  }
769  for (auto *E : C->destination_exprs()) {
770  if (E)
771  Profiler->VisitStmt(E);
772  }
773  for (auto *E : C->assignment_ops()) {
774  if (E)
775  Profiler->VisitStmt(E);
776  }
777 }
778 void
779 OMPClauseProfiler::VisitOMPCopyprivateClause(const OMPCopyprivateClause *C) {
780  VisitOMPClauseList(C);
781  for (auto *E : C->source_exprs()) {
782  if (E)
783  Profiler->VisitStmt(E);
784  }
785  for (auto *E : C->destination_exprs()) {
786  if (E)
787  Profiler->VisitStmt(E);
788  }
789  for (auto *E : C->assignment_ops()) {
790  if (E)
791  Profiler->VisitStmt(E);
792  }
793 }
794 void OMPClauseProfiler::VisitOMPFlushClause(const OMPFlushClause *C) {
795  VisitOMPClauseList(C);
796 }
797 void OMPClauseProfiler::VisitOMPDepobjClause(const OMPDepobjClause *C) {
798  if (const Expr *Depobj = C->getDepobj())
799  Profiler->VisitStmt(Depobj);
800 }
801 void OMPClauseProfiler::VisitOMPDependClause(const OMPDependClause *C) {
802  VisitOMPClauseList(C);
803 }
804 void OMPClauseProfiler::VisitOMPDeviceClause(const OMPDeviceClause *C) {
805  if (C->getDevice())
806  Profiler->VisitStmt(C->getDevice());
807 }
808 void OMPClauseProfiler::VisitOMPMapClause(const OMPMapClause *C) {
809  VisitOMPClauseList(C);
810 }
811 void OMPClauseProfiler::VisitOMPAllocateClause(const OMPAllocateClause *C) {
812  if (Expr *Allocator = C->getAllocator())
813  Profiler->VisitStmt(Allocator);
814  VisitOMPClauseList(C);
815 }
816 void OMPClauseProfiler::VisitOMPNumTeamsClause(const OMPNumTeamsClause *C) {
817  VistOMPClauseWithPreInit(C);
818  if (C->getNumTeams())
819  Profiler->VisitStmt(C->getNumTeams());
820 }
821 void OMPClauseProfiler::VisitOMPThreadLimitClause(
822  const OMPThreadLimitClause *C) {
823  VistOMPClauseWithPreInit(C);
824  if (C->getThreadLimit())
825  Profiler->VisitStmt(C->getThreadLimit());
826 }
827 void OMPClauseProfiler::VisitOMPPriorityClause(const OMPPriorityClause *C) {
828  VistOMPClauseWithPreInit(C);
829  if (C->getPriority())
830  Profiler->VisitStmt(C->getPriority());
831 }
832 void OMPClauseProfiler::VisitOMPGrainsizeClause(const OMPGrainsizeClause *C) {
833  VistOMPClauseWithPreInit(C);
834  if (C->getGrainsize())
835  Profiler->VisitStmt(C->getGrainsize());
836 }
837 void OMPClauseProfiler::VisitOMPNumTasksClause(const OMPNumTasksClause *C) {
838  VistOMPClauseWithPreInit(C);
839  if (C->getNumTasks())
840  Profiler->VisitStmt(C->getNumTasks());
841 }
842 void OMPClauseProfiler::VisitOMPHintClause(const OMPHintClause *C) {
843  if (C->getHint())
844  Profiler->VisitStmt(C->getHint());
845 }
846 void OMPClauseProfiler::VisitOMPToClause(const OMPToClause *C) {
847  VisitOMPClauseList(C);
848 }
849 void OMPClauseProfiler::VisitOMPFromClause(const OMPFromClause *C) {
850  VisitOMPClauseList(C);
851 }
852 void OMPClauseProfiler::VisitOMPUseDevicePtrClause(
853  const OMPUseDevicePtrClause *C) {
854  VisitOMPClauseList(C);
855 }
856 void OMPClauseProfiler::VisitOMPUseDeviceAddrClause(
857  const OMPUseDeviceAddrClause *C) {
858  VisitOMPClauseList(C);
859 }
860 void OMPClauseProfiler::VisitOMPIsDevicePtrClause(
861  const OMPIsDevicePtrClause *C) {
862  VisitOMPClauseList(C);
863 }
864 void OMPClauseProfiler::VisitOMPHasDeviceAddrClause(
865  const OMPHasDeviceAddrClause *C) {
866  VisitOMPClauseList(C);
867 }
868 void OMPClauseProfiler::VisitOMPNontemporalClause(
869  const OMPNontemporalClause *C) {
870  VisitOMPClauseList(C);
871  for (auto *E : C->private_refs())
872  Profiler->VisitStmt(E);
873 }
874 void OMPClauseProfiler::VisitOMPInclusiveClause(const OMPInclusiveClause *C) {
875  VisitOMPClauseList(C);
876 }
877 void OMPClauseProfiler::VisitOMPExclusiveClause(const OMPExclusiveClause *C) {
878  VisitOMPClauseList(C);
879 }
880 void OMPClauseProfiler::VisitOMPUsesAllocatorsClause(
881  const OMPUsesAllocatorsClause *C) {
882  for (unsigned I = 0, E = C->getNumberOfAllocators(); I < E; ++I) {
883  OMPUsesAllocatorsClause::Data D = C->getAllocatorData(I);
884  Profiler->VisitStmt(D.Allocator);
885  if (D.AllocatorTraits)
886  Profiler->VisitStmt(D.AllocatorTraits);
887  }
888 }
889 void OMPClauseProfiler::VisitOMPAffinityClause(const OMPAffinityClause *C) {
890  if (const Expr *Modifier = C->getModifier())
891  Profiler->VisitStmt(Modifier);
892  for (const Expr *E : C->varlists())
893  Profiler->VisitStmt(E);
894 }
895 void OMPClauseProfiler::VisitOMPOrderClause(const OMPOrderClause *C) {}
896 void OMPClauseProfiler::VisitOMPBindClause(const OMPBindClause *C) {}
897 } // namespace
898 
899 void
900 StmtProfiler::VisitOMPExecutableDirective(const OMPExecutableDirective *S) {
901  VisitStmt(S);
902  OMPClauseProfiler P(this);
903  ArrayRef<OMPClause *> Clauses = S->clauses();
904  for (ArrayRef<OMPClause *>::iterator I = Clauses.begin(), E = Clauses.end();
905  I != E; ++I)
906  if (*I)
907  P.Visit(*I);
908 }
909 
910 void StmtProfiler::VisitOMPCanonicalLoop(const OMPCanonicalLoop *L) {
911  VisitStmt(L);
912 }
913 
914 void StmtProfiler::VisitOMPLoopBasedDirective(const OMPLoopBasedDirective *S) {
915  VisitOMPExecutableDirective(S);
916 }
917 
918 void StmtProfiler::VisitOMPLoopDirective(const OMPLoopDirective *S) {
919  VisitOMPLoopBasedDirective(S);
920 }
921 
922 void StmtProfiler::VisitOMPMetaDirective(const OMPMetaDirective *S) {
923  VisitOMPExecutableDirective(S);
924 }
925 
926 void StmtProfiler::VisitOMPParallelDirective(const OMPParallelDirective *S) {
927  VisitOMPExecutableDirective(S);
928 }
929 
930 void StmtProfiler::VisitOMPSimdDirective(const OMPSimdDirective *S) {
931  VisitOMPLoopDirective(S);
932 }
933 
934 void StmtProfiler::VisitOMPLoopTransformationDirective(
936  VisitOMPLoopBasedDirective(S);
937 }
938 
939 void StmtProfiler::VisitOMPTileDirective(const OMPTileDirective *S) {
940  VisitOMPLoopTransformationDirective(S);
941 }
942 
943 void StmtProfiler::VisitOMPUnrollDirective(const OMPUnrollDirective *S) {
944  VisitOMPLoopTransformationDirective(S);
945 }
946 
947 void StmtProfiler::VisitOMPForDirective(const OMPForDirective *S) {
948  VisitOMPLoopDirective(S);
949 }
950 
951 void StmtProfiler::VisitOMPForSimdDirective(const OMPForSimdDirective *S) {
952  VisitOMPLoopDirective(S);
953 }
954 
955 void StmtProfiler::VisitOMPSectionsDirective(const OMPSectionsDirective *S) {
956  VisitOMPExecutableDirective(S);
957 }
958 
959 void StmtProfiler::VisitOMPSectionDirective(const OMPSectionDirective *S) {
960  VisitOMPExecutableDirective(S);
961 }
962 
963 void StmtProfiler::VisitOMPSingleDirective(const OMPSingleDirective *S) {
964  VisitOMPExecutableDirective(S);
965 }
966 
967 void StmtProfiler::VisitOMPMasterDirective(const OMPMasterDirective *S) {
968  VisitOMPExecutableDirective(S);
969 }
970 
971 void StmtProfiler::VisitOMPCriticalDirective(const OMPCriticalDirective *S) {
972  VisitOMPExecutableDirective(S);
973  VisitName(S->getDirectiveName().getName());
974 }
975 
976 void
977 StmtProfiler::VisitOMPParallelForDirective(const OMPParallelForDirective *S) {
978  VisitOMPLoopDirective(S);
979 }
980 
981 void StmtProfiler::VisitOMPParallelForSimdDirective(
982  const OMPParallelForSimdDirective *S) {
983  VisitOMPLoopDirective(S);
984 }
985 
986 void StmtProfiler::VisitOMPParallelMasterDirective(
987  const OMPParallelMasterDirective *S) {
988  VisitOMPExecutableDirective(S);
989 }
990 
991 void StmtProfiler::VisitOMPParallelSectionsDirective(
992  const OMPParallelSectionsDirective *S) {
993  VisitOMPExecutableDirective(S);
994 }
995 
996 void StmtProfiler::VisitOMPTaskDirective(const OMPTaskDirective *S) {
997  VisitOMPExecutableDirective(S);
998 }
999 
1000 void StmtProfiler::VisitOMPTaskyieldDirective(const OMPTaskyieldDirective *S) {
1001  VisitOMPExecutableDirective(S);
1002 }
1003 
1004 void StmtProfiler::VisitOMPBarrierDirective(const OMPBarrierDirective *S) {
1005  VisitOMPExecutableDirective(S);
1006 }
1007 
1008 void StmtProfiler::VisitOMPTaskwaitDirective(const OMPTaskwaitDirective *S) {
1009  VisitOMPExecutableDirective(S);
1010 }
1011 
1012 void StmtProfiler::VisitOMPTaskgroupDirective(const OMPTaskgroupDirective *S) {
1013  VisitOMPExecutableDirective(S);
1014  if (const Expr *E = S->getReductionRef())
1015  VisitStmt(E);
1016 }
1017 
1018 void StmtProfiler::VisitOMPFlushDirective(const OMPFlushDirective *S) {
1019  VisitOMPExecutableDirective(S);
1020 }
1021 
1022 void StmtProfiler::VisitOMPDepobjDirective(const OMPDepobjDirective *S) {
1023  VisitOMPExecutableDirective(S);
1024 }
1025 
1026 void StmtProfiler::VisitOMPScanDirective(const OMPScanDirective *S) {
1027  VisitOMPExecutableDirective(S);
1028 }
1029 
1030 void StmtProfiler::VisitOMPOrderedDirective(const OMPOrderedDirective *S) {
1031  VisitOMPExecutableDirective(S);
1032 }
1033 
1034 void StmtProfiler::VisitOMPAtomicDirective(const OMPAtomicDirective *S) {
1035  VisitOMPExecutableDirective(S);
1036 }
1037 
1038 void StmtProfiler::VisitOMPTargetDirective(const OMPTargetDirective *S) {
1039  VisitOMPExecutableDirective(S);
1040 }
1041 
1042 void StmtProfiler::VisitOMPTargetDataDirective(const OMPTargetDataDirective *S) {
1043  VisitOMPExecutableDirective(S);
1044 }
1045 
1046 void StmtProfiler::VisitOMPTargetEnterDataDirective(
1047  const OMPTargetEnterDataDirective *S) {
1048  VisitOMPExecutableDirective(S);
1049 }
1050 
1051 void StmtProfiler::VisitOMPTargetExitDataDirective(
1052  const OMPTargetExitDataDirective *S) {
1053  VisitOMPExecutableDirective(S);
1054 }
1055 
1056 void StmtProfiler::VisitOMPTargetParallelDirective(
1057  const OMPTargetParallelDirective *S) {
1058  VisitOMPExecutableDirective(S);
1059 }
1060 
1061 void StmtProfiler::VisitOMPTargetParallelForDirective(
1062  const OMPTargetParallelForDirective *S) {
1063  VisitOMPExecutableDirective(S);
1064 }
1065 
1066 void StmtProfiler::VisitOMPTeamsDirective(const OMPTeamsDirective *S) {
1067  VisitOMPExecutableDirective(S);
1068 }
1069 
1070 void StmtProfiler::VisitOMPCancellationPointDirective(
1071  const OMPCancellationPointDirective *S) {
1072  VisitOMPExecutableDirective(S);
1073 }
1074 
1075 void StmtProfiler::VisitOMPCancelDirective(const OMPCancelDirective *S) {
1076  VisitOMPExecutableDirective(S);
1077 }
1078 
1079 void StmtProfiler::VisitOMPTaskLoopDirective(const OMPTaskLoopDirective *S) {
1080  VisitOMPLoopDirective(S);
1081 }
1082 
1083 void StmtProfiler::VisitOMPTaskLoopSimdDirective(
1084  const OMPTaskLoopSimdDirective *S) {
1085  VisitOMPLoopDirective(S);
1086 }
1087 
1088 void StmtProfiler::VisitOMPMasterTaskLoopDirective(
1089  const OMPMasterTaskLoopDirective *S) {
1090  VisitOMPLoopDirective(S);
1091 }
1092 
1093 void StmtProfiler::VisitOMPMasterTaskLoopSimdDirective(
1094  const OMPMasterTaskLoopSimdDirective *S) {
1095  VisitOMPLoopDirective(S);
1096 }
1097 
1098 void StmtProfiler::VisitOMPParallelMasterTaskLoopDirective(
1100  VisitOMPLoopDirective(S);
1101 }
1102 
1103 void StmtProfiler::VisitOMPParallelMasterTaskLoopSimdDirective(
1105  VisitOMPLoopDirective(S);
1106 }
1107 
1108 void StmtProfiler::VisitOMPDistributeDirective(
1109  const OMPDistributeDirective *S) {
1110  VisitOMPLoopDirective(S);
1111 }
1112 
1113 void OMPClauseProfiler::VisitOMPDistScheduleClause(
1114  const OMPDistScheduleClause *C) {
1115  VistOMPClauseWithPreInit(C);
1116  if (auto *S = C->getChunkSize())
1117  Profiler->VisitStmt(S);
1118 }
1119 
1120 void OMPClauseProfiler::VisitOMPDefaultmapClause(const OMPDefaultmapClause *) {}
1121 
1122 void StmtProfiler::VisitOMPTargetUpdateDirective(
1123  const OMPTargetUpdateDirective *S) {
1124  VisitOMPExecutableDirective(S);
1125 }
1126 
1127 void StmtProfiler::VisitOMPDistributeParallelForDirective(
1129  VisitOMPLoopDirective(S);
1130 }
1131 
1132 void StmtProfiler::VisitOMPDistributeParallelForSimdDirective(
1134  VisitOMPLoopDirective(S);
1135 }
1136 
1137 void StmtProfiler::VisitOMPDistributeSimdDirective(
1138  const OMPDistributeSimdDirective *S) {
1139  VisitOMPLoopDirective(S);
1140 }
1141 
1142 void StmtProfiler::VisitOMPTargetParallelForSimdDirective(
1144  VisitOMPLoopDirective(S);
1145 }
1146 
1147 void StmtProfiler::VisitOMPTargetSimdDirective(
1148  const OMPTargetSimdDirective *S) {
1149  VisitOMPLoopDirective(S);
1150 }
1151 
1152 void StmtProfiler::VisitOMPTeamsDistributeDirective(
1153  const OMPTeamsDistributeDirective *S) {
1154  VisitOMPLoopDirective(S);
1155 }
1156 
1157 void StmtProfiler::VisitOMPTeamsDistributeSimdDirective(
1159  VisitOMPLoopDirective(S);
1160 }
1161 
1162 void StmtProfiler::VisitOMPTeamsDistributeParallelForSimdDirective(
1164  VisitOMPLoopDirective(S);
1165 }
1166 
1167 void StmtProfiler::VisitOMPTeamsDistributeParallelForDirective(
1169  VisitOMPLoopDirective(S);
1170 }
1171 
1172 void StmtProfiler::VisitOMPTargetTeamsDirective(
1173  const OMPTargetTeamsDirective *S) {
1174  VisitOMPExecutableDirective(S);
1175 }
1176 
1177 void StmtProfiler::VisitOMPTargetTeamsDistributeDirective(
1179  VisitOMPLoopDirective(S);
1180 }
1181 
1182 void StmtProfiler::VisitOMPTargetTeamsDistributeParallelForDirective(
1184  VisitOMPLoopDirective(S);
1185 }
1186 
1187 void StmtProfiler::VisitOMPTargetTeamsDistributeParallelForSimdDirective(
1189  VisitOMPLoopDirective(S);
1190 }
1191 
1192 void StmtProfiler::VisitOMPTargetTeamsDistributeSimdDirective(
1194  VisitOMPLoopDirective(S);
1195 }
1196 
1197 void StmtProfiler::VisitOMPInteropDirective(const OMPInteropDirective *S) {
1198  VisitOMPExecutableDirective(S);
1199 }
1200 
1201 void StmtProfiler::VisitOMPDispatchDirective(const OMPDispatchDirective *S) {
1202  VisitOMPExecutableDirective(S);
1203 }
1204 
1205 void StmtProfiler::VisitOMPMaskedDirective(const OMPMaskedDirective *S) {
1206  VisitOMPExecutableDirective(S);
1207 }
1208 
1209 void StmtProfiler::VisitOMPGenericLoopDirective(
1210  const OMPGenericLoopDirective *S) {
1211  VisitOMPLoopDirective(S);
1212 }
1213 
1214 void StmtProfiler::VisitOMPTeamsGenericLoopDirective(
1215  const OMPTeamsGenericLoopDirective *S) {
1216  VisitOMPLoopDirective(S);
1217 }
1218 
1219 void StmtProfiler::VisitOMPTargetTeamsGenericLoopDirective(
1221  VisitOMPLoopDirective(S);
1222 }
1223 
1224 void StmtProfiler::VisitOMPParallelGenericLoopDirective(
1226  VisitOMPLoopDirective(S);
1227 }
1228 
1229 void StmtProfiler::VisitOMPTargetParallelGenericLoopDirective(
1231  VisitOMPLoopDirective(S);
1232 }
1233 
1234 void StmtProfiler::VisitExpr(const Expr *S) {
1235  VisitStmt(S);
1236 }
1237 
1238 void StmtProfiler::VisitConstantExpr(const ConstantExpr *S) {
1239  VisitExpr(S);
1240 }
1241 
1242 void StmtProfiler::VisitDeclRefExpr(const DeclRefExpr *S) {
1243  VisitExpr(S);
1244  if (!Canonical)
1245  VisitNestedNameSpecifier(S->getQualifier());
1246  VisitDecl(S->getDecl());
1247  if (!Canonical) {
1248  ID.AddBoolean(S->hasExplicitTemplateArgs());
1249  if (S->hasExplicitTemplateArgs())
1250  VisitTemplateArguments(S->getTemplateArgs(), S->getNumTemplateArgs());
1251  }
1252 }
1253 
1254 void StmtProfiler::VisitSYCLUniqueStableNameExpr(
1255  const SYCLUniqueStableNameExpr *S) {
1256  VisitExpr(S);
1257  VisitType(S->getTypeSourceInfo()->getType());
1258 }
1259 
1260 void StmtProfiler::VisitPredefinedExpr(const PredefinedExpr *S) {
1261  VisitExpr(S);
1262  ID.AddInteger(S->getIdentKind());
1263 }
1264 
1265 void StmtProfiler::VisitIntegerLiteral(const IntegerLiteral *S) {
1266  VisitExpr(S);
1267  S->getValue().Profile(ID);
1268  ID.AddInteger(S->getType()->castAs<BuiltinType>()->getKind());
1269 }
1270 
1271 void StmtProfiler::VisitFixedPointLiteral(const FixedPointLiteral *S) {
1272  VisitExpr(S);
1273  S->getValue().Profile(ID);
1274  ID.AddInteger(S->getType()->castAs<BuiltinType>()->getKind());
1275 }
1276 
1277 void StmtProfiler::VisitCharacterLiteral(const CharacterLiteral *S) {
1278  VisitExpr(S);
1279  ID.AddInteger(S->getKind());
1280  ID.AddInteger(S->getValue());
1281 }
1282 
1283 void StmtProfiler::VisitFloatingLiteral(const FloatingLiteral *S) {
1284  VisitExpr(S);
1285  S->getValue().Profile(ID);
1286  ID.AddBoolean(S->isExact());
1287  ID.AddInteger(S->getType()->castAs<BuiltinType>()->getKind());
1288 }
1289 
1290 void StmtProfiler::VisitImaginaryLiteral(const ImaginaryLiteral *S) {
1291  VisitExpr(S);
1292 }
1293 
1294 void StmtProfiler::VisitStringLiteral(const StringLiteral *S) {
1295  VisitExpr(S);
1296  ID.AddString(S->getBytes());
1297  ID.AddInteger(S->getKind());
1298 }
1299 
1300 void StmtProfiler::VisitParenExpr(const ParenExpr *S) {
1301  VisitExpr(S);
1302 }
1303 
1304 void StmtProfiler::VisitParenListExpr(const ParenListExpr *S) {
1305  VisitExpr(S);
1306 }
1307 
1308 void StmtProfiler::VisitUnaryOperator(const UnaryOperator *S) {
1309  VisitExpr(S);
1310  ID.AddInteger(S->getOpcode());
1311 }
1312 
1313 void StmtProfiler::VisitOffsetOfExpr(const OffsetOfExpr *S) {
1314  VisitType(S->getTypeSourceInfo()->getType());
1315  unsigned n = S->getNumComponents();
1316  for (unsigned i = 0; i < n; ++i) {
1317  const OffsetOfNode &ON = S->getComponent(i);
1318  ID.AddInteger(ON.getKind());
1319  switch (ON.getKind()) {
1320  case OffsetOfNode::Array:
1321  // Expressions handled below.
1322  break;
1323 
1324  case OffsetOfNode::Field:
1325  VisitDecl(ON.getField());
1326  break;
1327 
1329  VisitIdentifierInfo(ON.getFieldName());
1330  break;
1331 
1332  case OffsetOfNode::Base:
1333  // These nodes are implicit, and therefore don't need profiling.
1334  break;
1335  }
1336  }
1337 
1338  VisitExpr(S);
1339 }
1340 
1341 void
1342 StmtProfiler::VisitUnaryExprOrTypeTraitExpr(const UnaryExprOrTypeTraitExpr *S) {
1343  VisitExpr(S);
1344  ID.AddInteger(S->getKind());
1345  if (S->isArgumentType())
1346  VisitType(S->getArgumentType());
1347 }
1348 
1349 void StmtProfiler::VisitArraySubscriptExpr(const ArraySubscriptExpr *S) {
1350  VisitExpr(S);
1351 }
1352 
1353 void StmtProfiler::VisitMatrixSubscriptExpr(const MatrixSubscriptExpr *S) {
1354  VisitExpr(S);
1355 }
1356 
1357 void StmtProfiler::VisitOMPArraySectionExpr(const OMPArraySectionExpr *S) {
1358  VisitExpr(S);
1359 }
1360 
1361 void StmtProfiler::VisitOMPArrayShapingExpr(const OMPArrayShapingExpr *S) {
1362  VisitExpr(S);
1363 }
1364 
1365 void StmtProfiler::VisitOMPIteratorExpr(const OMPIteratorExpr *S) {
1366  VisitExpr(S);
1367  for (unsigned I = 0, E = S->numOfIterators(); I < E; ++I)
1368  VisitDecl(S->getIteratorDecl(I));
1369 }
1370 
1371 void StmtProfiler::VisitCallExpr(const CallExpr *S) {
1372  VisitExpr(S);
1373 }
1374 
1375 void StmtProfiler::VisitMemberExpr(const MemberExpr *S) {
1376  VisitExpr(S);
1377  VisitDecl(S->getMemberDecl());
1378  if (!Canonical)
1379  VisitNestedNameSpecifier(S->getQualifier());
1380  ID.AddBoolean(S->isArrow());
1381 }
1382 
1383 void StmtProfiler::VisitCompoundLiteralExpr(const CompoundLiteralExpr *S) {
1384  VisitExpr(S);
1385  ID.AddBoolean(S->isFileScope());
1386 }
1387 
1388 void StmtProfiler::VisitCastExpr(const CastExpr *S) {
1389  VisitExpr(S);
1390 }
1391 
1392 void StmtProfiler::VisitImplicitCastExpr(const ImplicitCastExpr *S) {
1393  VisitCastExpr(S);
1394  ID.AddInteger(S->getValueKind());
1395 }
1396 
1397 void StmtProfiler::VisitExplicitCastExpr(const ExplicitCastExpr *S) {
1398  VisitCastExpr(S);
1399  VisitType(S->getTypeAsWritten());
1400 }
1401 
1402 void StmtProfiler::VisitCStyleCastExpr(const CStyleCastExpr *S) {
1403  VisitExplicitCastExpr(S);
1404 }
1405 
1406 void StmtProfiler::VisitBinaryOperator(const BinaryOperator *S) {
1407  VisitExpr(S);
1408  ID.AddInteger(S->getOpcode());
1409 }
1410 
1411 void
1412 StmtProfiler::VisitCompoundAssignOperator(const CompoundAssignOperator *S) {
1413  VisitBinaryOperator(S);
1414 }
1415 
1416 void StmtProfiler::VisitConditionalOperator(const ConditionalOperator *S) {
1417  VisitExpr(S);
1418 }
1419 
1420 void StmtProfiler::VisitBinaryConditionalOperator(
1421  const BinaryConditionalOperator *S) {
1422  VisitExpr(S);
1423 }
1424 
1425 void StmtProfiler::VisitAddrLabelExpr(const AddrLabelExpr *S) {
1426  VisitExpr(S);
1427  VisitDecl(S->getLabel());
1428 }
1429 
1430 void StmtProfiler::VisitStmtExpr(const StmtExpr *S) {
1431  VisitExpr(S);
1432 }
1433 
1434 void StmtProfiler::VisitShuffleVectorExpr(const ShuffleVectorExpr *S) {
1435  VisitExpr(S);
1436 }
1437 
1438 void StmtProfiler::VisitConvertVectorExpr(const ConvertVectorExpr *S) {
1439  VisitExpr(S);
1440 }
1441 
1442 void StmtProfiler::VisitChooseExpr(const ChooseExpr *S) {
1443  VisitExpr(S);
1444 }
1445 
1446 void StmtProfiler::VisitGNUNullExpr(const GNUNullExpr *S) {
1447  VisitExpr(S);
1448 }
1449 
1450 void StmtProfiler::VisitVAArgExpr(const VAArgExpr *S) {
1451  VisitExpr(S);
1452 }
1453 
1454 void StmtProfiler::VisitInitListExpr(const InitListExpr *S) {
1455  if (S->getSyntacticForm()) {
1456  VisitInitListExpr(S->getSyntacticForm());
1457  return;
1458  }
1459 
1460  VisitExpr(S);
1461 }
1462 
1463 void StmtProfiler::VisitDesignatedInitExpr(const DesignatedInitExpr *S) {
1464  VisitExpr(S);
1465  ID.AddBoolean(S->usesGNUSyntax());
1466  for (const DesignatedInitExpr::Designator &D : S->designators()) {
1467  if (D.isFieldDesignator()) {
1468  ID.AddInteger(0);
1469  VisitName(D.getFieldName());
1470  continue;
1471  }
1472 
1473  if (D.isArrayDesignator()) {
1474  ID.AddInteger(1);
1475  } else {
1476  assert(D.isArrayRangeDesignator());
1477  ID.AddInteger(2);
1478  }
1479  ID.AddInteger(D.getFirstExprIndex());
1480  }
1481 }
1482 
1483 // Seems that if VisitInitListExpr() only works on the syntactic form of an
1484 // InitListExpr, then a DesignatedInitUpdateExpr is not encountered.
1485 void StmtProfiler::VisitDesignatedInitUpdateExpr(
1486  const DesignatedInitUpdateExpr *S) {
1487  llvm_unreachable("Unexpected DesignatedInitUpdateExpr in syntactic form of "
1488  "initializer");
1489 }
1490 
1491 void StmtProfiler::VisitArrayInitLoopExpr(const ArrayInitLoopExpr *S) {
1492  VisitExpr(S);
1493 }
1494 
1495 void StmtProfiler::VisitArrayInitIndexExpr(const ArrayInitIndexExpr *S) {
1496  VisitExpr(S);
1497 }
1498 
1499 void StmtProfiler::VisitNoInitExpr(const NoInitExpr *S) {
1500  llvm_unreachable("Unexpected NoInitExpr in syntactic form of initializer");
1501 }
1502 
1503 void StmtProfiler::VisitImplicitValueInitExpr(const ImplicitValueInitExpr *S) {
1504  VisitExpr(S);
1505 }
1506 
1507 void StmtProfiler::VisitExtVectorElementExpr(const ExtVectorElementExpr *S) {
1508  VisitExpr(S);
1509  VisitName(&S->getAccessor());
1510 }
1511 
1512 void StmtProfiler::VisitBlockExpr(const BlockExpr *S) {
1513  VisitExpr(S);
1514  VisitDecl(S->getBlockDecl());
1515 }
1516 
1517 void StmtProfiler::VisitGenericSelectionExpr(const GenericSelectionExpr *S) {
1518  VisitExpr(S);
1519  for (const GenericSelectionExpr::ConstAssociation Assoc :
1520  S->associations()) {
1521  QualType T = Assoc.getType();
1522  if (T.isNull())
1523  ID.AddPointer(nullptr);
1524  else
1525  VisitType(T);
1526  VisitExpr(Assoc.getAssociationExpr());
1527  }
1528 }
1529 
1530 void StmtProfiler::VisitPseudoObjectExpr(const PseudoObjectExpr *S) {
1531  VisitExpr(S);
1533  i = S->semantics_begin(), e = S->semantics_end(); i != e; ++i)
1534  // Normally, we would not profile the source expressions of OVEs.
1535  if (const OpaqueValueExpr *OVE = dyn_cast<OpaqueValueExpr>(*i))
1536  Visit(OVE->getSourceExpr());
1537 }
1538 
1539 void StmtProfiler::VisitAtomicExpr(const AtomicExpr *S) {
1540  VisitExpr(S);
1541  ID.AddInteger(S->getOp());
1542 }
1543 
1544 void StmtProfiler::VisitConceptSpecializationExpr(
1545  const ConceptSpecializationExpr *S) {
1546  VisitExpr(S);
1547  VisitDecl(S->getNamedConcept());
1548  for (const TemplateArgument &Arg : S->getTemplateArguments())
1549  VisitTemplateArgument(Arg);
1550 }
1551 
1552 void StmtProfiler::VisitRequiresExpr(const RequiresExpr *S) {
1553  VisitExpr(S);
1554  ID.AddInteger(S->getLocalParameters().size());
1555  for (ParmVarDecl *LocalParam : S->getLocalParameters())
1556  VisitDecl(LocalParam);
1557  ID.AddInteger(S->getRequirements().size());
1558  for (concepts::Requirement *Req : S->getRequirements()) {
1559  if (auto *TypeReq = dyn_cast<concepts::TypeRequirement>(Req)) {
1560  ID.AddInteger(concepts::Requirement::RK_Type);
1561  ID.AddBoolean(TypeReq->isSubstitutionFailure());
1562  if (!TypeReq->isSubstitutionFailure())
1563  VisitType(TypeReq->getType()->getType());
1564  } else if (auto *ExprReq = dyn_cast<concepts::ExprRequirement>(Req)) {
1566  ID.AddBoolean(ExprReq->isExprSubstitutionFailure());
1567  if (!ExprReq->isExprSubstitutionFailure())
1568  Visit(ExprReq->getExpr());
1569  // C++2a [expr.prim.req.compound]p1 Example:
1570  // [...] The compound-requirement in C1 requires that x++ is a valid
1571  // expression. It is equivalent to the simple-requirement x++; [...]
1572  // We therefore do not profile isSimple() here.
1573  ID.AddBoolean(ExprReq->getNoexceptLoc().isValid());
1575  ExprReq->getReturnTypeRequirement();
1576  if (RetReq.isEmpty()) {
1577  ID.AddInteger(0);
1578  } else if (RetReq.isTypeConstraint()) {
1579  ID.AddInteger(1);
1581  } else {
1582  assert(RetReq.isSubstitutionFailure());
1583  ID.AddInteger(2);
1584  }
1585  } else {
1587  auto *NestedReq = cast<concepts::NestedRequirement>(Req);
1588  ID.AddBoolean(NestedReq->isSubstitutionFailure());
1589  if (!NestedReq->isSubstitutionFailure())
1590  Visit(NestedReq->getConstraintExpr());
1591  }
1592  }
1593 }
1594 
1596  UnaryOperatorKind &UnaryOp,
1597  BinaryOperatorKind &BinaryOp) {
1598  switch (S->getOperator()) {
1599  case OO_None:
1600  case OO_New:
1601  case OO_Delete:
1602  case OO_Array_New:
1603  case OO_Array_Delete:
1604  case OO_Arrow:
1605  case OO_Conditional:
1607  llvm_unreachable("Invalid operator call kind");
1608 
1609  case OO_Plus:
1610  if (S->getNumArgs() == 1) {
1611  UnaryOp = UO_Plus;
1612  return Stmt::UnaryOperatorClass;
1613  }
1614 
1615  BinaryOp = BO_Add;
1616  return Stmt::BinaryOperatorClass;
1617 
1618  case OO_Minus:
1619  if (S->getNumArgs() == 1) {
1620  UnaryOp = UO_Minus;
1621  return Stmt::UnaryOperatorClass;
1622  }
1623 
1624  BinaryOp = BO_Sub;
1625  return Stmt::BinaryOperatorClass;
1626 
1627  case OO_Star:
1628  if (S->getNumArgs() == 1) {
1629  UnaryOp = UO_Deref;
1630  return Stmt::UnaryOperatorClass;
1631  }
1632 
1633  BinaryOp = BO_Mul;
1634  return Stmt::BinaryOperatorClass;
1635 
1636  case OO_Slash:
1637  BinaryOp = BO_Div;
1638  return Stmt::BinaryOperatorClass;
1639 
1640  case OO_Percent:
1641  BinaryOp = BO_Rem;
1642  return Stmt::BinaryOperatorClass;
1643 
1644  case OO_Caret:
1645  BinaryOp = BO_Xor;
1646  return Stmt::BinaryOperatorClass;
1647 
1648  case OO_Amp:
1649  if (S->getNumArgs() == 1) {
1650  UnaryOp = UO_AddrOf;
1651  return Stmt::UnaryOperatorClass;
1652  }
1653 
1654  BinaryOp = BO_And;
1655  return Stmt::BinaryOperatorClass;
1656 
1657  case OO_Pipe:
1658  BinaryOp = BO_Or;
1659  return Stmt::BinaryOperatorClass;
1660 
1661  case OO_Tilde:
1662  UnaryOp = UO_Not;
1663  return Stmt::UnaryOperatorClass;
1664 
1665  case OO_Exclaim:
1666  UnaryOp = UO_LNot;
1667  return Stmt::UnaryOperatorClass;
1668 
1669  case OO_Equal:
1670  BinaryOp = BO_Assign;
1671  return Stmt::BinaryOperatorClass;
1672 
1673  case OO_Less:
1674  BinaryOp = BO_LT;
1675  return Stmt::BinaryOperatorClass;
1676 
1677  case OO_Greater:
1678  BinaryOp = BO_GT;
1679  return Stmt::BinaryOperatorClass;
1680 
1681  case OO_PlusEqual:
1682  BinaryOp = BO_AddAssign;
1683  return Stmt::CompoundAssignOperatorClass;
1684 
1685  case OO_MinusEqual:
1686  BinaryOp = BO_SubAssign;
1687  return Stmt::CompoundAssignOperatorClass;
1688 
1689  case OO_StarEqual:
1690  BinaryOp = BO_MulAssign;
1691  return Stmt::CompoundAssignOperatorClass;
1692 
1693  case OO_SlashEqual:
1694  BinaryOp = BO_DivAssign;
1695  return Stmt::CompoundAssignOperatorClass;
1696 
1697  case OO_PercentEqual:
1698  BinaryOp = BO_RemAssign;
1699  return Stmt::CompoundAssignOperatorClass;
1700 
1701  case OO_CaretEqual:
1702  BinaryOp = BO_XorAssign;
1703  return Stmt::CompoundAssignOperatorClass;
1704 
1705  case OO_AmpEqual:
1706  BinaryOp = BO_AndAssign;
1707  return Stmt::CompoundAssignOperatorClass;
1708 
1709  case OO_PipeEqual:
1710  BinaryOp = BO_OrAssign;
1711  return Stmt::CompoundAssignOperatorClass;
1712 
1713  case OO_LessLess:
1714  BinaryOp = BO_Shl;
1715  return Stmt::BinaryOperatorClass;
1716 
1717  case OO_GreaterGreater:
1718  BinaryOp = BO_Shr;
1719  return Stmt::BinaryOperatorClass;
1720 
1721  case OO_LessLessEqual:
1722  BinaryOp = BO_ShlAssign;
1723  return Stmt::CompoundAssignOperatorClass;
1724 
1725  case OO_GreaterGreaterEqual:
1726  BinaryOp = BO_ShrAssign;
1727  return Stmt::CompoundAssignOperatorClass;
1728 
1729  case OO_EqualEqual:
1730  BinaryOp = BO_EQ;
1731  return Stmt::BinaryOperatorClass;
1732 
1733  case OO_ExclaimEqual:
1734  BinaryOp = BO_NE;
1735  return Stmt::BinaryOperatorClass;
1736 
1737  case OO_LessEqual:
1738  BinaryOp = BO_LE;
1739  return Stmt::BinaryOperatorClass;
1740 
1741  case OO_GreaterEqual:
1742  BinaryOp = BO_GE;
1743  return Stmt::BinaryOperatorClass;
1744 
1745  case OO_Spaceship:
1746  BinaryOp = BO_Cmp;
1747  return Stmt::BinaryOperatorClass;
1748 
1749  case OO_AmpAmp:
1750  BinaryOp = BO_LAnd;
1751  return Stmt::BinaryOperatorClass;
1752 
1753  case OO_PipePipe:
1754  BinaryOp = BO_LOr;
1755  return Stmt::BinaryOperatorClass;
1756 
1757  case OO_PlusPlus:
1758  UnaryOp = S->getNumArgs() == 1? UO_PreInc
1759  : UO_PostInc;
1760  return Stmt::UnaryOperatorClass;
1761 
1762  case OO_MinusMinus:
1763  UnaryOp = S->getNumArgs() == 1? UO_PreDec
1764  : UO_PostDec;
1765  return Stmt::UnaryOperatorClass;
1766 
1767  case OO_Comma:
1768  BinaryOp = BO_Comma;
1769  return Stmt::BinaryOperatorClass;
1770 
1771  case OO_ArrowStar:
1772  BinaryOp = BO_PtrMemI;
1773  return Stmt::BinaryOperatorClass;
1774 
1775  case OO_Subscript:
1776  return Stmt::ArraySubscriptExprClass;
1777 
1778  case OO_Call:
1779  return Stmt::CallExprClass;
1780 
1781  case OO_Coawait:
1782  UnaryOp = UO_Coawait;
1783  return Stmt::UnaryOperatorClass;
1784  }
1785 
1786  llvm_unreachable("Invalid overloaded operator expression");
1787 }
1788 
1789 #if defined(_MSC_VER) && !defined(__clang__)
1790 #if _MSC_VER == 1911
1791 // Work around https://developercommunity.visualstudio.com/content/problem/84002/clang-cl-when-built-with-vc-2017-crashes-cause-vc.html
1792 // MSVC 2017 update 3 miscompiles this function, and a clang built with it
1793 // will crash in stage 2 of a bootstrap build.
1794 #pragma optimize("", off)
1795 #endif
1796 #endif
1797 
1798 void StmtProfiler::VisitCXXOperatorCallExpr(const CXXOperatorCallExpr *S) {
1799  if (S->isTypeDependent()) {
1800  // Type-dependent operator calls are profiled like their underlying
1801  // syntactic operator.
1802  //
1803  // An operator call to operator-> is always implicit, so just skip it. The
1804  // enclosing MemberExpr will profile the actual member access.
1805  if (S->getOperator() == OO_Arrow)
1806  return Visit(S->getArg(0));
1807 
1808  UnaryOperatorKind UnaryOp = UO_Extension;
1809  BinaryOperatorKind BinaryOp = BO_Comma;
1810  Stmt::StmtClass SC = DecodeOperatorCall(S, UnaryOp, BinaryOp);
1811 
1812  ID.AddInteger(SC);
1813  for (unsigned I = 0, N = S->getNumArgs(); I != N; ++I)
1814  Visit(S->getArg(I));
1815  if (SC == Stmt::UnaryOperatorClass)
1816  ID.AddInteger(UnaryOp);
1817  else if (SC == Stmt::BinaryOperatorClass ||
1818  SC == Stmt::CompoundAssignOperatorClass)
1819  ID.AddInteger(BinaryOp);
1820  else
1821  assert(SC == Stmt::ArraySubscriptExprClass || SC == Stmt::CallExprClass);
1822 
1823  return;
1824  }
1825 
1826  VisitCallExpr(S);
1827  ID.AddInteger(S->getOperator());
1828 }
1829 
1830 void StmtProfiler::VisitCXXRewrittenBinaryOperator(
1831  const CXXRewrittenBinaryOperator *S) {
1832  // If a rewritten operator were ever to be type-dependent, we should profile
1833  // it following its syntactic operator.
1834  assert(!S->isTypeDependent() &&
1835  "resolved rewritten operator should never be type-dependent");
1836  ID.AddBoolean(S->isReversed());
1837  VisitExpr(S->getSemanticForm());
1838 }
1839 
1840 #if defined(_MSC_VER) && !defined(__clang__)
1841 #if _MSC_VER == 1911
1842 #pragma optimize("", on)
1843 #endif
1844 #endif
1845 
1846 void StmtProfiler::VisitCXXMemberCallExpr(const CXXMemberCallExpr *S) {
1847  VisitCallExpr(S);
1848 }
1849 
1850 void StmtProfiler::VisitCUDAKernelCallExpr(const CUDAKernelCallExpr *S) {
1851  VisitCallExpr(S);
1852 }
1853 
1854 void StmtProfiler::VisitAsTypeExpr(const AsTypeExpr *S) {
1855  VisitExpr(S);
1856 }
1857 
1858 void StmtProfiler::VisitCXXNamedCastExpr(const CXXNamedCastExpr *S) {
1859  VisitExplicitCastExpr(S);
1860 }
1861 
1862 void StmtProfiler::VisitCXXStaticCastExpr(const CXXStaticCastExpr *S) {
1863  VisitCXXNamedCastExpr(S);
1864 }
1865 
1866 void StmtProfiler::VisitCXXDynamicCastExpr(const CXXDynamicCastExpr *S) {
1867  VisitCXXNamedCastExpr(S);
1868 }
1869 
1870 void
1871 StmtProfiler::VisitCXXReinterpretCastExpr(const CXXReinterpretCastExpr *S) {
1872  VisitCXXNamedCastExpr(S);
1873 }
1874 
1875 void StmtProfiler::VisitCXXConstCastExpr(const CXXConstCastExpr *S) {
1876  VisitCXXNamedCastExpr(S);
1877 }
1878 
1879 void StmtProfiler::VisitBuiltinBitCastExpr(const BuiltinBitCastExpr *S) {
1880  VisitExpr(S);
1881  VisitType(S->getTypeInfoAsWritten()->getType());
1882 }
1883 
1884 void StmtProfiler::VisitCXXAddrspaceCastExpr(const CXXAddrspaceCastExpr *S) {
1885  VisitCXXNamedCastExpr(S);
1886 }
1887 
1888 void StmtProfiler::VisitUserDefinedLiteral(const UserDefinedLiteral *S) {
1889  VisitCallExpr(S);
1890 }
1891 
1892 void StmtProfiler::VisitCXXBoolLiteralExpr(const CXXBoolLiteralExpr *S) {
1893  VisitExpr(S);
1894  ID.AddBoolean(S->getValue());
1895 }
1896 
1897 void StmtProfiler::VisitCXXNullPtrLiteralExpr(const CXXNullPtrLiteralExpr *S) {
1898  VisitExpr(S);
1899 }
1900 
1901 void StmtProfiler::VisitCXXStdInitializerListExpr(
1902  const CXXStdInitializerListExpr *S) {
1903  VisitExpr(S);
1904 }
1905 
1906 void StmtProfiler::VisitCXXTypeidExpr(const CXXTypeidExpr *S) {
1907  VisitExpr(S);
1908  if (S->isTypeOperand())
1909  VisitType(S->getTypeOperandSourceInfo()->getType());
1910 }
1911 
1912 void StmtProfiler::VisitCXXUuidofExpr(const CXXUuidofExpr *S) {
1913  VisitExpr(S);
1914  if (S->isTypeOperand())
1915  VisitType(S->getTypeOperandSourceInfo()->getType());
1916 }
1917 
1918 void StmtProfiler::VisitMSPropertyRefExpr(const MSPropertyRefExpr *S) {
1919  VisitExpr(S);
1920  VisitDecl(S->getPropertyDecl());
1921 }
1922 
1923 void StmtProfiler::VisitMSPropertySubscriptExpr(
1924  const MSPropertySubscriptExpr *S) {
1925  VisitExpr(S);
1926 }
1927 
1928 void StmtProfiler::VisitCXXThisExpr(const CXXThisExpr *S) {
1929  VisitExpr(S);
1930  ID.AddBoolean(S->isImplicit());
1931 }
1932 
1933 void StmtProfiler::VisitCXXThrowExpr(const CXXThrowExpr *S) {
1934  VisitExpr(S);
1935 }
1936 
1937 void StmtProfiler::VisitCXXDefaultArgExpr(const CXXDefaultArgExpr *S) {
1938  VisitExpr(S);
1939  VisitDecl(S->getParam());
1940 }
1941 
1942 void StmtProfiler::VisitCXXDefaultInitExpr(const CXXDefaultInitExpr *S) {
1943  VisitExpr(S);
1944  VisitDecl(S->getField());
1945 }
1946 
1947 void StmtProfiler::VisitCXXBindTemporaryExpr(const CXXBindTemporaryExpr *S) {
1948  VisitExpr(S);
1949  VisitDecl(
1950  const_cast<CXXDestructorDecl *>(S->getTemporary()->getDestructor()));
1951 }
1952 
1953 void StmtProfiler::VisitCXXConstructExpr(const CXXConstructExpr *S) {
1954  VisitExpr(S);
1955  VisitDecl(S->getConstructor());
1956  ID.AddBoolean(S->isElidable());
1957 }
1958 
1959 void StmtProfiler::VisitCXXInheritedCtorInitExpr(
1960  const CXXInheritedCtorInitExpr *S) {
1961  VisitExpr(S);
1962  VisitDecl(S->getConstructor());
1963 }
1964 
1965 void StmtProfiler::VisitCXXFunctionalCastExpr(const CXXFunctionalCastExpr *S) {
1966  VisitExplicitCastExpr(S);
1967 }
1968 
1969 void
1970 StmtProfiler::VisitCXXTemporaryObjectExpr(const CXXTemporaryObjectExpr *S) {
1971  VisitCXXConstructExpr(S);
1972 }
1973 
1974 void
1975 StmtProfiler::VisitLambdaExpr(const LambdaExpr *S) {
1976  // Do not recursively visit the children of this expression. Profiling the
1977  // body would result in unnecessary work, and is not safe to do during
1978  // deserialization.
1979  VisitStmtNoChildren(S);
1980 
1981  // C++20 [temp.over.link]p5:
1982  // Two lambda-expressions are never considered equivalent.
1983  VisitDecl(S->getLambdaClass());
1984 }
1985 
1986 void
1987 StmtProfiler::VisitCXXScalarValueInitExpr(const CXXScalarValueInitExpr *S) {
1988  VisitExpr(S);
1989 }
1990 
1991 void StmtProfiler::VisitCXXDeleteExpr(const CXXDeleteExpr *S) {
1992  VisitExpr(S);
1993  ID.AddBoolean(S->isGlobalDelete());
1994  ID.AddBoolean(S->isArrayForm());
1995  VisitDecl(S->getOperatorDelete());
1996 }
1997 
1998 void StmtProfiler::VisitCXXNewExpr(const CXXNewExpr *S) {
1999  VisitExpr(S);
2000  VisitType(S->getAllocatedType());
2001  VisitDecl(S->getOperatorNew());
2002  VisitDecl(S->getOperatorDelete());
2003  ID.AddBoolean(S->isArray());
2004  ID.AddInteger(S->getNumPlacementArgs());
2005  ID.AddBoolean(S->isGlobalNew());
2006  ID.AddBoolean(S->isParenTypeId());
2007  ID.AddInteger(S->getInitializationStyle());
2008 }
2009 
2010 void
2011 StmtProfiler::VisitCXXPseudoDestructorExpr(const CXXPseudoDestructorExpr *S) {
2012  VisitExpr(S);
2013  ID.AddBoolean(S->isArrow());
2014  VisitNestedNameSpecifier(S->getQualifier());
2015  ID.AddBoolean(S->getScopeTypeInfo() != nullptr);
2016  if (S->getScopeTypeInfo())
2017  VisitType(S->getScopeTypeInfo()->getType());
2018  ID.AddBoolean(S->getDestroyedTypeInfo() != nullptr);
2019  if (S->getDestroyedTypeInfo())
2020  VisitType(S->getDestroyedType());
2021  else
2022  VisitIdentifierInfo(S->getDestroyedTypeIdentifier());
2023 }
2024 
2025 void StmtProfiler::VisitOverloadExpr(const OverloadExpr *S) {
2026  VisitExpr(S);
2027  VisitNestedNameSpecifier(S->getQualifier());
2028  VisitName(S->getName(), /*TreatAsDecl*/ true);
2029  ID.AddBoolean(S->hasExplicitTemplateArgs());
2030  if (S->hasExplicitTemplateArgs())
2031  VisitTemplateArguments(S->getTemplateArgs(), S->getNumTemplateArgs());
2032 }
2033 
2034 void
2035 StmtProfiler::VisitUnresolvedLookupExpr(const UnresolvedLookupExpr *S) {
2036  VisitOverloadExpr(S);
2037 }
2038 
2039 void StmtProfiler::VisitTypeTraitExpr(const TypeTraitExpr *S) {
2040  VisitExpr(S);
2041  ID.AddInteger(S->getTrait());
2042  ID.AddInteger(S->getNumArgs());
2043  for (unsigned I = 0, N = S->getNumArgs(); I != N; ++I)
2044  VisitType(S->getArg(I)->getType());
2045 }
2046 
2047 void StmtProfiler::VisitArrayTypeTraitExpr(const ArrayTypeTraitExpr *S) {
2048  VisitExpr(S);
2049  ID.AddInteger(S->getTrait());
2050  VisitType(S->getQueriedType());
2051 }
2052 
2053 void StmtProfiler::VisitExpressionTraitExpr(const ExpressionTraitExpr *S) {
2054  VisitExpr(S);
2055  ID.AddInteger(S->getTrait());
2056  VisitExpr(S->getQueriedExpression());
2057 }
2058 
2059 void StmtProfiler::VisitDependentScopeDeclRefExpr(
2060  const DependentScopeDeclRefExpr *S) {
2061  VisitExpr(S);
2062  VisitName(S->getDeclName());
2063  VisitNestedNameSpecifier(S->getQualifier());
2064  ID.AddBoolean(S->hasExplicitTemplateArgs());
2065  if (S->hasExplicitTemplateArgs())
2066  VisitTemplateArguments(S->getTemplateArgs(), S->getNumTemplateArgs());
2067 }
2068 
2069 void StmtProfiler::VisitExprWithCleanups(const ExprWithCleanups *S) {
2070  VisitExpr(S);
2071 }
2072 
2073 void StmtProfiler::VisitCXXUnresolvedConstructExpr(
2074  const CXXUnresolvedConstructExpr *S) {
2075  VisitExpr(S);
2076  VisitType(S->getTypeAsWritten());
2077  ID.AddInteger(S->isListInitialization());
2078 }
2079 
2080 void StmtProfiler::VisitCXXDependentScopeMemberExpr(
2081  const CXXDependentScopeMemberExpr *S) {
2082  ID.AddBoolean(S->isImplicitAccess());
2083  if (!S->isImplicitAccess()) {
2084  VisitExpr(S);
2085  ID.AddBoolean(S->isArrow());
2086  }
2087  VisitNestedNameSpecifier(S->getQualifier());
2088  VisitName(S->getMember());
2089  ID.AddBoolean(S->hasExplicitTemplateArgs());
2090  if (S->hasExplicitTemplateArgs())
2091  VisitTemplateArguments(S->getTemplateArgs(), S->getNumTemplateArgs());
2092 }
2093 
2094 void StmtProfiler::VisitUnresolvedMemberExpr(const UnresolvedMemberExpr *S) {
2095  ID.AddBoolean(S->isImplicitAccess());
2096  if (!S->isImplicitAccess()) {
2097  VisitExpr(S);
2098  ID.AddBoolean(S->isArrow());
2099  }
2100  VisitNestedNameSpecifier(S->getQualifier());
2101  VisitName(S->getMemberName());
2102  ID.AddBoolean(S->hasExplicitTemplateArgs());
2103  if (S->hasExplicitTemplateArgs())
2104  VisitTemplateArguments(S->getTemplateArgs(), S->getNumTemplateArgs());
2105 }
2106 
2107 void StmtProfiler::VisitCXXNoexceptExpr(const CXXNoexceptExpr *S) {
2108  VisitExpr(S);
2109 }
2110 
2111 void StmtProfiler::VisitPackExpansionExpr(const PackExpansionExpr *S) {
2112  VisitExpr(S);
2113 }
2114 
2115 void StmtProfiler::VisitSizeOfPackExpr(const SizeOfPackExpr *S) {
2116  VisitExpr(S);
2117  VisitDecl(S->getPack());
2118  if (S->isPartiallySubstituted()) {
2119  auto Args = S->getPartialArguments();
2120  ID.AddInteger(Args.size());
2121  for (const auto &TA : Args)
2122  VisitTemplateArgument(TA);
2123  } else {
2124  ID.AddInteger(0);
2125  }
2126 }
2127 
2128 void StmtProfiler::VisitSubstNonTypeTemplateParmPackExpr(
2130  VisitExpr(S);
2131  VisitDecl(S->getParameterPack());
2132  VisitTemplateArgument(S->getArgumentPack());
2133 }
2134 
2135 void StmtProfiler::VisitSubstNonTypeTemplateParmExpr(
2136  const SubstNonTypeTemplateParmExpr *E) {
2137  // Profile exactly as the replacement expression.
2138  Visit(E->getReplacement());
2139 }
2140 
2141 void StmtProfiler::VisitFunctionParmPackExpr(const FunctionParmPackExpr *S) {
2142  VisitExpr(S);
2143  VisitDecl(S->getParameterPack());
2144  ID.AddInteger(S->getNumExpansions());
2145  for (FunctionParmPackExpr::iterator I = S->begin(), E = S->end(); I != E; ++I)
2146  VisitDecl(*I);
2147 }
2148 
2149 void StmtProfiler::VisitMaterializeTemporaryExpr(
2150  const MaterializeTemporaryExpr *S) {
2151  VisitExpr(S);
2152 }
2153 
2154 void StmtProfiler::VisitCXXFoldExpr(const CXXFoldExpr *S) {
2155  VisitExpr(S);
2156  ID.AddInteger(S->getOperator());
2157 }
2158 
2159 void StmtProfiler::VisitCoroutineBodyStmt(const CoroutineBodyStmt *S) {
2160  VisitStmt(S);
2161 }
2162 
2163 void StmtProfiler::VisitCoreturnStmt(const CoreturnStmt *S) {
2164  VisitStmt(S);
2165 }
2166 
2167 void StmtProfiler::VisitCoawaitExpr(const CoawaitExpr *S) {
2168  VisitExpr(S);
2169 }
2170 
2171 void StmtProfiler::VisitDependentCoawaitExpr(const DependentCoawaitExpr *S) {
2172  VisitExpr(S);
2173 }
2174 
2175 void StmtProfiler::VisitCoyieldExpr(const CoyieldExpr *S) {
2176  VisitExpr(S);
2177 }
2178 
2179 void StmtProfiler::VisitOpaqueValueExpr(const OpaqueValueExpr *E) {
2180  VisitExpr(E);
2181 }
2182 
2183 void StmtProfiler::VisitTypoExpr(const TypoExpr *E) {
2184  VisitExpr(E);
2185 }
2186 
2187 void StmtProfiler::VisitSourceLocExpr(const SourceLocExpr *E) {
2188  VisitExpr(E);
2189 }
2190 
2191 void StmtProfiler::VisitRecoveryExpr(const RecoveryExpr *E) { VisitExpr(E); }
2192 
2193 void StmtProfiler::VisitObjCStringLiteral(const ObjCStringLiteral *S) {
2194  VisitExpr(S);
2195 }
2196 
2197 void StmtProfiler::VisitObjCBoxedExpr(const ObjCBoxedExpr *E) {
2198  VisitExpr(E);
2199 }
2200 
2201 void StmtProfiler::VisitObjCArrayLiteral(const ObjCArrayLiteral *E) {
2202  VisitExpr(E);
2203 }
2204 
2205 void StmtProfiler::VisitObjCDictionaryLiteral(const ObjCDictionaryLiteral *E) {
2206  VisitExpr(E);
2207 }
2208 
2209 void StmtProfiler::VisitObjCEncodeExpr(const ObjCEncodeExpr *S) {
2210  VisitExpr(S);
2211  VisitType(S->getEncodedType());
2212 }
2213 
2214 void StmtProfiler::VisitObjCSelectorExpr(const ObjCSelectorExpr *S) {
2215  VisitExpr(S);
2216  VisitName(S->getSelector());
2217 }
2218 
2219 void StmtProfiler::VisitObjCProtocolExpr(const ObjCProtocolExpr *S) {
2220  VisitExpr(S);
2221  VisitDecl(S->getProtocol());
2222 }
2223 
2224 void StmtProfiler::VisitObjCIvarRefExpr(const ObjCIvarRefExpr *S) {
2225  VisitExpr(S);
2226  VisitDecl(S->getDecl());
2227  ID.AddBoolean(S->isArrow());
2228  ID.AddBoolean(S->isFreeIvar());
2229 }
2230 
2231 void StmtProfiler::VisitObjCPropertyRefExpr(const ObjCPropertyRefExpr *S) {
2232  VisitExpr(S);
2233  if (S->isImplicitProperty()) {
2234  VisitDecl(S->getImplicitPropertyGetter());
2235  VisitDecl(S->getImplicitPropertySetter());
2236  } else {
2237  VisitDecl(S->getExplicitProperty());
2238  }
2239  if (S->isSuperReceiver()) {
2240  ID.AddBoolean(S->isSuperReceiver());
2241  VisitType(S->getSuperReceiverType());
2242  }
2243 }
2244 
2245 void StmtProfiler::VisitObjCSubscriptRefExpr(const ObjCSubscriptRefExpr *S) {
2246  VisitExpr(S);
2247  VisitDecl(S->getAtIndexMethodDecl());
2248  VisitDecl(S->setAtIndexMethodDecl());
2249 }
2250 
2251 void StmtProfiler::VisitObjCMessageExpr(const ObjCMessageExpr *S) {
2252  VisitExpr(S);
2253  VisitName(S->getSelector());
2254  VisitDecl(S->getMethodDecl());
2255 }
2256 
2257 void StmtProfiler::VisitObjCIsaExpr(const ObjCIsaExpr *S) {
2258  VisitExpr(S);
2259  ID.AddBoolean(S->isArrow());
2260 }
2261 
2262 void StmtProfiler::VisitObjCBoolLiteralExpr(const ObjCBoolLiteralExpr *S) {
2263  VisitExpr(S);
2264  ID.AddBoolean(S->getValue());
2265 }
2266 
2267 void StmtProfiler::VisitObjCIndirectCopyRestoreExpr(
2268  const ObjCIndirectCopyRestoreExpr *S) {
2269  VisitExpr(S);
2270  ID.AddBoolean(S->shouldCopy());
2271 }
2272 
2273 void StmtProfiler::VisitObjCBridgedCastExpr(const ObjCBridgedCastExpr *S) {
2274  VisitExplicitCastExpr(S);
2275  ID.AddBoolean(S->getBridgeKind());
2276 }
2277 
2278 void StmtProfiler::VisitObjCAvailabilityCheckExpr(
2279  const ObjCAvailabilityCheckExpr *S) {
2280  VisitExpr(S);
2281 }
2282 
2283 void StmtProfiler::VisitTemplateArguments(const TemplateArgumentLoc *Args,
2284  unsigned NumArgs) {
2285  ID.AddInteger(NumArgs);
2286  for (unsigned I = 0; I != NumArgs; ++I)
2287  VisitTemplateArgument(Args[I].getArgument());
2288 }
2289 
2290 void StmtProfiler::VisitTemplateArgument(const TemplateArgument &Arg) {
2291  // Mostly repetitive with TemplateArgument::Profile!
2292  ID.AddInteger(Arg.getKind());
2293  switch (Arg.getKind()) {
2295  break;
2296 
2298  VisitType(Arg.getAsType());
2299  break;
2300 
2303  VisitTemplateName(Arg.getAsTemplateOrTemplatePattern());
2304  break;
2305 
2307  VisitType(Arg.getParamTypeForDecl());
2308  // FIXME: Do we need to recursively decompose template parameter objects?
2309  VisitDecl(Arg.getAsDecl());
2310  break;
2311 
2313  VisitType(Arg.getNullPtrType());
2314  break;
2315 
2317  VisitType(Arg.getIntegralType());
2318  Arg.getAsIntegral().Profile(ID);
2319  break;
2320 
2322  Visit(Arg.getAsExpr());
2323  break;
2324 
2326  for (const auto &P : Arg.pack_elements())
2327  VisitTemplateArgument(P);
2328  break;
2329  }
2330 }
2331 
2332 void Stmt::Profile(llvm::FoldingSetNodeID &ID, const ASTContext &Context,
2333  bool Canonical) const {
2334  StmtProfilerWithPointers Profiler(ID, Context, Canonical);
2335  Profiler.Visit(this);
2336 }
2337 
2338 void Stmt::ProcessODRHash(llvm::FoldingSetNodeID &ID,
2339  class ODRHash &Hash) const {
2340  StmtProfilerWithoutPointers Profiler(ID, Hash);
2341  Profiler.Visit(this);
2342 }
clang::ArrayInitIndexExpr
Represents the index of the current element of an array being initialized by an ArrayInitLoopExpr.
Definition: Expr.h:5474
clang::BuiltinType
This class is used for builtin types like 'int'.
Definition: Type.h:2504
clang::IndirectGotoStmt
IndirectGotoStmt - This represents an indirect goto.
Definition: Stmt.h:2649
clang::LabelStmt
LabelStmt - Represents a label, which has a substatement.
Definition: Stmt.h:1804
clang::ExpressionTraitExpr
An expression trait intrinsic.
Definition: ExprCXX.h:2840
clang::OMPForDirective
This represents '#pragma omp for' directive.
Definition: StmtOpenMP.h:1628
clang::OMPPartialClause
Representation of the 'partial' clause of the '#pragma omp unroll' directive.
Definition: OpenMPClause.h:1017
clang::OMPIteratorExpr
OpenMP 5.0 [2.1.6 Iterators] Iterators are identifiers that expand to multiple values in the clause o...
Definition: ExprOpenMP.h:272
clang::MatrixSubscriptExpr
MatrixSubscriptExpr - Matrix subscript expression for the MatrixType extension.
Definition: Expr.h:2723
clang::SubstNonTypeTemplateParmExpr
Represents a reference to a non-type template parameter that has been substituted with a template arg...
Definition: ExprCXX.h:4262
clang::AtomicExpr
AtomicExpr - Variadic atomic builtins: __atomic_exchange, __atomic_fetch_*, __atomic_load,...
Definition: Expr.h:6234
clang::OMPMasterTaskLoopSimdDirective
This represents '#pragma omp master taskloop simd' directive.
Definition: StmtOpenMP.h:3786
clang::CaseStmt
CaseStmt - Represent a case statement.
Definition: Stmt.h:1572
clang::OMPTaskyieldDirective
This represents '#pragma omp taskyield' directive.
Definition: StmtOpenMP.h:2459
clang::ImaginaryLiteral
ImaginaryLiteral - We support imaginary integer and floating point literals, like "1....
Definition: Expr.h:1718
clang::OMPDestroyClause
This represents 'destroy' clause in the '#pragma omp depobj' directive or the '#pragma omp interop' d...
Definition: OpenMPClause.h:7902
clang::OMPLastprivateClause
This represents clause 'lastprivate' in the '#pragma omp ...' directives.
Definition: OpenMPClause.h:2728
clang::ArrayTypeTraitExpr
An Embarcadero array type trait, as used in the implementation of __array_rank and __array_extent.
Definition: ExprCXX.h:2770
clang::ObjCBoxedExpr
ObjCBoxedExpr - used for generalized expression boxing.
Definition: ExprObjC.h:128
clang::CXXBoolLiteralExpr
A boolean literal, per ([C++ lex.bool] Boolean literals).
Definition: ExprCXX.h:721
clang::AsTypeExpr
AsTypeExpr - Clang builtin function __builtin_astype [OpenCL 6.2.4.2] This AST node provides support ...
Definition: Expr.h:6031
clang::ODRHash::AddDecl
void AddDecl(const Decl *D)
Definition: ODRHash.cpp:631
clang::OffsetOfExpr
OffsetOfExpr - [C99 7.17] - This represents an expression of the form offsetof(record-type,...
Definition: Expr.h:2444
clang::OMPUsesAllocatorsClause::Data::Allocator
Expr * Allocator
Allocator.
Definition: OpenMPClause.h:8348
clang::concepts::ExprRequirement::ReturnTypeRequirement::getTypeConstraint
const TypeConstraint * getTypeConstraint() const
Definition: ExprConcepts.cpp:136
clang::CXXPseudoDestructorExpr
Represents a C++ pseudo-destructor (C++ [expr.pseudo]).
Definition: ExprCXX.h:2534
clang::ConstOMPClauseVisitor
Definition: OpenMPClause.h:8758
clang::OMPPriorityClause
This represents 'priority' clause in the '#pragma omp ...' directive.
Definition: OpenMPClause.h:6106
clang::OMPTileDirective
This represents the '#pragma omp tile' loop transformation directive.
Definition: StmtOpenMP.h:5118
clang::SwitchStmt
SwitchStmt - This represents a 'switch' stmt.
Definition: Stmt.h:2155
clang::GenericSelectionExpr::ConstAssociation
AssociationTy< true > ConstAssociation
Definition: Expr.h:5786
clang::OMPMaskedDirective
This represents '#pragma omp masked' directive.
Definition: StmtOpenMP.h:5445
clang::WhileStmt
WhileStmt - This represents a 'while' stmt.
Definition: Stmt.h:2346
clang::NullStmt
NullStmt - This is the null statement ";": C99 6.8.3p3.
Definition: Stmt.h:1369
clang::OMPInitClause
This represents the 'init' clause in '#pragma omp ...' directives.
Definition: OpenMPClause.h:7704
clang::TemplateArgument::getAsTemplateOrTemplatePattern
TemplateName getAsTemplateOrTemplatePattern() const
Retrieve the template argument as a template name; if the argument is a pack expansion,...
Definition: TemplateBase.h:299
clang::CXXReinterpretCastExpr
A C++ reinterpret_cast expression (C++ [expr.reinterpret.cast]).
Definition: ExprCXX.h:521
clang::TemplateArgument::pack_elements
ArrayRef< TemplateArgument > pack_elements() const
Iterator range referencing all of the elements of a template argument pack.
Definition: TemplateBase.h:365
clang::TemplateArgument::Null
@ Null
Represents an empty template argument, e.g., one that has not been deduced.
Definition: TemplateBase.h:67
clang::OMPParallelMasterTaskLoopDirective
This represents '#pragma omp parallel master taskloop' directive.
Definition: StmtOpenMP.h:3852
clang::OMPTargetParallelGenericLoopDirective
This represents '#pragma omp target parallel loop' directive.
Definition: StmtOpenMP.h:5793
clang::OMPDepobjClause
This represents implicit clause 'depobj' for the '#pragma omp depobj' directive.
Definition: OpenMPClause.h:4659
clang::DesignatedInitExpr
Represents a C99 designated initializer expression.
Definition: Expr.h:5029
clang::OMPTargetTeamsDistributeDirective
This represents '#pragma omp target teams distribute' combined directive.
Definition: StmtOpenMP.h:4825
clang::SubstNonTypeTemplateParmPackExpr
Represents a reference to a non-type template parameter pack that has been substituted with a non-tem...
Definition: ExprCXX.h:4329
clang::OMPTargetTeamsDistributeSimdDirective
This represents '#pragma omp target teams distribute simd' combined directive.
Definition: StmtOpenMP.h:5060
clang::OMPDefaultmapClause
This represents 'defaultmap' clause in the '#pragma omp ...' directive.
Definition: OpenMPClause.h:6539
clang::OMPCanonicalLoop
Representation of an OpenMP canonical loop.
Definition: StmtOpenMP.h:142
clang::MSPropertyRefExpr
A member reference to an MSPropertyDecl.
Definition: ExprCXX.h:923
clang::ODRHash::AddDeclarationName
void AddDeclarationName(DeclarationName Name, bool TreatAsDecl=false)
Definition: ODRHash.cpp:34
clang::ParenListExpr
Definition: Expr.h:5537
clang::OffsetOfNode::getKind
Kind getKind() const
Determine what kind of offsetof node this is.
Definition: Expr.h:2394
clang::TemplateArgument::getIntegralType
QualType getIntegralType() const
Retrieve the type of the integral value.
Definition: TemplateBase.h:326
clang::OMPThreadsClause
This represents 'threads' clause in the '#pragma omp ...' directive.
Definition: OpenMPClause.h:4977
clang::OMPMasterDirective
This represents '#pragma omp master' directive.
Definition: StmtOpenMP.h:1971
clang::OMPAllocatorClause
This represents 'allocator' clause in the '#pragma omp ...' directive.
Definition: OpenMPClause.h:270
clang::Stmt::StmtClass
StmtClass
Definition: Stmt.h:71
clang::OMPIfClause
This represents 'if' clause in the '#pragma omp ...' directive.
Definition: OpenMPClause.h:505
clang::NoInitExpr
Represents a place-holder for an object not to be initialized by anything.
Definition: Expr.h:5330
clang::OMPLinearClause
This represents clause 'linear' in the '#pragma omp ...' directives.
Definition: OpenMPClause.h:3862
clang::OMPCopyinClause
This represents clause 'copyin' in the '#pragma omp ...' directives.
Definition: OpenMPClause.h:4237
clang::OMPPrivateClause
This represents clause 'private' in the '#pragma omp ...' directives.
Definition: OpenMPClause.h:2481
clang::OffsetOfNode::Array
@ Array
An index into an array.
Definition: Expr.h:2345
clang::OMPTaskwaitDirective
This represents '#pragma omp taskwait' directive.
Definition: StmtOpenMP.h:2551
clang::TemplateArgument::getParamTypeForDecl
QualType getParamTypeForDecl() const
Definition: TemplateBase.h:280
clang::UnresolvedMemberExpr
Represents a C++ member access expression for which lookup produced a set of overloaded functions.
Definition: ExprCXX.h:3827
clang::QualType
A (possibly-)qualified type.
Definition: Type.h:675
clang::concepts::ExprRequirement::ReturnTypeRequirement::isEmpty
bool isEmpty() const
Definition: ExprConcepts.h:304
clang::NonTypeTemplateParmDecl
NonTypeTemplateParmDecl - Declares a non-type template parameter, e.g., "Size" in.
Definition: DeclTemplate.h:1401
clang::ObjCBridgedCastExpr
An Objective-C "bridged" cast expression, which casts between Objective-C pointers and C pointers,...
Definition: ExprObjC.h:1625
AttributeLangSupport::C
@ C
Definition: SemaDeclAttr.cpp:55
clang::TypeConstraint::getImmediatelyDeclaredConstraint
Expr * getImmediatelyDeclaredConstraint() const
Get the immediately-declared constraint expression introduced by this type-constraint,...
Definition: ASTConcept.h:185
clang::NestedNameSpecifier
Represents a C++ nested name specifier, such as "\::std::vector<int>::".
Definition: NestedNameSpecifier.h:50
clang::OMPCompareClause
This represents 'compare' clause in the '#pragma omp atomic' directive.
Definition: OpenMPClause.h:2235
clang::OMPSectionDirective
This represents '#pragma omp section' directive.
Definition: StmtOpenMP.h:1858
clang::TypeTraitExpr
A type trait used in the implementation of various C++11 and Library TR1 trait templates.
Definition: ExprCXX.h:2682
clang::CXXTypeidExpr
A C++ typeid expression (C++ [expr.typeid]), which gets the type_info that corresponds to the supplie...
Definition: ExprCXX.h:839
clang::RequiresExpr
C++2a [expr.prim.req]: A requires-expression provides a concise way to express requirements on templa...
Definition: ExprConcepts.h:475
clang::ParmVarDecl
Represents a parameter to a function.
Definition: Decl.h:1680
DeclCXX.h
clang::OMPTeamsDistributeSimdDirective
This represents '#pragma omp teams distribute simd' combined directive.
Definition: StmtOpenMP.h:4542
clang::OMPAtomicDefaultMemOrderClause
This represents 'atomic_default_mem_order' clause in the '#pragma omp requires' directive.
Definition: OpenMPClause.h:1484
clang::TemplateArgument::Declaration
@ Declaration
The template argument is a declaration that was provided for a pointer, reference,...
Definition: TemplateBase.h:74
clang::CXXNewExpr
Represents a new-expression for memory allocation and constructor calls, e.g: "new CXXNewExpr(foo)".
Definition: ExprCXX.h:2139
clang::OMPDistScheduleClause
This represents 'dist_schedule' clause in the '#pragma omp ...' directive.
Definition: OpenMPClause.h:6420
clang::OMPClauseWithPostUpdate
Class that handles post-update expression for some clauses, like 'lastprivate', 'reduction' etc.
Definition: OpenMPClause.h:150
clang::IfStmt
IfStmt - This represents an if/then/else.
Definition: Stmt.h:1909
clang::ObjCAtTryStmt
Represents Objective-C's @try ... @catch ... @finally statement.
Definition: StmtObjC.h:165
clang::RecoveryExpr
Frontend produces RecoveryExprs on semantic errors that prevent creating other well-formed expression...
Definition: Expr.h:6421
clang::OMPSeqCstClause
This represents 'seq_cst' clause in the '#pragma omp atomic' directive.
Definition: OpenMPClause.h:2276
clang::GotoStmt
GotoStmt - This represents a direct goto.
Definition: Stmt.h:2610
clang::OMPMapClause
This represents clause 'map' in the '#pragma omp ...' directives.
Definition: OpenMPClause.h:5699
clang::InitListExpr
Describes an C or C++ initializer list.
Definition: Expr.h:4791
clang::OffsetOfNode::getFieldName
IdentifierInfo * getFieldName() const
For a field or identifier offsetof node, returns the name of the field.
Definition: Expr.cpp:1585
clang::OMPLoopTransformationDirective
The base class for all loop transformation directives.
Definition: StmtOpenMP.h:959
clang::OMPInReductionClause
This represents clause 'in_reduction' in the '#pragma omp task' directives.
Definition: OpenMPClause.h:3606
getArgument
static const TemplateArgument & getArgument(const TemplateArgument &A)
Definition: TypePrinter.cpp:1885
clang::UnaryOperator
UnaryOperator - This represents the unary-expression's (except sizeof and alignof),...
Definition: Expr.h:2163
clang::OMPReductionClause
This represents clause 'reduction' in the '#pragma omp ...' directives.
Definition: OpenMPClause.h:3039
clang::Stmt::ProcessODRHash
void ProcessODRHash(llvm::FoldingSetNodeID &ID, ODRHash &Hash) const
Calculate a unique representation for a statement that is stable across compiler invocations.
Definition: StmtProfile.cpp:2338
clang::OMPUnifiedAddressClause
This represents 'unified_address' clause in the '#pragma omp requires' directive.
Definition: OpenMPClause.h:1312
clang::concepts::ExprRequirement::ReturnTypeRequirement::isTypeConstraint
bool isTypeConstraint() const
Definition: ExprConcepts.h:313
clang::CoreturnStmt
Represents a 'co_return' statement in the C++ Coroutines TS.
Definition: StmtCXX.h:458
clang::OMPUsesAllocatorsClause::Data::AllocatorTraits
Expr * AllocatorTraits
Allocator traits.
Definition: OpenMPClause.h:8350
ExprOpenMP.h
clang::CXXStaticCastExpr
A C++ static_cast expression (C++ [expr.static.cast]).
Definition: ExprCXX.h:431
clang::ObjCForCollectionStmt
Represents Objective-C's collection statement.
Definition: StmtObjC.h:23
clang::ArrayInitLoopExpr
Represents a loop initializing the elements of an array.
Definition: Expr.h:5421
clang::OMPInclusiveClause
This represents clause 'inclusive' in the '#pragma omp scan' directive.
Definition: OpenMPClause.h:8191
clang::TemplateArgument::getAsExpr
Expr * getAsExpr() const
Retrieve the template argument as an expression.
Definition: TemplateBase.h:341
clang::OMPUseDeviceAddrClause
This represents clause 'use_device_addr' in the '#pragma omp ...' directives.
Definition: OpenMPClause.h:7220
clang::OMPReleaseClause
This represents 'release' clause in the '#pragma omp atomic|flush' directives.
Definition: OpenMPClause.h:2399
clang::DeclarationName
The name of a declaration.
Definition: DeclarationName.h:144
clang::OMPSharedClause
This represents clause 'shared' in the '#pragma omp ...' directives.
Definition: OpenMPClause.h:2966
clang::TemplateArgument::Expression
@ Expression
The template argument is an expression, and we've not resolved it to one of the other forms yet,...
Definition: TemplateBase.h:96
clang::TemplateArgument::getAsIntegral
llvm::APSInt getAsIntegral() const
Retrieve the template argument as an integral value.
Definition: TemplateBase.h:312
clang::OMPTargetTeamsDistributeParallelForDirective
This represents '#pragma omp target teams distribute parallel for' combined directive.
Definition: StmtOpenMP.h:4891
clang::OpaqueValueExpr
OpaqueValueExpr - An expression referring to an opaque object of a fixed type and value class.
Definition: Expr.h:1135
clang::OMPScheduleClause
This represents 'schedule' clause in the '#pragma omp ...' directive.
Definition: OpenMPClause.h:1573
clang::SEHTryStmt
Definition: Stmt.h:3413
clang::OMPCollapseClause
This represents 'collapse' clause in the '#pragma omp ...' directive.
Definition: OpenMPClause.h:1086
clang::CXXFoldExpr
Represents a folding of a pack over an operator.
Definition: ExprCXX.h:4591
clang::ObjCSubscriptRefExpr
ObjCSubscriptRefExpr - used for array and dictionary subscripting.
Definition: ExprObjC.h:841
clang::ObjCBoolLiteralExpr
ObjCBoolLiteralExpr - Objective-C Boolean Literal.
Definition: ExprObjC.h:88
clang::OMPAllocateClause
This represents clause 'allocate' in the '#pragma omp ...' directives.
Definition: OpenMPClause.h:408
DecodeOperatorCall
static Stmt::StmtClass DecodeOperatorCall(const CXXOperatorCallExpr *S, UnaryOperatorKind &UnaryOp, BinaryOperatorKind &BinaryOp)
Definition: StmtProfile.cpp:1595
clang::OMPTaskgroupDirective
This represents '#pragma omp taskgroup' directive.
Definition: StmtOpenMP.h:2602
clang::ObjCIndirectCopyRestoreExpr
ObjCIndirectCopyRestoreExpr - Represents the passing of a function argument by indirect copy-restore ...
Definition: ExprObjC.h:1566
clang::ConditionalOperator
ConditionalOperator - The ?: ternary operator.
Definition: Expr.h:4145
clang::CXXThrowExpr
A C++ throw-expression (C++ [except.throw]).
Definition: ExprCXX.h:1181
clang::OMPUseDevicePtrClause
This represents clause 'use_device_ptr' in the '#pragma omp ...' directives.
Definition: OpenMPClause.h:7056
clang::ObjCArrayLiteral
ObjCArrayLiteral - used for objective-c array containers; as in: @["Hello", NSApp,...
Definition: ExprObjC.h:190
DeclObjC.h
clang::TemplateArgument::Integral
@ Integral
The template argument is an integral value stored in an llvm::APSInt that was provided for an integra...
Definition: TemplateBase.h:82
clang::ObjCPropertyRefExpr
ObjCPropertyRefExpr - A dot-syntax expression to access an ObjC property.
Definition: ExprObjC.h:614
clang::OMPAlignedClause
This represents clause 'aligned' in the '#pragma omp ...' directives.
Definition: OpenMPClause.h:4139
clang::OMPHasDeviceAddrClause
This represents clause 'has_device_ptr' in the '#pragma omp ...' directives.
Definition: OpenMPClause.h:7427
clang::CXXTemporaryObjectExpr
Represents a C++ functional cast expression that builds a temporary object.
Definition: ExprCXX.h:1797
clang::OMPNocontextClause
This represents 'nocontext' clause in the '#pragma omp ...' directive.
Definition: OpenMPClause.h:8060
clang::FunctionParmPackExpr
Represents a reference to a function parameter pack or init-capture pack that has been substituted bu...
Definition: ExprCXX.h:4397
clang::OMPOrderedClause
This represents 'ordered' clause in the '#pragma omp ...' directive.
Definition: OpenMPClause.h:1766
clang::FixedPointLiteral
Definition: Expr.h:1537
clang::OMPTargetExitDataDirective
This represents '#pragma omp target exit data' directive.
Definition: StmtOpenMP.h:3171
clang::TemplateArgument::NullPtr
@ NullPtr
The template argument is a null pointer or null pointer to member that was provided for a non-type te...
Definition: TemplateBase.h:78
clang::OMPForSimdDirective
This represents '#pragma omp for simd' directive.
Definition: StmtOpenMP.h:1718
clang::concepts::ExprRequirement::ReturnTypeRequirement::isSubstitutionFailure
bool isSubstitutionFailure() const
Definition: ExprConcepts.h:308
clang::AttributedStmt
Represents an attribute applied to a statement.
Definition: Stmt.h:1851
clang::OMPParallelGenericLoopDirective
This represents '#pragma omp parallel loop' directive.
Definition: StmtOpenMP.h:5728
clang::IntegerLiteral
Definition: Expr.h:1494
clang::OMPProcBindClause
This represents 'proc_bind' clause in the '#pragma omp ...' directive.
Definition: OpenMPClause.h:1230
clang::ObjCAtCatchStmt
Represents Objective-C's @catch statement.
Definition: StmtObjC.h:77
clang::UnaryExprOrTypeTraitExpr
UnaryExprOrTypeTraitExpr - expression with either a type or (unevaluated) expression operand.
Definition: Expr.h:2549
clang::OMPNovariantsClause
This represents 'novariants' clause in the '#pragma omp ...' directive.
Definition: OpenMPClause.h:7989
clang::FloatingLiteral
Definition: Expr.h:1639
clang::TemplateArgument::getKind
ArgKind getKind() const
Return the kind of stored template argument.
Definition: TemplateBase.h:244
clang::CompoundStmt
CompoundStmt - This represents a group of statements like { stmt stmt }.
Definition: Stmt.h:1404
clang::ConvertVectorExpr
ConvertVectorExpr - Clang builtin function __builtin_convertvector This AST node provides support for...
Definition: Expr.h:4465
clang::OMPNumTeamsClause
This represents 'num_teams' clause in the '#pragma omp ...' directive.
Definition: OpenMPClause.h:5953
clang::ObjCSelectorExpr
ObjCSelectorExpr used for @selector in Objective-C.
Definition: ExprObjC.h:454
DeclTemplate.h
clang::MSPropertySubscriptExpr
MS property subscript expression.
Definition: ExprCXX.h:994
clang::CXXAddrspaceCastExpr
A C++ addrspace_cast expression (currently only enabled for OpenCL).
Definition: ExprCXX.h:600
clang::OMPSIMDClause
This represents 'simd' clause in the '#pragma omp ...' directive.
Definition: OpenMPClause.h:5017
clang::OMPParallelMasterDirective
This represents '#pragma omp parallel master' directive.
Definition: StmtOpenMP.h:2252
clang::ODRHash::AddQualType
void AddQualType(QualType T)
Definition: ODRHash.cpp:1125
clang::UnresolvedLookupExpr
A reference to a name which we were able to look up during parsing but could not resolve to a specifi...
Definition: ExprCXX.h:3090
clang::CXXRewrittenBinaryOperator
A rewritten comparison expression that was originally written using operator syntax.
Definition: ExprCXX.h:284
clang::OMPReverseOffloadClause
This represents 'reverse_offload' clause in the '#pragma omp requires' directive.
Definition: OpenMPClause.h:1398
clang::DependentCoawaitExpr
Represents a 'co_await' expression while the type of the promise is dependent.
Definition: ExprCXX.h:4817
clang::SizeOfPackExpr
Represents an expression that computes the length of a parameter pack.
Definition: ExprCXX.h:4144
clang::OMPTaskReductionClause
This represents clause 'task_reduction' in the '#pragma omp taskgroup' directives.
Definition: OpenMPClause.h:3375
Node
DynTypedNode Node
Definition: ASTMatchFinder.cpp:68
clang::CXXBindTemporaryExpr
Represents binding an expression to a temporary.
Definition: ExprCXX.h:1412
clang::Decl::getKind
Kind getKind() const
Definition: DeclBase.h:428
clang::BinaryOperator
A builtin binary operation expression such as "x + y" or "x <= y".
Definition: Expr.h:3807
clang::OMPTeamsDirective
This represents '#pragma omp teams' directive.
Definition: StmtOpenMP.h:3400
clang::LambdaExpr
A C++ lambda expression, which produces a function object (of unspecified type) that can be invoked l...
Definition: ExprCXX.h:1865
clang::OMPLoopDirective
This is a common base class for loop directives ('omp simd', 'omp for', 'omp for simd' etc....
Definition: StmtOpenMP.h:1002
clang::ObjCAtThrowStmt
Represents Objective-C's @throw statement.
Definition: StmtObjC.h:357
clang::SubstNonTypeTemplateParmExpr::getReplacement
Expr * getReplacement() const
Definition: ExprCXX.h:4294
clang::ObjCStringLiteral
ObjCStringLiteral, used for Objective-C string literals i.e.
Definition: ExprObjC.h:52
clang::OMPFullClause
Representation of the 'full' clause of the '#pragma omp unroll' directive.
Definition: OpenMPClause.h:973
clang::ConceptSpecializationExpr
Represents the specialization of a concept - evaluates to a prvalue of type bool.
Definition: ExprConcepts.h:40
clang::OMPScanDirective
This represents '#pragma omp scan' directive.
Definition: StmtOpenMP.h:5274
clang::MaterializeTemporaryExpr
Represents a prvalue temporary that is written into memory so that a reference can bind to it.
Definition: ExprCXX.h:4479
clang::ASTContext
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
Definition: ASTContext.h:208
clang::ObjCDictionaryLiteral
ObjCDictionaryLiteral - AST node to represent objective-c dictionary literals; as in:"name" : NSUserN...
Definition: ExprObjC.h:306
clang::OMPMetaDirective
This represents '#pragma omp metadirective' directive.
Definition: StmtOpenMP.h:5496
clang::OMPDetachClause
This represents 'detach' clause in the '#pragma omp task' directive.
Definition: OpenMPClause.h:8129
clang::PseudoObjectExpr::const_semantics_iterator
const typedef Expr *const * const_semantics_iterator
Definition: Expr.h:6167
clang::BuiltinBitCastExpr
Represents a C++2a __builtin_bit_cast(T, v) expression.
Definition: ExprCXX.h:4892
clang::OMPDeviceClause
This represents 'device' clause in the '#pragma omp ...' directive.
Definition: OpenMPClause.h:4883
clang::TemplateArgument
Represents a template argument.
Definition: TemplateBase.h:61
clang::concepts::Requirement
A static requirement that can be used in a requires-expression to check properties of types and expre...
Definition: ExprConcepts.h:149
clang::OMPDistributeParallelForSimdDirective
This represents '#pragma omp distribute parallel for simd' composite directive.
Definition: StmtOpenMP.h:4213
clang::ForStmt
ForStmt - This represents a 'for (init;cond;inc)' stmt.
Definition: Stmt.h:2539
clang::ObjCAvailabilityCheckExpr
A runtime availability query.
Definition: ExprObjC.h:1686
clang::OMPDepobjDirective
This represents '#pragma omp depobj' directive.
Definition: StmtOpenMP.h:2721
clang::ODRHash::AddTemplateName
void AddTemplateName(TemplateName Name)
Definition: ODRHash.cpp:138
clang::PseudoObjectExpr
PseudoObjectExpr - An expression which accesses a pseudo-object l-value.
Definition: Expr.h:6100
clang::ObjCAtSynchronizedStmt
Represents Objective-C's @synchronized statement.
Definition: StmtObjC.h:302
clang::Decl::getCanonicalDecl
virtual Decl * getCanonicalDecl()
Retrieves the "canonical" declaration of the given declaration.
Definition: DeclBase.h:910
clang::OffsetOfNode::getField
FieldDecl * getField() const
For a field offsetof node, returns the field.
Definition: Expr.h:2404
clang::OMPNowaitClause
This represents 'nowait' clause in the '#pragma omp ...' directive.
Definition: OpenMPClause.h:1861
clang::BinaryConditionalOperator
BinaryConditionalOperator - The GNU extension to the conditional operator which allows the middle ope...
Definition: Expr.h:4207
clang::OMPUsesAllocatorsClause
This represents clause 'uses_allocators' in the '#pragma omp target'-based directives.
Definition: OpenMPClause.h:8340
clang::CXXDestructorDecl
Represents a C++ destructor within a class.
Definition: DeclCXX.h:2688
clang::TemplateArgumentLoc
Location wrapper for a TemplateArgument.
Definition: TemplateBase.h:457
clang::OMPDynamicAllocatorsClause
This represents 'dynamic_allocators' clause in the '#pragma omp requires' directive.
Definition: OpenMPClause.h:1441
clang::OMPLoopBasedDirective
The base class for all loop-based directives, including loop transformation directives.
Definition: StmtOpenMP.h:682
Expr.h
clang::OMPToClause
This represents clause 'to' in the '#pragma omp ...' directives.
Definition: OpenMPClause.h:6654
clang::ODRHash::AddIdentifierInfo
void AddIdentifierInfo(const IdentifierInfo *II)
Definition: ODRHash.cpp:29
clang::ImplicitValueInitExpr
Represents an implicitly-generated value initialization of an object of a given type.
Definition: Expr.h:5510
clang::TemplateTemplateParmDecl
TemplateTemplateParmDecl - Declares a template template parameter, e.g., "T" in.
Definition: DeclTemplate.h:1618
clang::OMPParallelDirective
This represents '#pragma omp parallel' directive.
Definition: StmtOpenMP.h:611
ASTContext.h
clang::CXXDynamicCastExpr
A C++ dynamic_cast expression (C++ [expr.dynamic.cast]).
Definition: ExprCXX.h:477
clang::OMPParallelForSimdDirective
This represents '#pragma omp parallel for simd' directive.
Definition: StmtOpenMP.h:2187
clang::OMPTaskDirective
This represents '#pragma omp task' directive.
Definition: StmtOpenMP.h:2397
clang::StringLiteral
StringLiteral - This represents a string literal expression, e.g.
Definition: Expr.h:1767
clang::OMPTargetParallelDirective
This represents '#pragma omp target parallel' directive.
Definition: StmtOpenMP.h:3225
clang::ExprWithCleanups
Represents an expression – generally a full-expression – that introduces cleanups to be run at the en...
Definition: ExprCXX.h:3359
clang::NUM_OVERLOADED_OPERATORS
@ NUM_OVERLOADED_OPERATORS
Definition: OperatorKinds.h:26
clang::CapturedStmt
This captures a statement into a function.
Definition: Stmt.h:3505
clang::ASTContext::getCanonicalType
CanQualType getCanonicalType(QualType T) const
Return the canonical (structural) type corresponding to the specified potentially non-canonical type ...
Definition: ASTContext.h:2508
clang::ObjCAtFinallyStmt
Represents Objective-C's @finally statement.
Definition: StmtObjC.h:127
clang::OMPParallelForDirective
This represents '#pragma omp parallel for' directive.
Definition: StmtOpenMP.h:2090
clang::OMPGrainsizeClause
This represents 'grainsize' clause in the '#pragma omp ...' directive.
Definition: OpenMPClause.h:6180
clang::CXXTryStmt
CXXTryStmt - A C++ try block, including all handlers.
Definition: StmtCXX.h:68
ExprObjC.h
clang::Stmt::Profile
void Profile(llvm::FoldingSetNodeID &ID, const ASTContext &Context, bool Canonical) const
Produce a unique representation of the given statement.
Definition: StmtProfile.cpp:2332
ExprCXX.h
clang::OMPDefaultClause
This represents 'default' clause in the '#pragma omp ...' directive.
Definition: OpenMPClause.h:1149
clang::ObjCEncodeExpr
ObjCEncodeExpr, used for @encode in Objective-C.
Definition: ExprObjC.h:409
clang::CXXInheritedCtorInitExpr
Represents a call to an inherited base class constructor from an inheriting constructor.
Definition: ExprCXX.h:1651
clang::CXXDefaultArgExpr
A default argument (C++ [dcl.fct.default]).
Definition: ExprCXX.h:1241
clang::PackExpansionExpr
Represents a C++11 pack expansion that produces a sequence of expressions.
Definition: ExprCXX.h:4068
clang::OMPHintClause
This represents 'hint' clause in the '#pragma omp ...' directive.
Definition: OpenMPClause.h:6357
clang::OMPCriticalDirective
This represents '#pragma omp critical' directive.
Definition: StmtOpenMP.h:2019
clang::OMPTargetTeamsGenericLoopDirective
This represents '#pragma omp target teams loop' directive.
Definition: StmtOpenMP.h:5662
clang::OMPTargetParallelForSimdDirective
This represents '#pragma omp target parallel for simd' directive.
Definition: StmtOpenMP.h:4344
clang::OMPCaptureClause
This represents 'capture' clause in the '#pragma omp atomic' directive.
Definition: OpenMPClause.h:2194
clang::OMPFirstprivateClause
This represents clause 'firstprivate' in the '#pragma omp ...' directives.
Definition: OpenMPClause.h:2587
clang::OMPMasterTaskLoopDirective
This represents '#pragma omp master taskloop' directive.
Definition: StmtOpenMP.h:3710
clang::OMPNumTasksClause
This represents 'num_tasks' clause in the '#pragma omp ...' directive.
Definition: OpenMPClause.h:6289
clang::concepts::Requirement::RK_Compound
@ RK_Compound
Definition: ExprConcepts.h:153
clang::ConstantExpr
ConstantExpr - An expression that occurs in a constant context and optionally the result of evaluatin...
Definition: Expr.h:1032
clang::TemplateTypeParmDecl
Declaration of a template type parameter.
Definition: DeclTemplate.h:1196
clang::ObjCMessageExpr
An expression that sends a message to the given Objective-C object or class.
Definition: ExprObjC.h:940
clang::OMPTeamsDistributeDirective
This represents '#pragma omp teams distribute' directive.
Definition: StmtOpenMP.h:4476
clang::OMPAlignClause
This represents the 'align' clause in the '#pragma omp allocate' directive.
Definition: OpenMPClause.h:335
clang::OffsetOfNode
Helper class for OffsetOfExpr.
Definition: Expr.h:2340
clang::OMPUnifiedSharedMemoryClause
This represents 'unified_shared_memory' clause in the '#pragma omp requires' directive.
Definition: OpenMPClause.h:1355
clang::ChooseExpr
ChooseExpr - GNU builtin-in function __builtin_choose_expr.
Definition: Expr.h:4524
clang::ODRHash
Definition: ODRHash.h:41
clang::SEHExceptStmt
Definition: Stmt.h:3334
clang::OMPArrayShapingExpr
An explicit cast in C or a C-style cast in C++, which uses the syntax ([s1][s2]......
Definition: ExprOpenMP.h:146
clang::OMPMergeableClause
This represents 'mergeable' clause in the '#pragma omp ...' directive.
Definition: OpenMPClause.h:1940
clang::CharacterLiteral
Definition: Expr.h:1584
clang::UserDefinedLiteral
A call to a literal operator (C++11 [over.literal]) written as a user-defined literal (C++11 [lit....
Definition: ExprCXX.h:638
clang::TemplateArgument::TemplateExpansion
@ TemplateExpansion
The template argument is a pack expansion of a template name that was provided for a template templat...
Definition: TemplateBase.h:90
clang::OMPOrderClause
This represents 'order' clause in the '#pragma omp ...' directive.
Definition: OpenMPClause.h:7627
clang::OMPCancelDirective
This represents '#pragma omp cancel' directive.
Definition: StmtOpenMP.h:3511
clang::CompoundLiteralExpr
CompoundLiteralExpr - [C99 6.5.2.5].
Definition: Expr.h:3405
clang::OMPSafelenClause
This represents 'safelen' clause in the '#pragma omp ...' directive.
Definition: OpenMPClause.h:752
clang::OMPSectionsDirective
This represents '#pragma omp sections' directive.
Definition: StmtOpenMP.h:1781
clang::OMPTargetTeamsDistributeParallelForSimdDirective
This represents '#pragma omp target teams distribute parallel for simd' combined directive.
Definition: StmtOpenMP.h:4989
clang::CStyleCastExpr
CStyleCastExpr - An explicit cast in C (C99 6.5.4) or a C-style cast in C++ (C++ [expr....
Definition: Expr.h:3735
clang::GCCAsmStmt
This represents a GCC inline-assembly statement extension.
Definition: Stmt.h:3007
clang::OMPUntiedClause
This represents 'untied' clause in the '#pragma omp ...' directive.
Definition: OpenMPClause.h:1900
clang::OMPRelaxedClause
This represents 'relaxed' clause in the '#pragma omp atomic' directives.
Definition: OpenMPClause.h:2440
clang::OMPClauseWithPreInit
Class that handles pre-initialization statement for some clauses, like 'shedule', 'firstprivate' etc.
Definition: OpenMPClause.h:112
clang::OO_None
@ OO_None
Not an overloaded operator.
Definition: OperatorKinds.h:22
clang::OMPDependClause
This represents implicit clause 'depend' for the '#pragma omp task' directive.
Definition: OpenMPClause.h:4742
clang::OMPFlushDirective
This represents '#pragma omp flush' directive.
Definition: StmtOpenMP.h:2669
P
StringRef P
Definition: ASTMatchersInternal.cpp:563
clang::OMPTargetEnterDataDirective
This represents '#pragma omp target enter data' directive.
Definition: StmtOpenMP.h:3116
clang::DesignatedInitUpdateExpr
Definition: Expr.h:5367
clang::OMPSizesClause
This represents the 'sizes' clause in the '#pragma omp tile' directive.
Definition: OpenMPClause.h:880
clang::OMPInteropDirective
This represents '#pragma omp interop' directive.
Definition: StmtOpenMP.h:5327
false
#define false
Definition: stdbool.h:22
clang::OMPDistributeDirective
This represents '#pragma omp distribute' directive.
Definition: StmtOpenMP.h:3995
clang::OMPTeamsGenericLoopDirective
This represents '#pragma omp teams loop' directive.
Definition: StmtOpenMP.h:5597
clang::OMPSingleDirective
This represents '#pragma omp single' directive.
Definition: StmtOpenMP.h:1920
clang::TemplateName
Represents a C++ template name within the type system.
Definition: TemplateName.h:192
clang::ParenExpr
ParenExpr - This represents a parethesized expression, e.g.
Definition: Expr.h:2112
clang::CoyieldExpr
Represents a 'co_yield' expression.
Definition: ExprCXX.h:4866
clang::ObjCProtocolExpr
ObjCProtocolExpr used for protocol expression in Objective-C.
Definition: ExprObjC.h:504
clang::CXXDeleteExpr
Represents a delete expression for memory deallocation and destructor calls, e.g.
Definition: ExprCXX.h:2415
clang::QualType::isNull
bool isNull() const
Return true if this QualType doesn't point to a type yet.
Definition: Type.h:740
clang::BlockExpr
BlockExpr - Adaptor class for mixing a BlockDecl with expressions.
Definition: Expr.h:5970
clang::StmtExpr
StmtExpr - This is the GNU Statement Expression extension: ({int X=4; X;}).
Definition: Expr.h:4349
llvm::ArrayRef
Definition: LLVM.h:34
clang::OMPTaskLoopDirective
This represents '#pragma omp taskloop' directive.
Definition: StmtOpenMP.h:3571
clang::FunctionParmPackExpr::iterator
VarDecl *const * iterator
Iterators over the parameters which the parameter pack expanded into.
Definition: ExprCXX.h:4433
clang::OMPFilterClause
This represents 'filter' clause in the '#pragma omp ...' directive.
Definition: OpenMPClause.h:8565
clang::ODRHash::AddNestedNameSpecifier
void AddNestedNameSpecifier(const NestedNameSpecifier *NNS)
Definition: ODRHash.cpp:109
clang::Decl
Decl - This represents one declaration (or definition), e.g.
Definition: DeclBase.h:83
clang::OMPUsesAllocatorsClause::Data
Data for list of allocators.
Definition: OpenMPClause.h:8346
clang::OffsetOfNode::Base
@ Base
An implicit indirection through a C++ base class, when the field found is in a base class.
Definition: Expr.h:2352
OpenMPClause.h
clang::AddrLabelExpr
AddrLabelExpr - The GNU address of label extension, representing &&label.
Definition: Expr.h:4304
clang::CXXFunctionalCastExpr
Represents an explicit C++ type conversion that uses "functional" notation (C++ [expr....
Definition: ExprCXX.h:1726
clang::DesignatedInitExpr::Designator
Represents a single C99 designator.
Definition: Expr.h:5104
clang::OMPIsDevicePtrClause
This represents clause 'is_device_ptr' in the '#pragma omp ...' directives.
Definition: OpenMPClause.h:7324
clang::OMPNogroupClause
This represents 'nogroup' clause in the '#pragma omp ...' directive.
Definition: OpenMPClause.h:6247
clang::ArraySubscriptExpr
ArraySubscriptExpr - [C99 6.5.2.1] Array Subscripting.
Definition: Expr.h:2645
clang::CXXUuidofExpr
A Microsoft C++ __uuidof expression, which gets the _GUID that corresponds to the supplied type or ex...
Definition: ExprCXX.h:1056
clang::DependentScopeDeclRefExpr
A qualified reference to a name whose declaration cannot yet be resolved.
Definition: ExprCXX.h:3208
clang::DoStmt
DoStmt - This represents a 'do/while' stmt.
Definition: Stmt.h:2483
clang::ASTContext::getCanonicalTemplateName
TemplateName getCanonicalTemplateName(const TemplateName &Name) const
Retrieves the "canonical" template name that refers to a given template.
Definition: ASTContext.cpp:6145
StmtVisitor.h
clang::CXXNullPtrLiteralExpr
The null pointer literal (C++11 [lex.nullptr])
Definition: ExprCXX.h:759
clang::CoroutineBodyStmt
Represents the body of a coroutine.
Definition: StmtCXX.h:317
clang::OffsetOfNode::Field
@ Field
A field.
Definition: Expr.h:2347
clang::CoawaitExpr
Represents a 'co_await' expression.
Definition: ExprCXX.h:4781
clang::UnaryOperatorKind
UnaryOperatorKind
Definition: OperationKinds.h:30
clang::BreakStmt
BreakStmt - This represents a break.
Definition: Stmt.h:2728
clang::OMPAffinityClause
This represents clause 'affinity' in the '#pragma omp task'-based directives.
Definition: OpenMPClause.h:8466
clang::OverloadExpr
A reference to an overloaded function set, either an UnresolvedLookupExpr or an UnresolvedMemberExpr.
Definition: ExprCXX.h:2897
clang::OMPCancellationPointDirective
This represents '#pragma omp cancellation point' directive.
Definition: StmtOpenMP.h:3453
clang::OMPSimdlenClause
This represents 'simdlen' clause in the '#pragma omp ...' directive.
Definition: OpenMPClause.h:818
clang::OMPDispatchDirective
This represents '#pragma omp dispatch' directive.
Definition: StmtOpenMP.h:5380
clang::CXXDependentScopeMemberExpr
Represents a C++ member access expression where the actual member referenced could not be resolved be...
Definition: ExprCXX.h:3567
clang::CompoundAssignOperator
CompoundAssignOperator - For compound assignments (e.g.
Definition: Expr.h:4054
clang::BinaryOperatorKind
BinaryOperatorKind
Definition: OperationKinds.h:25
clang::CXXNoexceptExpr
Represents a C++11 noexcept expression (C++ [expr.unary.noexcept]).
Definition: ExprCXX.h:4014
clang::CXXUnresolvedConstructExpr
Describes an explicit type conversion that uses functional notion but could not be resolved because o...
Definition: ExprCXX.h:3445
clang::ConstStmtVisitor
ConstStmtVisitor - This class implements a simple visitor for Stmt subclasses.
Definition: StmtVisitor.h:193
clang::IdentifierInfo
One of these records is kept for each identifier that is lexed.
Definition: IdentifierTable.h:84
clang::OMPExecutableDirective
This is a basic class for representing single OpenMP executable directive.
Definition: StmtOpenMP.h:266
ODRHash.h
clang::OMPWriteClause
This represents 'write' clause in the '#pragma omp atomic' directive.
Definition: OpenMPClause.h:2019
clang::CXXForRangeStmt
CXXForRangeStmt - This represents C++0x [stmt.ranged]'s ranged for statement, represented as 'for (ra...
Definition: StmtCXX.h:134
clang::DeclStmt
DeclStmt - Adaptor class for mixing declarations with statements and expressions.
Definition: Stmt.h:1297
clang::ContinueStmt
ContinueStmt - This represents a continue.
Definition: Stmt.h:2698
clang::BuiltinType::getKind
Kind getKind() const
Definition: Type.h:2539
clang::OffsetOfNode::Identifier
@ Identifier
A field in a dependent type, known only by its name.
Definition: Expr.h:2349
clang::OMPFlushClause
This represents implicit clause 'flush' for the '#pragma omp flush' directive.
Definition: OpenMPClause.h:4582
clang::CXXConstCastExpr
A C++ const_cast expression (C++ [expr.const.cast]).
Definition: ExprCXX.h:562
clang::CXXThisExpr
Represents the this expression in C++.
Definition: ExprCXX.h:1142
clang::TemplateArgument::getAsDecl
ValueDecl * getAsDecl() const
Retrieve the declaration for a declaration non-type template argument.
Definition: TemplateBase.h:275
clang::ExtVectorElementExpr
ExtVectorElementExpr - This represents access to specific elements of a vector, and may occur on the ...
Definition: Expr.h:5910
clang::OMPTeamsDistributeParallelForDirective
This represents '#pragma omp teams distribute parallel for' composite directive.
Definition: StmtOpenMP.h:4676
clang::OMPExclusiveClause
This represents clause 'exclusive' in the '#pragma omp scan' directive.
Definition: OpenMPClause.h:8265
clang::TypoExpr
TypoExpr - Internal placeholder for expressions where typo correction still needs to be performed and...
Definition: Expr.h:6367
clang::PredefinedExpr
[C99 6.4.2.2] - A predefined identifier such as func.
Definition: Expr.h:1959
clang::MSDependentExistsStmt
Representation of a Microsoft __if_exists or __if_not_exists statement with a dependent name.
Definition: StmtCXX.h:252
clang::SEHFinallyStmt
Definition: Stmt.h:3378
clang::CUDAKernelCallExpr
Represents a call to a CUDA kernel function.
Definition: ExprCXX.h:232
clang::concepts::ExprRequirement::ReturnTypeRequirement
Definition: ExprConcepts.h:268
clang::OMPSimdDirective
This represents '#pragma omp simd' directive.
Definition: StmtOpenMP.h:1565
clang::Builtin::ID
ID
Definition: Builtins.h:49
clang::TemplateArgument::Type
@ Type
The template argument is a type.
Definition: TemplateBase.h:70
clang::OMPUseClause
This represents the 'use' clause in '#pragma omp ...' directives.
Definition: OpenMPClause.h:7827
clang::OMPArraySectionExpr
OpenMP 5.0 [2.1.5, Array Sections].
Definition: ExprOpenMP.h:56
clang
Definition: CalledOnceCheck.h:17
clang::OMPAcquireClause
This represents 'acquire' clause in the '#pragma omp atomic|flush' directives.
Definition: OpenMPClause.h:2358
clang::OMPTargetTeamsDirective
This represents '#pragma omp target teams' directive.
Definition: StmtOpenMP.h:4769
clang::TemplateArgument::getNullPtrType
QualType getNullPtrType() const
Retrieve the type for null non-type template argument.
Definition: TemplateBase.h:286
clang::TemplateArgument::Template
@ Template
The template argument is a template name that was provided for a template template parameter.
Definition: TemplateBase.h:86
clang::Stmt
Stmt - This represents one statement.
Definition: Stmt.h:69
clang::OMPDistributeParallelForDirective
This represents '#pragma omp distribute parallel for' composite directive.
Definition: StmtOpenMP.h:4117
clang::DefaultStmt
Definition: Stmt.h:1728
clang::ObjCAutoreleasePoolStmt
Represents Objective-C's @autoreleasepool Statement.
Definition: StmtObjC.h:393
clang::CXXCatchStmt
CXXCatchStmt - This represents a C++ catch block.
Definition: StmtCXX.h:28
clang::OMPBindClause
This represents 'bind' clause in the '#pragma omp ...' directives.
Definition: OpenMPClause.h:8634
clang::OMPAcqRelClause
This represents 'acq_rel' clause in the '#pragma omp atomic|flush' directives.
Definition: OpenMPClause.h:2317
clang::GenericSelectionExpr
Represents a C11 generic selection.
Definition: Expr.h:5628
clang::CXXScalarValueInitExpr
An expression "T()" which creates a value-initialized rvalue of type T, which is a non-class type.
Definition: ExprCXX.h:2093
clang::ObjCIsaExpr
ObjCIsaExpr - Represent X->isa and X.isa when X is an ObjC 'id' type.
Definition: ExprObjC.h:1482
clang::OMPUnrollDirective
This represents the '#pragma omp unroll' loop transformation directive.
Definition: StmtOpenMP.h:5200
clang::CXXNamedCastExpr
Abstract class common to all of the C++ "named"/"keyword" casts.
Definition: ExprCXX.h:373
clang::OMPTargetDirective
This represents '#pragma omp target' directive.
Definition: StmtOpenMP.h:3008
clang::OMPGenericLoopDirective
This represents '#pragma omp loop' directive.
Definition: StmtOpenMP.h:5535
clang::OMPTargetUpdateDirective
This represents '#pragma omp target update' directive.
Definition: StmtOpenMP.h:4061
clang::ImplicitCastExpr
ImplicitCastExpr - Allows us to explicitly represent implicit type conversions, which have no direct ...
Definition: Expr.h:3619
clang::VAArgExpr
Represents a call to the builtin function __builtin_va_arg.
Definition: Expr.h:4633
clang::OMPOrderedDirective
This represents '#pragma omp ordered' directive.
Definition: StmtOpenMP.h:2773
clang::SourceLocExpr
Represents a function call to one of __builtin_LINE(), __builtin_COLUMN(), __builtin_FUNCTION(),...
Definition: Expr.h:4682
clang::MemberExpr
MemberExpr - [C99 6.5.2.3] Structure and Union Members.
Definition: Expr.h:3164
clang::OMPThreadLimitClause
This represents 'thread_limit' clause in the '#pragma omp ...' directive.
Definition: OpenMPClause.h:6029
clang::OMPReadClause
This represents 'read' clause in the '#pragma omp atomic' directive.
Definition: OpenMPClause.h:1980
clang::QualType::getAsOpaquePtr
void * getAsOpaquePtr() const
Definition: Type.h:720
clang::OMPUpdateClause
This represents 'update' clause in the '#pragma omp atomic' directive.
Definition: OpenMPClause.h:2067
clang::OMPNontemporalClause
This represents clause 'nontemporal' in the '#pragma omp ...' directives.
Definition: OpenMPClause.h:7530
clang::OMPDistributeSimdDirective
This represents '#pragma omp distribute simd' composite directive.
Definition: StmtOpenMP.h:4278
clang::OMPParallelMasterTaskLoopSimdDirective
This represents '#pragma omp parallel master taskloop simd' directive.
Definition: StmtOpenMP.h:3930
clang::GNUNullExpr
GNUNullExpr - Implements the GNU __null extension, which is a name for a null pointer constant that h...
Definition: Expr.h:4599
clang::CXXStdInitializerListExpr
Implicit construction of a std::initializer_list<T> object from an array temporary within list-initia...
Definition: ExprCXX.h:791
clang::concepts::Requirement::RK_Nested
@ RK_Nested
Definition: ExprConcepts.h:153
clang::OMPNumThreadsClause
This represents 'num_threads' clause in the '#pragma omp ...' directive.
Definition: OpenMPClause.h:675
clang::Expr
This represents one expression.
Definition: Expr.h:109
clang::OMPTargetDataDirective
This represents '#pragma omp target data' directive.
Definition: StmtOpenMP.h:3062
clang::CXXDefaultInitExpr
A use of a default initializer in a constructor or in aggregate initialization.
Definition: ExprCXX.h:1318
clang::OMPCopyprivateClause
This represents clause 'copyprivate' in the '#pragma omp ...' directives.
Definition: OpenMPClause.h:4414
clang::OMPTargetSimdDirective
This represents '#pragma omp target simd' directive.
Definition: StmtOpenMP.h:4411
clang::concepts::Requirement::RK_Type
@ RK_Type
Definition: ExprConcepts.h:153
clang::CastExpr
CastExpr - Base class for type casts, including both implicit casts (ImplicitCastExpr) and explicit c...
Definition: Expr.h:3475
clang::MSAsmStmt
This represents a Microsoft inline-assembly statement extension.
Definition: Stmt.h:3230
clang::DeclRefExpr
A reference to a declared variable, function, enum, etc.
Definition: Expr.h:1223
clang::OMPFinalClause
This represents 'final' clause in the '#pragma omp ...' directive.
Definition: OpenMPClause.h:606
clang::OMPTaskLoopSimdDirective
This represents '#pragma omp taskloop simd' directive.
Definition: StmtOpenMP.h:3644
clang::OMPTargetParallelForDirective
This represents '#pragma omp target parallel for' directive.
Definition: StmtOpenMP.h:3305
clang::CallExpr
CallExpr - Represents a function call (C99 6.5.2.2, C++ [expr.call]).
Definition: Expr.h:2801
clang::OMPParallelSectionsDirective
This represents '#pragma omp parallel sections' directive.
Definition: StmtOpenMP.h:2316
clang::CXXOperatorCallExpr
A call to an overloaded operator written using operator syntax.
Definition: ExprCXX.h:82
clang::ShuffleVectorExpr
ShuffleVectorExpr - clang-specific builtin-in function __builtin_shufflevector.
Definition: Expr.h:4397
clang::CXXConstructExpr
Represents a call to a C++ constructor.
Definition: ExprCXX.h:1460
clang::ObjCIvarRefExpr
ObjCIvarRefExpr - A reference to an ObjC instance variable.
Definition: ExprObjC.h:548
clang::OMPAtomicDirective
This represents '#pragma omp atomic' directive.
Definition: StmtOpenMP.h:2827
clang::CXXMemberCallExpr
Represents a call to a member function that may be written either with member call syntax (e....
Definition: ExprCXX.h:177
clang::ExplicitCastExpr
ExplicitCastExpr - An explicit cast written in the source code.
Definition: Expr.h:3697
clang::ASTContext::getCanonicalNestedNameSpecifier
NestedNameSpecifier * getCanonicalNestedNameSpecifier(NestedNameSpecifier *NNS) const
Retrieves the "canonical" nested name specifier for a given nested name specifier.
Definition: ASTContext.cpp:6619
clang::ReturnStmt
ReturnStmt - This represents a return, optionally of an expression: return; return 4;.
Definition: Stmt.h:2765
clang::TemplateArgument::getAsType
QualType getAsType() const
Retrieve the type for a type template argument.
Definition: TemplateBase.h:268
clang::SEHLeaveStmt
Represents a __leave statement.
Definition: Stmt.h:3466
clang::TemplateArgument::Pack
@ Pack
The template argument is actually a parameter pack.
Definition: TemplateBase.h:100
clang::OMPTeamsDistributeParallelForSimdDirective
This represents '#pragma omp teams distribute parallel for simd' composite directive.
Definition: StmtOpenMP.h:4609
clang::OMPBarrierDirective
This represents '#pragma omp barrier' directive.
Definition: StmtOpenMP.h:2505
clang::SYCLUniqueStableNameExpr
Definition: Expr.h:2056
clang::OMPFromClause
This represents clause 'from' in the '#pragma omp ...' directives.
Definition: OpenMPClause.h:6855