clang 8.0.0

StmtProfile.cpp
Go to the documentation of this file.
1 //===---- StmtProfile.cpp - Profile implementation for Stmt ASTs ----------===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file implements the Stmt::Profile method, which builds a unique bit
11 // representation that identifies a statement/expression.
12 //
13 //===----------------------------------------------------------------------===//
14 #include "clang/AST/ASTContext.h"
15 #include "clang/AST/DeclCXX.h"
16 #include "clang/AST/DeclObjC.h"
17 #include "clang/AST/DeclTemplate.h"
18 #include "clang/AST/Expr.h"
19 #include "clang/AST/ExprCXX.h"
20 #include "clang/AST/ExprObjC.h"
21 #include "clang/AST/ExprOpenMP.h"
22 #include "clang/AST/ODRHash.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 virtual void HandleStmtClass(Stmt::StmtClass SC) = 0;
42
43 #define STMT(Node, Base) void Visit##Node(const Node *S);
44 #include "clang/AST/StmtNodes.inc"
45
46 /// Visit a declaration that is referenced within an expression
47 /// or statement.
48 virtual void VisitDecl(const Decl *D) = 0;
49
50 /// Visit a type that is referenced within an expression or
51 /// statement.
52 virtual void VisitType(QualType T) = 0;
53
54 /// Visit a name that occurs within an expression or statement.
55 virtual void VisitName(DeclarationName Name, bool TreatAsDecl = false) = 0;
56
57 /// Visit identifiers that are not in Decl's or Type's.
58 virtual void VisitIdentifierInfo(IdentifierInfo *II) = 0;
59
60 /// Visit a nested-name-specifier that occurs within an expression
61 /// or statement.
62 virtual void VisitNestedNameSpecifier(NestedNameSpecifier *NNS) = 0;
63
64 /// Visit a template name that occurs within an expression or
65 /// statement.
66 virtual void VisitTemplateName(TemplateName Name) = 0;
67
68 /// Visit template arguments that occur within an expression or
69 /// statement.
70 void VisitTemplateArguments(const TemplateArgumentLoc *Args,
71 unsigned NumArgs);
72
73 /// Visit a single template argument.
74 void VisitTemplateArgument(const TemplateArgument &Arg);
75 };
76
77 class StmtProfilerWithPointers : public StmtProfiler {
78 const ASTContext &Context;
79
80 public:
81 StmtProfilerWithPointers(llvm::FoldingSetNodeID &ID,
82 const ASTContext &Context, bool Canonical)
83 : StmtProfiler(ID, Canonical), Context(Context) {}
84 private:
85 void HandleStmtClass(Stmt::StmtClass SC) override {
86 ID.AddInteger(SC);
87 }
88
89 void VisitDecl(const Decl *D) override {
90 ID.AddInteger(D ? D->getKind() : 0);
91
92 if (Canonical && D) {
93 if (const NonTypeTemplateParmDecl *NTTP =
94 dyn_cast<NonTypeTemplateParmDecl>(D)) {
95 ID.AddInteger(NTTP->getDepth());
96 ID.AddInteger(NTTP->getIndex());
97 ID.AddBoolean(NTTP->isParameterPack());
98 VisitType(NTTP->getType());
99 return;
100 }
101
102 if (const ParmVarDecl *Parm = dyn_cast<ParmVarDecl>(D)) {
103 // The Itanium C++ ABI uses the type, scope depth, and scope
104 // index of a parameter when mangling expressions that involve
105 // function parameters, so we will use the parameter's type for
106 // establishing function parameter identity. That way, our
107 // definition of "equivalent" (per C++ [temp.over.link]) is at
108 // least as strong as the definition of "equivalent" used for
109 // name mangling.
110 VisitType(Parm->getType());
111 ID.AddInteger(Parm->getFunctionScopeDepth());
112 ID.AddInteger(Parm->getFunctionScopeIndex());
113 return;
114 }
115
116 if (const TemplateTypeParmDecl *TTP =
117 dyn_cast<TemplateTypeParmDecl>(D)) {
118 ID.AddInteger(TTP->getDepth());
119 ID.AddInteger(TTP->getIndex());
120 ID.AddBoolean(TTP->isParameterPack());
121 return;
122 }
123
124 if (const TemplateTemplateParmDecl *TTP =
125 dyn_cast<TemplateTemplateParmDecl>(D)) {
126 ID.AddInteger(TTP->getDepth());
127 ID.AddInteger(TTP->getIndex());
128 ID.AddBoolean(TTP->isParameterPack());
129 return;
130 }
131 }
132
133 ID.AddPointer(D ? D->getCanonicalDecl() : nullptr);
134 }
135
136 void VisitType(QualType T) override {
137 if (Canonical && !T.isNull())
138 T = Context.getCanonicalType(T);
139
140 ID.AddPointer(T.getAsOpaquePtr());
141 }
142
143 void VisitName(DeclarationName Name, bool /*TreatAsDecl*/) override {
144 ID.AddPointer(Name.getAsOpaquePtr());
145 }
146
147 void VisitIdentifierInfo(IdentifierInfo *II) override {
148 ID.AddPointer(II);
149 }
150
151 void VisitNestedNameSpecifier(NestedNameSpecifier *NNS) override {
152 if (Canonical)
153 NNS = Context.getCanonicalNestedNameSpecifier(NNS);
154 ID.AddPointer(NNS);
155 }
156
157 void VisitTemplateName(TemplateName Name) override {
158 if (Canonical)
159 Name = Context.getCanonicalTemplateName(Name);
160
161 Name.Profile(ID);
162 }
163 };
164
165 class StmtProfilerWithoutPointers : public StmtProfiler {
166 ODRHash &Hash;
167 public:
168 StmtProfilerWithoutPointers(llvm::FoldingSetNodeID &ID, ODRHash &Hash)
169 : StmtProfiler(ID, false), Hash(Hash) {}
170
171 private:
172 void HandleStmtClass(Stmt::StmtClass SC) override {
173 if (SC == Stmt::UnresolvedLookupExprClass) {
174 // Pretend that the name looked up is a Decl due to how templates
175 // handle some Decl lookups.
176 ID.AddInteger(Stmt::DeclRefExprClass);
177 } else {
178 ID.AddInteger(SC);
179 }
180 }
181
182 void VisitType(QualType T) override {
183 Hash.AddQualType(T);
184 }
185
186 void VisitName(DeclarationName Name, bool TreatAsDecl) override {
187 if (TreatAsDecl) {
188 // A Decl can be null, so each Decl is preceded by a boolean to
189 // store its nullness. Add a boolean here to match.
190 ID.AddBoolean(true);
191 }
192 Hash.AddDeclarationName(Name, TreatAsDecl);
193 }
194 void VisitIdentifierInfo(IdentifierInfo *II) override {
195 ID.AddBoolean(II);
196 if (II) {
197 Hash.AddIdentifierInfo(II);
198 }
199 }
200 void VisitDecl(const Decl *D) override {
201 ID.AddBoolean(D);
202 if (D) {
203 Hash.AddDecl(D);
204 }
205 }
206 void VisitTemplateName(TemplateName Name) override {
207 Hash.AddTemplateName(Name);
208 }
209 void VisitNestedNameSpecifier(NestedNameSpecifier *NNS) override {
210 ID.AddBoolean(NNS);
211 if (NNS) {
212 Hash.AddNestedNameSpecifier(NNS);
213 }
214 }
215 };
216 }
217
218 void StmtProfiler::VisitStmt(const Stmt *S) {
219 assert(S && "Requires non-null Stmt pointer");
220
221 HandleStmtClass(S->getStmtClass());
222
223 for (const Stmt *SubStmt : S->children()) {
224 if (SubStmt)
225 Visit(SubStmt);
226 else
227 ID.AddInteger(0);
228 }
229 }
230
231 void StmtProfiler::VisitDeclStmt(const DeclStmt *S) {
232 VisitStmt(S);
233 for (const auto *D : S->decls())
234 VisitDecl(D);
235 }
236
237 void StmtProfiler::VisitNullStmt(const NullStmt *S) {
238 VisitStmt(S);
239 }
240
241 void StmtProfiler::VisitCompoundStmt(const CompoundStmt *S) {
242 VisitStmt(S);
243 }
244
245 void StmtProfiler::VisitCaseStmt(const CaseStmt *S) {
246 VisitStmt(S);
247 }
248
249 void StmtProfiler::VisitDefaultStmt(const DefaultStmt *S) {
250 VisitStmt(S);
251 }
252
253 void StmtProfiler::VisitLabelStmt(const LabelStmt *S) {
254 VisitStmt(S);
255 VisitDecl(S->getDecl());
256 }
257
258 void StmtProfiler::VisitAttributedStmt(const AttributedStmt *S) {
259 VisitStmt(S);
260 // TODO: maybe visit attributes?
261 }
262
263 void StmtProfiler::VisitIfStmt(const IfStmt *S) {
264 VisitStmt(S);
265 VisitDecl(S->getConditionVariable());
266 }
267
268 void StmtProfiler::VisitSwitchStmt(const SwitchStmt *S) {
269 VisitStmt(S);
270 VisitDecl(S->getConditionVariable());
271 }
272
273 void StmtProfiler::VisitWhileStmt(const WhileStmt *S) {
274 VisitStmt(S);
275 VisitDecl(S->getConditionVariable());
276 }
277
278 void StmtProfiler::VisitDoStmt(const DoStmt *S) {
279 VisitStmt(S);
280 }
281
282 void StmtProfiler::VisitForStmt(const ForStmt *S) {
283 VisitStmt(S);
284 }
285
286 void StmtProfiler::VisitGotoStmt(const GotoStmt *S) {
287 VisitStmt(S);
288 VisitDecl(S->getLabel());
289 }
290
291 void StmtProfiler::VisitIndirectGotoStmt(const IndirectGotoStmt *S) {
292 VisitStmt(S);
293 }
294
295 void StmtProfiler::VisitContinueStmt(const ContinueStmt *S) {
296 VisitStmt(S);
297 }
298
299 void StmtProfiler::VisitBreakStmt(const BreakStmt *S) {
300 VisitStmt(S);
301 }
302
303 void StmtProfiler::VisitReturnStmt(const ReturnStmt *S) {
304 VisitStmt(S);
305 }
306
307 void StmtProfiler::VisitGCCAsmStmt(const GCCAsmStmt *S) {
308 VisitStmt(S);
309 ID.AddBoolean(S->isVolatile());
310 ID.AddBoolean(S->isSimple());
311 VisitStringLiteral(S->getAsmString());
312 ID.AddInteger(S->getNumOutputs());
313 for (unsigned I = 0, N = S->getNumOutputs(); I != N; ++I) {
314 ID.AddString(S->getOutputName(I));
315 VisitStringLiteral(S->getOutputConstraintLiteral(I));
316 }
317 ID.AddInteger(S->getNumInputs());
318 for (unsigned I = 0, N = S->getNumInputs(); I != N; ++I) {
319 ID.AddString(S->getInputName(I));
320 VisitStringLiteral(S->getInputConstraintLiteral(I));
321 }
322 ID.AddInteger(S->getNumClobbers());
323 for (unsigned I = 0, N = S->getNumClobbers(); I != N; ++I)
324 VisitStringLiteral(S->getClobberStringLiteral(I));
325 }
326
327 void StmtProfiler::VisitMSAsmStmt(const MSAsmStmt *S) {
328 // FIXME: Implement MS style inline asm statement profiler.
329 VisitStmt(S);
330 }
331
332 void StmtProfiler::VisitCXXCatchStmt(const CXXCatchStmt *S) {
333 VisitStmt(S);
334 VisitType(S->getCaughtType());
335 }
336
337 void StmtProfiler::VisitCXXTryStmt(const CXXTryStmt *S) {
338 VisitStmt(S);
339 }
340
341 void StmtProfiler::VisitCXXForRangeStmt(const CXXForRangeStmt *S) {
342 VisitStmt(S);
343 }
344
345 void StmtProfiler::VisitMSDependentExistsStmt(const MSDependentExistsStmt *S) {
346 VisitStmt(S);
347 ID.AddBoolean(S->isIfExists());
348 VisitNestedNameSpecifier(S->getQualifierLoc().getNestedNameSpecifier());
349 VisitName(S->getNameInfo().getName());
350 }
351
352 void StmtProfiler::VisitSEHTryStmt(const SEHTryStmt *S) {
353 VisitStmt(S);
354 }
355
356 void StmtProfiler::VisitSEHFinallyStmt(const SEHFinallyStmt *S) {
357 VisitStmt(S);
358 }
359
360 void StmtProfiler::VisitSEHExceptStmt(const SEHExceptStmt *S) {
361 VisitStmt(S);
362 }
363
364 void StmtProfiler::VisitSEHLeaveStmt(const SEHLeaveStmt *S) {
365 VisitStmt(S);
366 }
367
368 void StmtProfiler::VisitCapturedStmt(const CapturedStmt *S) {
369 VisitStmt(S);
370 }
371
372 void StmtProfiler::VisitObjCForCollectionStmt(const ObjCForCollectionStmt *S) {
373 VisitStmt(S);
374 }
375
376 void StmtProfiler::VisitObjCAtCatchStmt(const ObjCAtCatchStmt *S) {
377 VisitStmt(S);
378 ID.AddBoolean(S->hasEllipsis());
379 if (S->getCatchParamDecl())
380 VisitType(S->getCatchParamDecl()->getType());
381 }
382
383 void StmtProfiler::VisitObjCAtFinallyStmt(const ObjCAtFinallyStmt *S) {
384 VisitStmt(S);
385 }
386
387 void StmtProfiler::VisitObjCAtTryStmt(const ObjCAtTryStmt *S) {
388 VisitStmt(S);
389 }
390
391 void
392 StmtProfiler::VisitObjCAtSynchronizedStmt(const ObjCAtSynchronizedStmt *S) {
393 VisitStmt(S);
394 }
395
396 void StmtProfiler::VisitObjCAtThrowStmt(const ObjCAtThrowStmt *S) {
397 VisitStmt(S);
398 }
399
400 void
401 StmtProfiler::VisitObjCAutoreleasePoolStmt(const ObjCAutoreleasePoolStmt *S) {
402 VisitStmt(S);
403 }
404
405 namespace {
406 class OMPClauseProfiler : public ConstOMPClauseVisitor<OMPClauseProfiler> {
407 StmtProfiler *Profiler;
408 /// Process clauses with list of variables.
409 template <typename T>
410 void VisitOMPClauseList(T *Node);
411
412 public:
413 OMPClauseProfiler(StmtProfiler *P) : Profiler(P) { }
414 #define OPENMP_CLAUSE(Name, Class) \
415 void Visit##Class(const Class *C);
416 #include "clang/Basic/OpenMPKinds.def"
417 void VistOMPClauseWithPreInit(const OMPClauseWithPreInit *C);
418 void VistOMPClauseWithPostUpdate(const OMPClauseWithPostUpdate *C);
419 };
420
421 void OMPClauseProfiler::VistOMPClauseWithPreInit(
422 const OMPClauseWithPreInit *C) {
423 if (auto *S = C->getPreInitStmt())
424 Profiler->VisitStmt(S);
425 }
426
427 void OMPClauseProfiler::VistOMPClauseWithPostUpdate(
428 const OMPClauseWithPostUpdate *C) {
429 VistOMPClauseWithPreInit(C);
430 if (auto *E = C->getPostUpdateExpr())
431 Profiler->VisitStmt(E);
432 }
433
434 void OMPClauseProfiler::VisitOMPIfClause(const OMPIfClause *C) {
435 VistOMPClauseWithPreInit(C);
436 if (C->getCondition())
437 Profiler->VisitStmt(C->getCondition());
438 }
439
440 void OMPClauseProfiler::VisitOMPFinalClause(const OMPFinalClause *C) {
441 if (C->getCondition())
442 Profiler->VisitStmt(C->getCondition());
443 }
444
445 void OMPClauseProfiler::VisitOMPNumThreadsClause(const OMPNumThreadsClause *C) {
446 VistOMPClauseWithPreInit(C);
447 if (C->getNumThreads())
448 Profiler->VisitStmt(C->getNumThreads());
449 }
450
451 void OMPClauseProfiler::VisitOMPSafelenClause(const OMPSafelenClause *C) {
452 if (C->getSafelen())
453 Profiler->VisitStmt(C->getSafelen());
454 }
455
456 void OMPClauseProfiler::VisitOMPSimdlenClause(const OMPSimdlenClause *C) {
457 if (C->getSimdlen())
458 Profiler->VisitStmt(C->getSimdlen());
459 }
460
461 void OMPClauseProfiler::VisitOMPCollapseClause(const OMPCollapseClause *C) {
462 if (C->getNumForLoops())
463 Profiler->VisitStmt(C->getNumForLoops());
464 }
465
466 void OMPClauseProfiler::VisitOMPDefaultClause(const OMPDefaultClause *C) { }
467
468 void OMPClauseProfiler::VisitOMPProcBindClause(const OMPProcBindClause *C) { }
469
470 void OMPClauseProfiler::VisitOMPUnifiedAddressClause(
471 const OMPUnifiedAddressClause *C) {}
472
473 void OMPClauseProfiler::VisitOMPUnifiedSharedMemoryClause(
474 const OMPUnifiedSharedMemoryClause *C) {}
475
476 void OMPClauseProfiler::VisitOMPReverseOffloadClause(
477 const OMPReverseOffloadClause *C) {}
478
479 void OMPClauseProfiler::VisitOMPDynamicAllocatorsClause(
480 const OMPDynamicAllocatorsClause *C) {}
481
482 void OMPClauseProfiler::VisitOMPAtomicDefaultMemOrderClause(
483 const OMPAtomicDefaultMemOrderClause *C) {}
484
485 void OMPClauseProfiler::VisitOMPScheduleClause(const OMPScheduleClause *C) {
486 VistOMPClauseWithPreInit(C);
487 if (auto *S = C->getChunkSize())
488 Profiler->VisitStmt(S);
489 }
490
491 void OMPClauseProfiler::VisitOMPOrderedClause(const OMPOrderedClause *C) {
492 if (auto *Num = C->getNumForLoops())
493 Profiler->VisitStmt(Num);
494 }
495
496 void OMPClauseProfiler::VisitOMPNowaitClause(const OMPNowaitClause *) {}
497
498 void OMPClauseProfiler::VisitOMPUntiedClause(const OMPUntiedClause *) {}
499
500 void OMPClauseProfiler::VisitOMPMergeableClause(const OMPMergeableClause *) {}
501
502 void OMPClauseProfiler::VisitOMPReadClause(const OMPReadClause *) {}
503
504 void OMPClauseProfiler::VisitOMPWriteClause(const OMPWriteClause *) {}
505
506 void OMPClauseProfiler::VisitOMPUpdateClause(const OMPUpdateClause *) {}
507
508 void OMPClauseProfiler::VisitOMPCaptureClause(const OMPCaptureClause *) {}
509
510 void OMPClauseProfiler::VisitOMPSeqCstClause(const OMPSeqCstClause *) {}
511
512 void OMPClauseProfiler::VisitOMPThreadsClause(const OMPThreadsClause *) {}
513
514 void OMPClauseProfiler::VisitOMPSIMDClause(const OMPSIMDClause *) {}
515
516 void OMPClauseProfiler::VisitOMPNogroupClause(const OMPNogroupClause *) {}
517
518 template<typename T>
519 void OMPClauseProfiler::VisitOMPClauseList(T *Node) {
520 for (auto *E : Node->varlists()) {
521 if (E)
522 Profiler->VisitStmt(E);
523 }
524 }
525
526 void OMPClauseProfiler::VisitOMPPrivateClause(const OMPPrivateClause *C) {
527 VisitOMPClauseList(C);
528 for (auto *E : C->private_copies()) {
529 if (E)
530 Profiler->VisitStmt(E);
531 }
532 }
533 void
534 OMPClauseProfiler::VisitOMPFirstprivateClause(const OMPFirstprivateClause *C) {
535 VisitOMPClauseList(C);
536 VistOMPClauseWithPreInit(C);
537 for (auto *E : C->private_copies()) {
538 if (E)
539 Profiler->VisitStmt(E);
540 }
541 for (auto *E : C->inits()) {
542 if (E)
543 Profiler->VisitStmt(E);
544 }
545 }
546 void
547 OMPClauseProfiler::VisitOMPLastprivateClause(const OMPLastprivateClause *C) {
548 VisitOMPClauseList(C);
549 VistOMPClauseWithPostUpdate(C);
550 for (auto *E : C->source_exprs()) {
551 if (E)
552 Profiler->VisitStmt(E);
553 }
554 for (auto *E : C->destination_exprs()) {
555 if (E)
556 Profiler->VisitStmt(E);
557 }
558 for (auto *E : C->assignment_ops()) {
559 if (E)
560 Profiler->VisitStmt(E);
561 }
562 }
563 void OMPClauseProfiler::VisitOMPSharedClause(const OMPSharedClause *C) {
564 VisitOMPClauseList(C);
565 }
566 void OMPClauseProfiler::VisitOMPReductionClause(
567 const OMPReductionClause *C) {
568 Profiler->VisitNestedNameSpecifier(
569 C->getQualifierLoc().getNestedNameSpecifier());
570 Profiler->VisitName(C->getNameInfo().getName());
571 VisitOMPClauseList(C);
572 VistOMPClauseWithPostUpdate(C);
573 for (auto *E : C->privates()) {
574 if (E)
575 Profiler->VisitStmt(E);
576 }
577 for (auto *E : C->lhs_exprs()) {
578 if (E)
579 Profiler->VisitStmt(E);
580 }
581 for (auto *E : C->rhs_exprs()) {
582 if (E)
583 Profiler->VisitStmt(E);
584 }
585 for (auto *E : C->reduction_ops()) {
586 if (E)
587 Profiler->VisitStmt(E);
588 }
589 }
590 void OMPClauseProfiler::VisitOMPTaskReductionClause(
591 const OMPTaskReductionClause *C) {
592 Profiler->VisitNestedNameSpecifier(
593 C->getQualifierLoc().getNestedNameSpecifier());
594 Profiler->VisitName(C->getNameInfo().getName());
595 VisitOMPClauseList(C);
596 VistOMPClauseWithPostUpdate(C);
597 for (auto *E : C->privates()) {
598 if (E)
599 Profiler->VisitStmt(E);
600 }
601 for (auto *E : C->lhs_exprs()) {
602 if (E)
603 Profiler->VisitStmt(E);
604 }
605 for (auto *E : C->rhs_exprs()) {
606 if (E)
607 Profiler->VisitStmt(E);
608 }
609 for (auto *E : C->reduction_ops()) {
610 if (E)
611 Profiler->VisitStmt(E);
612 }
613 }
614 void OMPClauseProfiler::VisitOMPInReductionClause(
615 const OMPInReductionClause *C) {
616 Profiler->VisitNestedNameSpecifier(
617 C->getQualifierLoc().getNestedNameSpecifier());
618 Profiler->VisitName(C->getNameInfo().getName());
619 VisitOMPClauseList(C);
620 VistOMPClauseWithPostUpdate(C);
621 for (auto *E : C->privates()) {
622 if (E)
623 Profiler->VisitStmt(E);
624 }
625 for (auto *E : C->lhs_exprs()) {
626 if (E)
627 Profiler->VisitStmt(E);
628 }
629 for (auto *E : C->rhs_exprs()) {
630 if (E)
631 Profiler->VisitStmt(E);
632 }
633 for (auto *E : C->reduction_ops()) {
634 if (E)
635 Profiler->VisitStmt(E);
636 }
637 for (auto *E : C->taskgroup_descriptors()) {
638 if (E)
639 Profiler->VisitStmt(E);
640 }
641 }
642 void OMPClauseProfiler::VisitOMPLinearClause(const OMPLinearClause *C) {
643 VisitOMPClauseList(C);
644 VistOMPClauseWithPostUpdate(C);
645 for (auto *E : C->privates()) {
646 if (E)
647 Profiler->VisitStmt(E);
648 }
649 for (auto *E : C->inits()) {
650 if (E)
651 Profiler->VisitStmt(E);
652 }
653 for (auto *E : C->updates()) {
654 if (E)
655 Profiler->VisitStmt(E);
656 }
657 for (auto *E : C->finals()) {
658 if (E)
659 Profiler->VisitStmt(E);
660 }
661 if (C->getStep())
662 Profiler->VisitStmt(C->getStep());
663 if (C->getCalcStep())
664 Profiler->VisitStmt(C->getCalcStep());
665 }
666 void OMPClauseProfiler::VisitOMPAlignedClause(const OMPAlignedClause *C) {
667 VisitOMPClauseList(C);
668 if (C->getAlignment())
669 Profiler->VisitStmt(C->getAlignment());
670 }
671 void OMPClauseProfiler::VisitOMPCopyinClause(const OMPCopyinClause *C) {
672 VisitOMPClauseList(C);
673 for (auto *E : C->source_exprs()) {
674 if (E)
675 Profiler->VisitStmt(E);
676 }
677 for (auto *E : C->destination_exprs()) {
678 if (E)
679 Profiler->VisitStmt(E);
680 }
681 for (auto *E : C->assignment_ops()) {
682 if (E)
683 Profiler->VisitStmt(E);
684 }
685 }
686 void
687 OMPClauseProfiler::VisitOMPCopyprivateClause(const OMPCopyprivateClause *C) {
688 VisitOMPClauseList(C);
689 for (auto *E : C->source_exprs()) {
690 if (E)
691 Profiler->VisitStmt(E);
692 }
693 for (auto *E : C->destination_exprs()) {
694 if (E)
695 Profiler->VisitStmt(E);
696 }
697 for (auto *E : C->assignment_ops()) {
698 if (E)
699 Profiler->VisitStmt(E);
700 }
701 }
702 void OMPClauseProfiler::VisitOMPFlushClause(const OMPFlushClause *C) {
703 VisitOMPClauseList(C);
704 }
705 void OMPClauseProfiler::VisitOMPDependClause(const OMPDependClause *C) {
706 VisitOMPClauseList(C);
707 }
708 void OMPClauseProfiler::VisitOMPDeviceClause(const OMPDeviceClause *C) {
709 if (C->getDevice())
710 Profiler->VisitStmt(C->getDevice());
711 }
712 void OMPClauseProfiler::VisitOMPMapClause(const OMPMapClause *C) {
713 VisitOMPClauseList(C);
714 }
715 void OMPClauseProfiler::VisitOMPNumTeamsClause(const OMPNumTeamsClause *C) {
716 VistOMPClauseWithPreInit(C);
717 if (C->getNumTeams())
718 Profiler->VisitStmt(C->getNumTeams());
719 }
720 void OMPClauseProfiler::VisitOMPThreadLimitClause(
721 const OMPThreadLimitClause *C) {
722 VistOMPClauseWithPreInit(C);
723 if (C->getThreadLimit())
724 Profiler->VisitStmt(C->getThreadLimit());
725 }
726 void OMPClauseProfiler::VisitOMPPriorityClause(const OMPPriorityClause *C) {
727 if (C->getPriority())
728 Profiler->VisitStmt(C->getPriority());
729 }
730 void OMPClauseProfiler::VisitOMPGrainsizeClause(const OMPGrainsizeClause *C) {
731 if (C->getGrainsize())
732 Profiler->VisitStmt(C->getGrainsize());
733 }
734 void OMPClauseProfiler::VisitOMPNumTasksClause(const OMPNumTasksClause *C) {
735 if (C->getNumTasks())
736 Profiler->VisitStmt(C->getNumTasks());
737 }
738 void OMPClauseProfiler::VisitOMPHintClause(const OMPHintClause *C) {
739 if (C->getHint())
740 Profiler->VisitStmt(C->getHint());
741 }
742 void OMPClauseProfiler::VisitOMPToClause(const OMPToClause *C) {
743 VisitOMPClauseList(C);
744 }
745 void OMPClauseProfiler::VisitOMPFromClause(const OMPFromClause *C) {
746 VisitOMPClauseList(C);
747 }
748 void OMPClauseProfiler::VisitOMPUseDevicePtrClause(
749 const OMPUseDevicePtrClause *C) {
750 VisitOMPClauseList(C);
751 }
752 void OMPClauseProfiler::VisitOMPIsDevicePtrClause(
753 const OMPIsDevicePtrClause *C) {
754 VisitOMPClauseList(C);
755 }
756 }
757
758 void
759 StmtProfiler::VisitOMPExecutableDirective(const OMPExecutableDirective *S) {
760 VisitStmt(S);
761 OMPClauseProfiler P(this);
762 ArrayRef<OMPClause *> Clauses = S->clauses();
763 for (ArrayRef<OMPClause *>::iterator I = Clauses.begin(), E = Clauses.end();
764 I != E; ++I)
765 if (*I)
766 P.Visit(*I);
767 }
768
769 void StmtProfiler::VisitOMPLoopDirective(const OMPLoopDirective *S) {
770 VisitOMPExecutableDirective(S);
771 }
772
773 void StmtProfiler::VisitOMPParallelDirective(const OMPParallelDirective *S) {
774 VisitOMPExecutableDirective(S);
775 }
776
777 void StmtProfiler::VisitOMPSimdDirective(const OMPSimdDirective *S) {
778 VisitOMPLoopDirective(S);
779 }
780
781 void StmtProfiler::VisitOMPForDirective(const OMPForDirective *S) {
782 VisitOMPLoopDirective(S);
783 }
784
785 void StmtProfiler::VisitOMPForSimdDirective(const OMPForSimdDirective *S) {
786 VisitOMPLoopDirective(S);
787 }
788
789 void StmtProfiler::VisitOMPSectionsDirective(const OMPSectionsDirective *S) {
790 VisitOMPExecutableDirective(S);
791 }
792
793 void StmtProfiler::VisitOMPSectionDirective(const OMPSectionDirective *S) {
794 VisitOMPExecutableDirective(S);
795 }
796
797 void StmtProfiler::VisitOMPSingleDirective(const OMPSingleDirective *S) {
798 VisitOMPExecutableDirective(S);
799 }
800
801 void StmtProfiler::VisitOMPMasterDirective(const OMPMasterDirective *S) {
802 VisitOMPExecutableDirective(S);
803 }
804
805 void StmtProfiler::VisitOMPCriticalDirective(const OMPCriticalDirective *S) {
806 VisitOMPExecutableDirective(S);
807 VisitName(S->getDirectiveName().getName());
808 }
809
810 void
811 StmtProfiler::VisitOMPParallelForDirective(const OMPParallelForDirective *S) {
812 VisitOMPLoopDirective(S);
813 }
814
815 void StmtProfiler::VisitOMPParallelForSimdDirective(
816 const OMPParallelForSimdDirective *S) {
817 VisitOMPLoopDirective(S);
818 }
819
820 void StmtProfiler::VisitOMPParallelSectionsDirective(
821 const OMPParallelSectionsDirective *S) {
822 VisitOMPExecutableDirective(S);
823 }
824
825 void StmtProfiler::VisitOMPTaskDirective(const OMPTaskDirective *S) {
826 VisitOMPExecutableDirective(S);
827 }
828
829 void StmtProfiler::VisitOMPTaskyieldDirective(const OMPTaskyieldDirective *S) {
830 VisitOMPExecutableDirective(S);
831 }
832
833 void StmtProfiler::VisitOMPBarrierDirective(const OMPBarrierDirective *S) {
834 VisitOMPExecutableDirective(S);
835 }
836
837 void StmtProfiler::VisitOMPTaskwaitDirective(const OMPTaskwaitDirective *S) {
838 VisitOMPExecutableDirective(S);
839 }
840
841 void StmtProfiler::VisitOMPTaskgroupDirective(const OMPTaskgroupDirective *S) {
842 VisitOMPExecutableDirective(S);
843 if (const Expr *E = S->getReductionRef())
844 VisitStmt(E);
845 }
846
847 void StmtProfiler::VisitOMPFlushDirective(const OMPFlushDirective *S) {
848 VisitOMPExecutableDirective(S);
849 }
850
851 void StmtProfiler::VisitOMPOrderedDirective(const OMPOrderedDirective *S) {
852 VisitOMPExecutableDirective(S);
853 }
854
855 void StmtProfiler::VisitOMPAtomicDirective(const OMPAtomicDirective *S) {
856 VisitOMPExecutableDirective(S);
857 }
858
859 void StmtProfiler::VisitOMPTargetDirective(const OMPTargetDirective *S) {
860 VisitOMPExecutableDirective(S);
861 }
862
863 void StmtProfiler::VisitOMPTargetDataDirective(const OMPTargetDataDirective *S) {
864 VisitOMPExecutableDirective(S);
865 }
866
867 void StmtProfiler::VisitOMPTargetEnterDataDirective(
868 const OMPTargetEnterDataDirective *S) {
869 VisitOMPExecutableDirective(S);
870 }
871
872 void StmtProfiler::VisitOMPTargetExitDataDirective(
873 const OMPTargetExitDataDirective *S) {
874 VisitOMPExecutableDirective(S);
875 }
876
877 void StmtProfiler::VisitOMPTargetParallelDirective(
878 const OMPTargetParallelDirective *S) {
879 VisitOMPExecutableDirective(S);
880 }
881
882 void StmtProfiler::VisitOMPTargetParallelForDirective(
883 const OMPTargetParallelForDirective *S) {
884 VisitOMPExecutableDirective(S);
885 }
886
887 void StmtProfiler::VisitOMPTeamsDirective(const OMPTeamsDirective *S) {
888 VisitOMPExecutableDirective(S);
889 }
890
891 void StmtProfiler::VisitOMPCancellationPointDirective(
892 const OMPCancellationPointDirective *S) {
893 VisitOMPExecutableDirective(S);
894 }
895
896 void StmtProfiler::VisitOMPCancelDirective(const OMPCancelDirective *S) {
897 VisitOMPExecutableDirective(S);
898 }
899
900 void StmtProfiler::VisitOMPTaskLoopDirective(const OMPTaskLoopDirective *S) {
901 VisitOMPLoopDirective(S);
902 }
903
904 void StmtProfiler::VisitOMPTaskLoopSimdDirective(
905 const OMPTaskLoopSimdDirective *S) {
906 VisitOMPLoopDirective(S);
907 }
908
909 void StmtProfiler::VisitOMPDistributeDirective(
910 const OMPDistributeDirective *S) {
911 VisitOMPLoopDirective(S);
912 }
913
914 void OMPClauseProfiler::VisitOMPDistScheduleClause(
915 const OMPDistScheduleClause *C) {
916 VistOMPClauseWithPreInit(C);
917 if (auto *S = C->getChunkSize())
918 Profiler->VisitStmt(S);
919 }
920
921 void OMPClauseProfiler::VisitOMPDefaultmapClause(const OMPDefaultmapClause *) {}
922
923 void StmtProfiler::VisitOMPTargetUpdateDirective(
924 const OMPTargetUpdateDirective *S) {
925 VisitOMPExecutableDirective(S);
926 }
927
928 void StmtProfiler::VisitOMPDistributeParallelForDirective(
929 const OMPDistributeParallelForDirective *S) {
930 VisitOMPLoopDirective(S);
931 }
932
933 void StmtProfiler::VisitOMPDistributeParallelForSimdDirective(
934 const OMPDistributeParallelForSimdDirective *S) {
935 VisitOMPLoopDirective(S);
936 }
937
938 void StmtProfiler::VisitOMPDistributeSimdDirective(
939 const OMPDistributeSimdDirective *S) {
940 VisitOMPLoopDirective(S);
941 }
942
943 void StmtProfiler::VisitOMPTargetParallelForSimdDirective(
944 const OMPTargetParallelForSimdDirective *S) {
945 VisitOMPLoopDirective(S);
946 }
947
948 void StmtProfiler::VisitOMPTargetSimdDirective(
949 const OMPTargetSimdDirective *S) {
950 VisitOMPLoopDirective(S);
951 }
952
953 void StmtProfiler::VisitOMPTeamsDistributeDirective(
954 const OMPTeamsDistributeDirective *S) {
955 VisitOMPLoopDirective(S);
956 }
957
958 void StmtProfiler::VisitOMPTeamsDistributeSimdDirective(
959 const OMPTeamsDistributeSimdDirective *S) {
960 VisitOMPLoopDirective(S);
961 }
962
963 void StmtProfiler::VisitOMPTeamsDistributeParallelForSimdDirective(
964 const OMPTeamsDistributeParallelForSimdDirective *S) {
965 VisitOMPLoopDirective(S);
966 }
967
968 void StmtProfiler::VisitOMPTeamsDistributeParallelForDirective(
969 const OMPTeamsDistributeParallelForDirective *S) {
970 VisitOMPLoopDirective(S);
971 }
972
973 void StmtProfiler::VisitOMPTargetTeamsDirective(
974 const OMPTargetTeamsDirective *S) {
975 VisitOMPExecutableDirective(S);
976 }
977
978 void StmtProfiler::VisitOMPTargetTeamsDistributeDirective(
979 const OMPTargetTeamsDistributeDirective *S) {
980 VisitOMPLoopDirective(S);
981 }
982
983 void StmtProfiler::VisitOMPTargetTeamsDistributeParallelForDirective(
984 const OMPTargetTeamsDistributeParallelForDirective *S) {
985 VisitOMPLoopDirective(S);
986 }
987
988 void StmtProfiler::VisitOMPTargetTeamsDistributeParallelForSimdDirective(
989 const OMPTargetTeamsDistributeParallelForSimdDirective *S) {
990 VisitOMPLoopDirective(S);
991 }
992
993 void StmtProfiler::VisitOMPTargetTeamsDistributeSimdDirective(
994 const OMPTargetTeamsDistributeSimdDirective *S) {
995 VisitOMPLoopDirective(S);
996 }
997
998 void StmtProfiler::VisitExpr(const Expr *S) {
999 VisitStmt(S);
1000 }
1001
1002 void StmtProfiler::VisitConstantExpr(const ConstantExpr *S) {
1003 VisitExpr(S);
1004 }
1005
1006 void StmtProfiler::VisitDeclRefExpr(const DeclRefExpr *S) {
1007 VisitExpr(S);
1008 if (!Canonical)
1009 VisitNestedNameSpecifier(S->getQualifier());
1010 VisitDecl(S->getDecl());
1011 if (!Canonical) {
1012 ID.AddBoolean(S->hasExplicitTemplateArgs());
1013 if (S->hasExplicitTemplateArgs())
1014 VisitTemplateArguments(S->getTemplateArgs(), S->getNumTemplateArgs());
1015 }
1016 }
1017
1018 void StmtProfiler::VisitPredefinedExpr(const PredefinedExpr *S) {
1019 VisitExpr(S);
1020 ID.AddInteger(S->getIdentKind());
1021 }
1022
1023 void StmtProfiler::VisitIntegerLiteral(const IntegerLiteral *S) {
1024 VisitExpr(S);
1025 S->getValue().Profile(ID);
1026 ID.AddInteger(S->getType()->castAs<BuiltinType>()->getKind());
1027 }
1028
1029 void StmtProfiler::VisitFixedPointLiteral(const FixedPointLiteral *S) {
1030 VisitExpr(S);
1031 S->getValue().Profile(ID);
1032 ID.AddInteger(S->getType()->castAs<BuiltinType>()->getKind());
1033 }
1034
1035 void StmtProfiler::VisitCharacterLiteral(const CharacterLiteral *S) {
1036 VisitExpr(S);
1037 ID.AddInteger(S->getKind());
1038 ID.AddInteger(S->getValue());
1039 }
1040
1041 void StmtProfiler::VisitFloatingLiteral(const FloatingLiteral *S) {
1042 VisitExpr(S);
1043 S->getValue().Profile(ID);
1044 ID.AddBoolean(S->isExact());
1045 ID.AddInteger(S->getType()->castAs<BuiltinType>()->getKind());
1046 }
1047
1048 void StmtProfiler::VisitImaginaryLiteral(const ImaginaryLiteral *S) {
1049 VisitExpr(S);
1050 }
1051
1052 void StmtProfiler::VisitStringLiteral(const StringLiteral *S) {
1053 VisitExpr(S);
1054 ID.AddString(S->getBytes());
1055 ID.AddInteger(S->getKind());
1056 }
1057
1058 void StmtProfiler::VisitParenExpr(const ParenExpr *S) {
1059 VisitExpr(S);
1060 }
1061
1062 void StmtProfiler::VisitParenListExpr(const ParenListExpr *S) {
1063 VisitExpr(S);
1064 }
1065
1066 void StmtProfiler::VisitUnaryOperator(const UnaryOperator *S) {
1067 VisitExpr(S);
1068 ID.AddInteger(S->getOpcode());
1069 }
1070
1071 void StmtProfiler::VisitOffsetOfExpr(const OffsetOfExpr *S) {
1072 VisitType(S->getTypeSourceInfo()->getType());
1073 unsigned n = S->getNumComponents();
1074 for (unsigned i = 0; i < n; ++i) {
1075 const OffsetOfNode &ON = S->getComponent(i);
1076 ID.AddInteger(ON.getKind());
1077 switch (ON.getKind()) {
1078 case OffsetOfNode::Array:
1079 // Expressions handled below.
1080 break;
1081
1082 case OffsetOfNode::Field:
1083 VisitDecl(ON.getField());
1084 break;
1085
1086 case OffsetOfNode::Identifier:
1087 VisitIdentifierInfo(ON.getFieldName());
1088 break;
1089
1090 case OffsetOfNode::Base:
1091 // These nodes are implicit, and therefore don't need profiling.
1092 break;
1093 }
1094 }
1095
1096 VisitExpr(S);
1097 }
1098
1099 void
1100 StmtProfiler::VisitUnaryExprOrTypeTraitExpr(const UnaryExprOrTypeTraitExpr *S) {
1101 VisitExpr(S);
1102 ID.AddInteger(S->getKind());
1103 if (S->isArgumentType())
1104 VisitType(S->getArgumentType());
1105 }
1106
1107 void StmtProfiler::VisitArraySubscriptExpr(const ArraySubscriptExpr *S) {
1108 VisitExpr(S);
1109 }
1110
1111 void StmtProfiler::VisitOMPArraySectionExpr(const OMPArraySectionExpr *S) {
1112 VisitExpr(S);
1113 }
1114
1115 void StmtProfiler::VisitCallExpr(const CallExpr *S) {
1116 VisitExpr(S);
1117 }
1118
1119 void StmtProfiler::VisitMemberExpr(const MemberExpr *S) {
1120 VisitExpr(S);
1121 VisitDecl(S->getMemberDecl());
1122 if (!Canonical)
1123 VisitNestedNameSpecifier(S->getQualifier());
1124 ID.AddBoolean(S->isArrow());
1125 }
1126
1127 void StmtProfiler::VisitCompoundLiteralExpr(const CompoundLiteralExpr *S) {
1128 VisitExpr(S);
1129 ID.AddBoolean(S->isFileScope());
1130 }
1131
1132 void StmtProfiler::VisitCastExpr(const CastExpr *S) {
1133 VisitExpr(S);
1134 }
1135
1136 void StmtProfiler::VisitImplicitCastExpr(const ImplicitCastExpr *S) {
1137 VisitCastExpr(S);
1138 ID.AddInteger(S->getValueKind());
1139 }
1140
1141 void StmtProfiler::VisitExplicitCastExpr(const ExplicitCastExpr *S) {
1142 VisitCastExpr(S);
1143 VisitType(S->getTypeAsWritten());
1144 }
1145
1146 void StmtProfiler::VisitCStyleCastExpr(const CStyleCastExpr *S) {
1147 VisitExplicitCastExpr(S);
1148 }
1149
1150 void StmtProfiler::VisitBinaryOperator(const BinaryOperator *S) {
1151 VisitExpr(S);
1152 ID.AddInteger(S->getOpcode());
1153 }
1154
1155 void
1156 StmtProfiler::VisitCompoundAssignOperator(const CompoundAssignOperator *S) {
1157 VisitBinaryOperator(S);
1158 }
1159
1160 void StmtProfiler::VisitConditionalOperator(const ConditionalOperator *S) {
1161 VisitExpr(S);
1162 }
1163
1164 void StmtProfiler::VisitBinaryConditionalOperator(
1165 const BinaryConditionalOperator *S) {
1166 VisitExpr(S);
1167 }
1168
1169 void StmtProfiler::VisitAddrLabelExpr(const AddrLabelExpr *S) {
1170 VisitExpr(S);
1171 VisitDecl(S->getLabel());
1172 }
1173
1174 void StmtProfiler::VisitStmtExpr(const StmtExpr *S) {
1175 VisitExpr(S);
1176 }
1177
1178 void StmtProfiler::VisitShuffleVectorExpr(const ShuffleVectorExpr *S) {
1179 VisitExpr(S);
1180 }
1181
1182 void StmtProfiler::VisitConvertVectorExpr(const ConvertVectorExpr *S) {
1183 VisitExpr(S);
1184 }
1185
1186 void StmtProfiler::VisitChooseExpr(const ChooseExpr *S) {
1187 VisitExpr(S);
1188 }
1189
1190 void StmtProfiler::VisitGNUNullExpr(const GNUNullExpr *S) {
1191 VisitExpr(S);
1192 }
1193
1194 void StmtProfiler::VisitVAArgExpr(const VAArgExpr *S) {
1195 VisitExpr(S);
1196 }
1197
1198 void StmtProfiler::VisitInitListExpr(const InitListExpr *S) {
1199 if (S->getSyntacticForm()) {
1200 VisitInitListExpr(S->getSyntacticForm());
1201 return;
1202 }
1203
1204 VisitExpr(S);
1205 }
1206
1207 void StmtProfiler::VisitDesignatedInitExpr(const DesignatedInitExpr *S) {
1208 VisitExpr(S);
1209 ID.AddBoolean(S->usesGNUSyntax());
1210 for (const DesignatedInitExpr::Designator &D : S->designators()) {
1211 if (D.isFieldDesignator()) {
1212 ID.AddInteger(0);
1213 VisitName(D.getFieldName());
1214 continue;
1215 }
1216
1217 if (D.isArrayDesignator()) {
1218 ID.AddInteger(1);
1219 } else {
1220 assert(D.isArrayRangeDesignator());
1221 ID.AddInteger(2);
1222 }
1223 ID.AddInteger(D.getFirstExprIndex());
1224 }
1225 }
1226
1227 // Seems that if VisitInitListExpr() only works on the syntactic form of an
1228 // InitListExpr, then a DesignatedInitUpdateExpr is not encountered.
1229 void StmtProfiler::VisitDesignatedInitUpdateExpr(
1230 const DesignatedInitUpdateExpr *S) {
1231 llvm_unreachable("Unexpected DesignatedInitUpdateExpr in syntactic form of "
1232 "initializer");
1233 }
1234
1235 void StmtProfiler::VisitArrayInitLoopExpr(const ArrayInitLoopExpr *S) {
1236 VisitExpr(S);
1237 }
1238
1239 void StmtProfiler::VisitArrayInitIndexExpr(const ArrayInitIndexExpr *S) {
1240 VisitExpr(S);
1241 }
1242
1243 void StmtProfiler::VisitNoInitExpr(const NoInitExpr *S) {
1244 llvm_unreachable("Unexpected NoInitExpr in syntactic form of initializer");
1245 }
1246
1247 void StmtProfiler::VisitImplicitValueInitExpr(const ImplicitValueInitExpr *S) {
1248 VisitExpr(S);
1249 }
1250
1251 void StmtProfiler::VisitExtVectorElementExpr(const ExtVectorElementExpr *S) {
1252 VisitExpr(S);
1253 VisitName(&S->getAccessor());
1254 }
1255
1256 void StmtProfiler::VisitBlockExpr(const BlockExpr *S) {
1257 VisitExpr(S);
1258 VisitDecl(S->getBlockDecl());
1259 }
1260
1261 void StmtProfiler::VisitGenericSelectionExpr(const GenericSelectionExpr *S) {
1262 VisitExpr(S);
1263 for (unsigned i = 0; i != S->getNumAssocs(); ++i) {
1264 QualType T = S->getAssocType(i);
1265 if (T.isNull())
1266 ID.AddPointer(nullptr);
1267 else
1268 VisitType(T);
1269 VisitExpr(S->getAssocExpr(i));
1270 }
1271 }
1272
1273 void StmtProfiler::VisitPseudoObjectExpr(const PseudoObjectExpr *S) {
1274 VisitExpr(S);
1275 for (PseudoObjectExpr::const_semantics_iterator
1276 i = S->semantics_begin(), e = S->semantics_end(); i != e; ++i)
1277 // Normally, we would not profile the source expressions of OVEs.
1278 if (const OpaqueValueExpr *OVE = dyn_cast<OpaqueValueExpr>(*i))
1279 Visit(OVE->getSourceExpr());
1280 }
1281
1282 void StmtProfiler::VisitAtomicExpr(const AtomicExpr *S) {
1283 VisitExpr(S);
1284 ID.AddInteger(S->getOp());
1285 }
1286
1287 static Stmt::StmtClass DecodeOperatorCall(const CXXOperatorCallExpr *S,
1288 UnaryOperatorKind &UnaryOp,
1289 BinaryOperatorKind &BinaryOp) {
1290 switch (S->getOperator()) {
1291 case OO_None:
1292 case OO_New:
1293 case OO_Delete:
1294 case OO_Array_New:
1295 case OO_Array_Delete:
1296 case OO_Arrow:
1297 case OO_Call:
1298 case OO_Conditional:
1299 case NUM_OVERLOADED_OPERATORS:
1300 llvm_unreachable("Invalid operator call kind");
1301
1302 case OO_Plus:
1303 if (S->getNumArgs() == 1) {
1304 UnaryOp = UO_Plus;
1305 return Stmt::UnaryOperatorClass;
1306 }
1307
1308 BinaryOp = BO_Add;
1309 return Stmt::BinaryOperatorClass;
1310
1311 case OO_Minus:
1312 if (S->getNumArgs() == 1) {
1313 UnaryOp = UO_Minus;
1314 return Stmt::UnaryOperatorClass;
1315 }
1316
1317 BinaryOp = BO_Sub;
1318 return Stmt::BinaryOperatorClass;
1319
1320 case OO_Star:
1321 if (S->getNumArgs() == 1) {
1322 UnaryOp = UO_Deref;
1323 return Stmt::UnaryOperatorClass;
1324 }
1325
1326 BinaryOp = BO_Mul;
1327 return Stmt::BinaryOperatorClass;
1328
1329 case OO_Slash:
1330 BinaryOp = BO_Div;
1331 return Stmt::BinaryOperatorClass;
1332
1333 case OO_Percent:
1334 BinaryOp = BO_Rem;
1335 return Stmt::BinaryOperatorClass;
1336
1337 case OO_Caret:
1338 BinaryOp = BO_Xor;
1339 return Stmt::BinaryOperatorClass;
1340
1341 case OO_Amp:
1342 if (S->getNumArgs() == 1) {
1343 UnaryOp = UO_AddrOf;
1344 return Stmt::UnaryOperatorClass;
1345 }
1346
1347 BinaryOp = BO_And;
1348 return Stmt::BinaryOperatorClass;
1349
1350 case OO_Pipe:
1351 BinaryOp = BO_Or;
1352 return Stmt::BinaryOperatorClass;
1353
1354 case OO_Tilde:
1355 UnaryOp = UO_Not;
1356 return Stmt::UnaryOperatorClass;
1357
1358 case OO_Exclaim:
1359 UnaryOp = UO_LNot;
1360 return Stmt::UnaryOperatorClass;
1361
1362 case OO_Equal:
1363 BinaryOp = BO_Assign;
1364 return Stmt::BinaryOperatorClass;
1365
1366 case OO_Less:
1367 BinaryOp = BO_LT;
1368 return Stmt::BinaryOperatorClass;
1369
1370 case OO_Greater:
1371 BinaryOp = BO_GT;
1372 return Stmt::BinaryOperatorClass;
1373
1374 case OO_PlusEqual:
1375 BinaryOp = BO_AddAssign;
1376 return Stmt::CompoundAssignOperatorClass;
1377
1378 case OO_MinusEqual:
1379 BinaryOp = BO_SubAssign;
1380 return Stmt::CompoundAssignOperatorClass;
1381
1382 case OO_StarEqual:
1383 BinaryOp = BO_MulAssign;
1384 return Stmt::CompoundAssignOperatorClass;
1385
1386 case OO_SlashEqual:
1387 BinaryOp = BO_DivAssign;
1388 return Stmt::CompoundAssignOperatorClass;
1389
1390 case OO_PercentEqual:
1391 BinaryOp = BO_RemAssign;
1392 return Stmt::CompoundAssignOperatorClass;
1393
1394 case OO_CaretEqual:
1395 BinaryOp = BO_XorAssign;
1396 return Stmt::CompoundAssignOperatorClass;
1397
1398 case OO_AmpEqual:
1399 BinaryOp = BO_AndAssign;
1400 return Stmt::CompoundAssignOperatorClass;
1401
1402 case OO_PipeEqual:
1403 BinaryOp = BO_OrAssign;
1404 return Stmt::CompoundAssignOperatorClass;
1405
1406 case OO_LessLess:
1407 BinaryOp = BO_Shl;
1408 return Stmt::BinaryOperatorClass;
1409
1410 case OO_GreaterGreater:
1411 BinaryOp = BO_Shr;
1412 return Stmt::BinaryOperatorClass;
1413
1414 case OO_LessLessEqual:
1415 BinaryOp = BO_ShlAssign;
1416 return Stmt::CompoundAssignOperatorClass;
1417
1418 case OO_GreaterGreaterEqual:
1419 BinaryOp = BO_ShrAssign;
1420 return Stmt::CompoundAssignOperatorClass;
1421
1422 case OO_EqualEqual:
1423 BinaryOp = BO_EQ;
1424 return Stmt::BinaryOperatorClass;
1425
1426 case OO_ExclaimEqual:
1427 BinaryOp = BO_NE;
1428 return Stmt::BinaryOperatorClass;
1429
1430 case OO_LessEqual:
1431 BinaryOp = BO_LE;
1432 return Stmt::BinaryOperatorClass;
1433
1434 case OO_GreaterEqual:
1435 BinaryOp = BO_GE;
1436 return Stmt::BinaryOperatorClass;
1437
1438 case OO_Spaceship:
1439 // FIXME: Update this once we support <=> expressions.
1440 llvm_unreachable("<=> expressions not supported yet");
1441
1442 case OO_AmpAmp:
1443 BinaryOp = BO_LAnd;
1444 return Stmt::BinaryOperatorClass;
1445
1446 case OO_PipePipe:
1447 BinaryOp = BO_LOr;
1448 return Stmt::BinaryOperatorClass;
1449
1450 case OO_PlusPlus:
1451 UnaryOp = S->getNumArgs() == 1? UO_PreInc
1452 : UO_PostInc;
1453 return Stmt::UnaryOperatorClass;
1454
1455 case OO_MinusMinus:
1456 UnaryOp = S->getNumArgs() == 1? UO_PreDec
1457 : UO_PostDec;
1458 return Stmt::UnaryOperatorClass;
1459
1460 case OO_Comma:
1461 BinaryOp = BO_Comma;
1462 return Stmt::BinaryOperatorClass;
1463
1464 case OO_ArrowStar:
1465 BinaryOp = BO_PtrMemI;
1466 return Stmt::BinaryOperatorClass;
1467
1468 case OO_Subscript:
1469 return Stmt::ArraySubscriptExprClass;
1470
1471 case OO_Coawait:
1472 UnaryOp = UO_Coawait;
1473 return Stmt::UnaryOperatorClass;
1474 }
1475
1476 llvm_unreachable("Invalid overloaded operator expression");
1477 }
1478
1479 #if defined(_MSC_VER) && !defined(__clang__)
1480 #if _MSC_VER == 1911
1481 // Work around https://developercommunity.visualstudio.com/content/problem/84002/clang-cl-when-built-with-vc-2017-crashes-cause-vc.html
1482 // MSVC 2017 update 3 miscompiles this function, and a clang built with it
1483 // will crash in stage 2 of a bootstrap build.
1484 #pragma optimize("", off)
1485 #endif
1486 #endif
1487
1488 void StmtProfiler::VisitCXXOperatorCallExpr(const CXXOperatorCallExpr *S) {
1489 if (S->isTypeDependent()) {
1490 // Type-dependent operator calls are profiled like their underlying
1491 // syntactic operator.
1492 //
1493 // An operator call to operator-> is always implicit, so just skip it. The
1494 // enclosing MemberExpr will profile the actual member access.
1495 if (S->getOperator() == OO_Arrow)
1496 return Visit(S->getArg(0));
1497
1498 UnaryOperatorKind UnaryOp = UO_Extension;
1499 BinaryOperatorKind BinaryOp = BO_Comma;
1500 Stmt::StmtClass SC = DecodeOperatorCall(S, UnaryOp, BinaryOp);
1501
1502 ID.AddInteger(SC);
1503 for (unsigned I = 0, N = S->getNumArgs(); I != N; ++I)
1504 Visit(S->getArg(I));
1505 if (SC == Stmt::UnaryOperatorClass)
1506 ID.AddInteger(UnaryOp);
1507 else if (SC == Stmt::BinaryOperatorClass ||
1508 SC == Stmt::CompoundAssignOperatorClass)
1509 ID.AddInteger(BinaryOp);
1510 else
1511 assert(SC == Stmt::ArraySubscriptExprClass);
1512
1513 return;
1514 }
1515
1516 VisitCallExpr(S);
1517 ID.AddInteger(S->getOperator());
1518 }
1519
1520 #if defined(_MSC_VER) && !defined(__clang__)
1521 #if _MSC_VER == 1911
1522 #pragma optimize("", on)
1523 #endif
1524 #endif
1525
1526 void StmtProfiler::VisitCXXMemberCallExpr(const CXXMemberCallExpr *S) {
1527 VisitCallExpr(S);
1528 }
1529
1530 void StmtProfiler::VisitCUDAKernelCallExpr(const CUDAKernelCallExpr *S) {
1531 VisitCallExpr(S);
1532 }
1533
1534 void StmtProfiler::VisitAsTypeExpr(const AsTypeExpr *S) {
1535 VisitExpr(S);
1536 }
1537
1538 void StmtProfiler::VisitCXXNamedCastExpr(const CXXNamedCastExpr *S) {
1539 VisitExplicitCastExpr(S);
1540 }
1541
1542 void StmtProfiler::VisitCXXStaticCastExpr(const CXXStaticCastExpr *S) {
1543 VisitCXXNamedCastExpr(S);
1544 }
1545
1546 void StmtProfiler::VisitCXXDynamicCastExpr(const CXXDynamicCastExpr *S) {
1547 VisitCXXNamedCastExpr(S);
1548 }
1549
1550 void
1551 StmtProfiler::VisitCXXReinterpretCastExpr(const CXXReinterpretCastExpr *S) {
1552 VisitCXXNamedCastExpr(S);
1553 }
1554
1555 void StmtProfiler::VisitCXXConstCastExpr(const CXXConstCastExpr *S) {
1556 VisitCXXNamedCastExpr(S);
1557 }
1558
1559 void StmtProfiler::VisitUserDefinedLiteral(const UserDefinedLiteral *S) {
1560 VisitCallExpr(S);
1561 }
1562
1563 void StmtProfiler::VisitCXXBoolLiteralExpr(const CXXBoolLiteralExpr *S) {
1564 VisitExpr(S);
1565 ID.AddBoolean(S->getValue());
1566 }
1567
1568 void StmtProfiler::VisitCXXNullPtrLiteralExpr(const CXXNullPtrLiteralExpr *S) {
1569 VisitExpr(S);
1570 }
1571
1572 void StmtProfiler::VisitCXXStdInitializerListExpr(
1573 const CXXStdInitializerListExpr *S) {
1574 VisitExpr(S);
1575 }
1576
1577 void StmtProfiler::VisitCXXTypeidExpr(const CXXTypeidExpr *S) {
1578 VisitExpr(S);
1579 if (S->isTypeOperand())
1580 VisitType(S->getTypeOperandSourceInfo()->getType());
1581 }
1582
1583 void StmtProfiler::VisitCXXUuidofExpr(const CXXUuidofExpr *S) {
1584 VisitExpr(S);
1585 if (S->isTypeOperand())
1586 VisitType(S->getTypeOperandSourceInfo()->getType());
1587 }
1588
1589 void StmtProfiler::VisitMSPropertyRefExpr(const MSPropertyRefExpr *S) {
1590 VisitExpr(S);
1591 VisitDecl(S->getPropertyDecl());
1592 }
1593
1594 void StmtProfiler::VisitMSPropertySubscriptExpr(
1595 const MSPropertySubscriptExpr *S) {
1596 VisitExpr(S);
1597 }
1598
1599 void StmtProfiler::VisitCXXThisExpr(const CXXThisExpr *S) {
1600 VisitExpr(S);
1601 ID.AddBoolean(S->isImplicit());
1602 }
1603
1604 void StmtProfiler::VisitCXXThrowExpr(const CXXThrowExpr *S) {
1605 VisitExpr(S);
1606 }
1607
1608 void StmtProfiler::VisitCXXDefaultArgExpr(const CXXDefaultArgExpr *S) {
1609 VisitExpr(S);
1610 VisitDecl(S->getParam());
1611 }
1612
1613 void StmtProfiler::VisitCXXDefaultInitExpr(const CXXDefaultInitExpr *S) {
1614 VisitExpr(S);
1615 VisitDecl(S->getField());
1616 }
1617
1618 void StmtProfiler::VisitCXXBindTemporaryExpr(const CXXBindTemporaryExpr *S) {
1619 VisitExpr(S);
1620 VisitDecl(
1621 const_cast<CXXDestructorDecl *>(S->getTemporary()->getDestructor()));
1622 }
1623
1624 void StmtProfiler::VisitCXXConstructExpr(const CXXConstructExpr *S) {
1625 VisitExpr(S);
1626 VisitDecl(S->getConstructor());
1627 ID.AddBoolean(S->isElidable());
1628 }
1629
1630 void StmtProfiler::VisitCXXInheritedCtorInitExpr(
1631 const CXXInheritedCtorInitExpr *S) {
1632 VisitExpr(S);
1633 VisitDecl(S->getConstructor());
1634 }
1635
1636 void StmtProfiler::VisitCXXFunctionalCastExpr(const CXXFunctionalCastExpr *S) {
1637 VisitExplicitCastExpr(S);
1638 }
1639
1640 void
1641 StmtProfiler::VisitCXXTemporaryObjectExpr(const CXXTemporaryObjectExpr *S) {
1642 VisitCXXConstructExpr(S);
1643 }
1644
1645 void
1646 StmtProfiler::VisitLambdaExpr(const LambdaExpr *S) {
1647 VisitExpr(S);
1648 for (LambdaExpr::capture_iterator C = S->explicit_capture_begin(),
1649 CEnd = S->explicit_capture_end();
1650 C != CEnd; ++C) {
1651 if (C->capturesVLAType())
1652 continue;
1653
1654 ID.AddInteger(C->getCaptureKind());
1655 switch (C->getCaptureKind()) {
1656 case LCK_StarThis:
1657 case LCK_This:
1658 break;
1659 case LCK_ByRef:
1660 case LCK_ByCopy:
1661 VisitDecl(C->getCapturedVar());
1662 ID.AddBoolean(C->isPackExpansion());
1663 break;
1664 case LCK_VLAType:
1665 llvm_unreachable("VLA type in explicit captures.");
1666 }
1667 }
1668 // Note: If we actually needed to be able to match lambda
1669 // expressions, we would have to consider parameters and return type
1670 // here, among other things.
1671 VisitStmt(S->getBody());
1672 }
1673
1674 void
1675 StmtProfiler::VisitCXXScalarValueInitExpr(const CXXScalarValueInitExpr *S) {
1676 VisitExpr(S);
1677 }
1678
1679 void StmtProfiler::VisitCXXDeleteExpr(const CXXDeleteExpr *S) {
1680 VisitExpr(S);
1681 ID.AddBoolean(S->isGlobalDelete());
1682 ID.AddBoolean(S->isArrayForm());
1683 VisitDecl(S->getOperatorDelete());
1684 }
1685
1686 void StmtProfiler::VisitCXXNewExpr(const CXXNewExpr *S) {
1687 VisitExpr(S);
1688 VisitType(S->getAllocatedType());
1689 VisitDecl(S->getOperatorNew());
1690 VisitDecl(S->getOperatorDelete());
1691 ID.AddBoolean(S->isArray());
1692 ID.AddInteger(S->getNumPlacementArgs());
1693 ID.AddBoolean(S->isGlobalNew());
1694 ID.AddBoolean(S->isParenTypeId());
1695 ID.AddInteger(S->getInitializationStyle());
1696 }
1697
1698 void
1699 StmtProfiler::VisitCXXPseudoDestructorExpr(const CXXPseudoDestructorExpr *S) {
1700 VisitExpr(S);
1701 ID.AddBoolean(S->isArrow());
1702 VisitNestedNameSpecifier(S->getQualifier());
1703 ID.AddBoolean(S->getScopeTypeInfo() != nullptr);
1704 if (S->getScopeTypeInfo())
1705 VisitType(S->getScopeTypeInfo()->getType());
1706 ID.AddBoolean(S->getDestroyedTypeInfo() != nullptr);
1707 if (S->getDestroyedTypeInfo())
1708 VisitType(S->getDestroyedType());
1709 else
1710 VisitIdentifierInfo(S->getDestroyedTypeIdentifier());
1711 }
1712
1713 void StmtProfiler::VisitOverloadExpr(const OverloadExpr *S) {
1714 VisitExpr(S);
1715 VisitNestedNameSpecifier(S->getQualifier());
1716 VisitName(S->getName(), /*TreatAsDecl*/ true);
1717 ID.AddBoolean(S->hasExplicitTemplateArgs());
1718 if (S->hasExplicitTemplateArgs())
1719 VisitTemplateArguments(S->getTemplateArgs(), S->getNumTemplateArgs());
1720 }
1721
1722 void
1723 StmtProfiler::VisitUnresolvedLookupExpr(const UnresolvedLookupExpr *S) {
1724 VisitOverloadExpr(S);
1725 }
1726
1727 void StmtProfiler::VisitTypeTraitExpr(const TypeTraitExpr *S) {
1728 VisitExpr(S);
1729 ID.AddInteger(S->getTrait());
1730 ID.AddInteger(S->getNumArgs());
1731 for (unsigned I = 0, N = S->getNumArgs(); I != N; ++I)
1732 VisitType(S->getArg(I)->getType());
1733 }
1734
1735 void StmtProfiler::VisitArrayTypeTraitExpr(const ArrayTypeTraitExpr *S) {
1736 VisitExpr(S);
1737 ID.AddInteger(S->getTrait());
1738 VisitType(S->getQueriedType());
1739 }
1740
1741 void StmtProfiler::VisitExpressionTraitExpr(const ExpressionTraitExpr *S) {
1742 VisitExpr(S);
1743 ID.AddInteger(S->getTrait());
1744 VisitExpr(S->getQueriedExpression());
1745 }
1746
1747 void StmtProfiler::VisitDependentScopeDeclRefExpr(
1748 const DependentScopeDeclRefExpr *S) {
1749 VisitExpr(S);
1750 VisitName(S->getDeclName());
1751 VisitNestedNameSpecifier(S->getQualifier());
1752 ID.AddBoolean(S->hasExplicitTemplateArgs());
1753 if (S->hasExplicitTemplateArgs())
1754 VisitTemplateArguments(S->getTemplateArgs(), S->getNumTemplateArgs());
1755 }
1756
1757 void StmtProfiler::VisitExprWithCleanups(const ExprWithCleanups *S) {
1758 VisitExpr(S);
1759 }
1760
1761 void StmtProfiler::VisitCXXUnresolvedConstructExpr(
1762 const CXXUnresolvedConstructExpr *S) {
1763 VisitExpr(S);
1764 VisitType(S->getTypeAsWritten());
1765 ID.AddInteger(S->isListInitialization());
1766 }
1767
1768 void StmtProfiler::VisitCXXDependentScopeMemberExpr(
1769 const CXXDependentScopeMemberExpr *S) {
1770 ID.AddBoolean(S->isImplicitAccess());
1771 if (!S->isImplicitAccess()) {
1772 VisitExpr(S);
1773 ID.AddBoolean(S->isArrow());
1774 }
1775 VisitNestedNameSpecifier(S->getQualifier());
1776 VisitName(S->getMember());
1777 ID.AddBoolean(S->hasExplicitTemplateArgs());
1778 if (S->hasExplicitTemplateArgs())
1779 VisitTemplateArguments(S->getTemplateArgs(), S->getNumTemplateArgs());
1780 }
1781
1782 void StmtProfiler::VisitUnresolvedMemberExpr(const UnresolvedMemberExpr *S) {
1783 ID.AddBoolean(S->isImplicitAccess());
1784 if (!S->isImplicitAccess()) {
1785 VisitExpr(S);
1786 ID.AddBoolean(S->isArrow());
1787 }
1788 VisitNestedNameSpecifier(S->getQualifier());
1789 VisitName(S->getMemberName());
1790 ID.AddBoolean(S->hasExplicitTemplateArgs());
1791 if (S->hasExplicitTemplateArgs())
1792 VisitTemplateArguments(S->getTemplateArgs(), S->getNumTemplateArgs());
1793 }
1794
1795 void StmtProfiler::VisitCXXNoexceptExpr(const CXXNoexceptExpr *S) {
1796 VisitExpr(S);
1797 }
1798
1799 void StmtProfiler::VisitPackExpansionExpr(const PackExpansionExpr *S) {
1800 VisitExpr(S);
1801 }
1802
1803 void StmtProfiler::VisitSizeOfPackExpr(const SizeOfPackExpr *S) {
1804 VisitExpr(S);
1805 VisitDecl(S->getPack());
1806 if (S->isPartiallySubstituted()) {
1807 auto Args = S->getPartialArguments();
1808 ID.AddInteger(Args.size());
1809 for (const auto &TA : Args)
1810 VisitTemplateArgument(TA);
1811 } else {
1812 ID.AddInteger(0);
1813 }
1814 }
1815
1816 void StmtProfiler::VisitSubstNonTypeTemplateParmPackExpr(
1817 const SubstNonTypeTemplateParmPackExpr *S) {
1818 VisitExpr(S);
1819 VisitDecl(S->getParameterPack());
1820 VisitTemplateArgument(S->getArgumentPack());
1821 }
1822
1823 void StmtProfiler::VisitSubstNonTypeTemplateParmExpr(
1824 const SubstNonTypeTemplateParmExpr *E) {
1825 // Profile exactly as the replacement expression.
1826 Visit(E->getReplacement());
1827 }
1828
1829 void StmtProfiler::VisitFunctionParmPackExpr(const FunctionParmPackExpr *S) {
1830 VisitExpr(S);
1831 VisitDecl(S->getParameterPack());
1832 ID.AddInteger(S->getNumExpansions());
1833 for (FunctionParmPackExpr::iterator I = S->begin(), E = S->end(); I != E; ++I)
1834 VisitDecl(*I);
1835 }
1836
1837 void StmtProfiler::VisitMaterializeTemporaryExpr(
1838 const MaterializeTemporaryExpr *S) {
1839 VisitExpr(S);
1840 }
1841
1842 void StmtProfiler::VisitCXXFoldExpr(const CXXFoldExpr *S) {
1843 VisitExpr(S);
1844 ID.AddInteger(S->getOperator());
1845 }
1846
1847 void StmtProfiler::VisitCoroutineBodyStmt(const CoroutineBodyStmt *S) {
1848 VisitStmt(S);
1849 }
1850
1851 void StmtProfiler::VisitCoreturnStmt(const CoreturnStmt *S) {
1852 VisitStmt(S);
1853 }
1854
1855 void StmtProfiler::VisitCoawaitExpr(const CoawaitExpr *S) {
1856 VisitExpr(S);
1857 }
1858
1859 void StmtProfiler::VisitDependentCoawaitExpr(const DependentCoawaitExpr *S) {
1860 VisitExpr(S);
1861 }
1862
1863 void StmtProfiler::VisitCoyieldExpr(const CoyieldExpr *S) {
1864 VisitExpr(S);
1865 }
1866
1867 void StmtProfiler::VisitOpaqueValueExpr(const OpaqueValueExpr *E) {
1868 VisitExpr(E);
1869 }
1870
1871 void StmtProfiler::VisitTypoExpr(const TypoExpr *E) {
1872 VisitExpr(E);
1873 }
1874
1875 void StmtProfiler::VisitObjCStringLiteral(const ObjCStringLiteral *S) {
1876 VisitExpr(S);
1877 }
1878
1879 void StmtProfiler::VisitObjCBoxedExpr(const ObjCBoxedExpr *E) {
1880 VisitExpr(E);
1881 }
1882
1883 void StmtProfiler::VisitObjCArrayLiteral(const ObjCArrayLiteral *E) {
1884 VisitExpr(E);
1885 }
1886
1887 void StmtProfiler::VisitObjCDictionaryLiteral(const ObjCDictionaryLiteral *E) {
1888 VisitExpr(E);
1889 }
1890
1891 void StmtProfiler::VisitObjCEncodeExpr(const ObjCEncodeExpr *S) {
1892 VisitExpr(S);
1893 VisitType(S->getEncodedType());
1894 }
1895
1896 void StmtProfiler::VisitObjCSelectorExpr(const ObjCSelectorExpr *S) {
1897 VisitExpr(S);
1898 VisitName(S->getSelector());
1899 }
1900
1901 void StmtProfiler::VisitObjCProtocolExpr(const ObjCProtocolExpr *S) {
1902 VisitExpr(S);
1903 VisitDecl(S->getProtocol());
1904 }
1905
1906 void StmtProfiler::VisitObjCIvarRefExpr(const ObjCIvarRefExpr *S) {
1907 VisitExpr(S);
1908 VisitDecl(S->getDecl());
1909 ID.AddBoolean(S->isArrow());
1910 ID.AddBoolean(S->isFreeIvar());
1911 }
1912
1913 void StmtProfiler::VisitObjCPropertyRefExpr(const ObjCPropertyRefExpr *S) {
1914 VisitExpr(S);
1915 if (S->isImplicitProperty()) {
1916 VisitDecl(S->getImplicitPropertyGetter());
1917 VisitDecl(S->getImplicitPropertySetter());
1918 } else {
1919 VisitDecl(S->getExplicitProperty());
1920 }
1921 if (S->isSuperReceiver()) {
1922 ID.AddBoolean(S->isSuperReceiver());
1923 VisitType(S->getSuperReceiverType());
1924 }
1925 }
1926
1927 void StmtProfiler::VisitObjCSubscriptRefExpr(const ObjCSubscriptRefExpr *S) {
1928 VisitExpr(S);
1929 VisitDecl(S->getAtIndexMethodDecl());
1930 VisitDecl(S->setAtIndexMethodDecl());
1931 }
1932
1933 void StmtProfiler::VisitObjCMessageExpr(const ObjCMessageExpr *S) {
1934 VisitExpr(S);
1935 VisitName(S->getSelector());
1936 VisitDecl(S->getMethodDecl());
1937 }
1938
1939 void StmtProfiler::VisitObjCIsaExpr(const ObjCIsaExpr *S) {
1940 VisitExpr(S);
1941 ID.AddBoolean(S->isArrow());
1942 }
1943
1944 void StmtProfiler::VisitObjCBoolLiteralExpr(const ObjCBoolLiteralExpr *S) {
1945 VisitExpr(S);
1946 ID.AddBoolean(S->getValue());
1947 }
1948
1949 void StmtProfiler::VisitObjCIndirectCopyRestoreExpr(
1950 const ObjCIndirectCopyRestoreExpr *S) {
1951 VisitExpr(S);
1952 ID.AddBoolean(S->shouldCopy());
1953 }
1954
1955 void StmtProfiler::VisitObjCBridgedCastExpr(const ObjCBridgedCastExpr *S) {
1956 VisitExplicitCastExpr(S);
1957 ID.AddBoolean(S->getBridgeKind());
1958 }
1959
1960 void StmtProfiler::VisitObjCAvailabilityCheckExpr(
1961 const ObjCAvailabilityCheckExpr *S) {
1962 VisitExpr(S);
1963 }
1964
1965 void StmtProfiler::VisitTemplateArguments(const TemplateArgumentLoc *Args,
1966 unsigned NumArgs) {
1967 ID.AddInteger(NumArgs);
1968 for (unsigned I = 0; I != NumArgs; ++I)
1969 VisitTemplateArgument(Args[I].getArgument());
1970 }
1971
1972 void StmtProfiler::VisitTemplateArgument(const TemplateArgument &Arg) {
1973 // Mostly repetitive with TemplateArgument::Profile!
1974 ID.AddInteger(Arg.getKind());
1975 switch (Arg.getKind()) {
1976 case TemplateArgument::Null:
1977 break;
1978
1979 case TemplateArgument::Type:
1980 VisitType(Arg.getAsType());
1981 break;
1982
1983 case TemplateArgument::Template:
1984 case TemplateArgument::TemplateExpansion:
1985 VisitTemplateName(Arg.getAsTemplateOrTemplatePattern());
1986 break;
1987
1988 case TemplateArgument::Declaration:
1989 VisitDecl(Arg.getAsDecl());
1990 break;
1991
1992 case TemplateArgument::NullPtr:
1993 VisitType(Arg.getNullPtrType());
1994 break;
1995
1996 case TemplateArgument::Integral:
1997 Arg.getAsIntegral().Profile(ID);
1998 VisitType(Arg.getIntegralType());
1999 break;
2000
2001 case TemplateArgument::Expression:
2002 Visit(Arg.getAsExpr());
2003 break;
2004
2005 case TemplateArgument::Pack:
2006 for (const auto &P : Arg.pack_elements())
2007 VisitTemplateArgument(P);
2008 break;
2009 }
2010 }
2011
2012 void Stmt::Profile(llvm::FoldingSetNodeID &ID, const ASTContext &Context,
2013 bool Canonical) const {
2014 StmtProfilerWithPointers Profiler(ID, Context, Canonical);
2015 Profiler.Visit(this);
2016 }
2017
2018 void Stmt::ProcessODRHash(llvm::FoldingSetNodeID &ID,
2019 class ODRHash &Hash) const {
2020 StmtProfilerWithoutPointers Profiler(ID, Hash);
2021 Profiler.Visit(this);
2022 }
clang::ObjCPropertyRefExpr
ObjCPropertyRefExpr - A dot-syntax expression to access an ObjC property.
Definition: ExprObjC.h:577
clang::ObjCIndirectCopyRestoreExpr
ObjCIndirectCopyRestoreExpr - Represents the passing of a function argument by indirect copy-restore ...
Definition: ExprObjC.h:1518
clang::CXXOperatorCallExpr
A call to an overloaded operator written using operator syntax.
Definition: ExprCXX.h:78
clang::DesignatedInitExpr::Designator
Represents a single C99 designator.
Definition: Expr.h:4494
clang::DeclRefExpr::getNumTemplateArgs
unsigned getNumTemplateArgs() const
Retrieve the number of template arguments provided as part of this template-id.
Definition: Expr.h:1215
clang::Builtin::ID
ID
Definition: Builtins.h:49
ASTContext.h
Defines the clang::ASTContext interface.
clang::BlockExpr::getBlockDecl
const BlockDecl * getBlockDecl() const
Definition: Expr.h:5191
clang::OMPDistributeSimdDirective
This represents &#39;#pragma omp distribute simd&#39; composite directive.
Definition: StmtOpenMP.h:3248
clang::OMPMasterDirective
This represents &#39;#pragma omp master&#39; directive.
Definition: StmtOpenMP.h:1431
clang::CXXUuidofExpr::getTypeOperandSourceInfo
TypeSourceInfo * getTypeOperandSourceInfo() const
Retrieve source information for the type operand.
Definition: ExprCXX.h:923
clang::CXXNullPtrLiteralExpr
The null pointer literal (C++11 [lex.nullptr])
Definition: ExprCXX.h:596
clang::CXXTemporary::getDestructor
const CXXDestructorDecl * getDestructor() const
Definition: ExprCXX.h:1196
clang::LambdaExpr::explicit_capture_end
capture_iterator explicit_capture_end() const
Retrieve an iterator pointing past the end of the sequence of explicit lambda captures.
Definition: ExprCXX.cpp:1174
clang::OMPTaskDirective
This represents &#39;#pragma omp task&#39; directive.
Definition: StmtOpenMP.h:1771
clang::GCCAsmStmt
This represents a GCC inline-assembly statement extension.
Definition: Stmt.h:2675
clang::DependentCoawaitExpr
Represents a &#39;co_await&#39; expression while the type of the promise is dependent.
Definition: ExprCXX.h:4455
clang::ObjCBoolLiteralExpr::getValue
bool getValue() const
Definition: ExprObjC.h:94
clang::OMPReductionClause::reduction_ops
helper_expr_const_range reduction_ops() const
Definition: OpenMPClause.h:2115
OMPThreadLimitClause
This represents &#39;thread_limit&#39; clause in the &#39;#pragma omp ...&#39; directive.
Definition: OpenMPClause.h:4342
clang::OverloadExpr::hasExplicitTemplateArgs
bool hasExplicitTemplateArgs() const
Determines whether this expression had explicit template arguments.
Definition: ExprCXX.h:2786
clang::AsmStmt::getNumInputs
unsigned getNumInputs() const
Definition: Stmt.h:2591
clang::DeclRefExpr::getTemplateArgs
const TemplateArgumentLoc * getTemplateArgs() const
Retrieve the template arguments provided as part of this template-id.
Definition: Expr.h:1207
clang::OMPTaskReductionClause::lhs_exprs
helper_expr_const_range lhs_exprs() const
Definition: OpenMPClause.h:2319
clang::ODRHash
Definition: ODRHash.h:42
OMPCopyinClause
This represents clause &#39;copyin&#39; in the &#39;#pragma omp ...&#39; directives.
Definition: OpenMPClause.h:2931
clang::QualType
A (possibly-)qualified type.
Definition: Type.h:638
clang::StringLiteral::getKind
StringKind getKind() const
Definition: Expr.h:1681
clang::MemberExpr::getMemberDecl
ValueDecl * getMemberDecl() const
Retrieve the member declaration to which this expression refers.
Definition: Expr.h:2773
clang::OMPExecutableDirective::clauses
ArrayRef< OMPClause * > clauses()
Definition: StmtOpenMP.h:260
clang::CallExpr::getArg
Expr * getArg(unsigned Arg)
getArg - Return the specified argument.
Definition: Expr.h:2553
clang::ObjCSubscriptRefExpr::getAtIndexMethodDecl
ObjCMethodDecl * getAtIndexMethodDecl() const
Definition: ExprObjC.h:854
getArgument
static const TemplateArgument & getArgument(const TemplateArgument &A)
Definition: TypePrinter.cpp:1621
clang::ObjCMessageExpr::getSelector
Selector getSelector() const
Definition: ExprObjC.cpp:312
clang::ODRHash::AddDeclarationName
void AddDeclarationName(DeclarationName Name, bool TreatAsDecl=false)
Definition: ODRHash.cpp:35
clang::ConstStmtVisitor
ConstStmtVisitor - This class implements a simple visitor for Stmt subclasses.
Definition: StmtVisitor.h:193
ODRHash.h
This file contains the declaration of the ODRHash class, which calculates a hash based on AST nodes...
clang::ObjCPropertyRefExpr::isSuperReceiver
bool isSuperReceiver() const
Definition: ExprObjC.h:739
clang::TypeTraitExpr
A type trait used in the implementation of various C++11 and Library TR1 trait templates.
Definition: ExprCXX.h:2430
clang::OMPAtomicDefaultMemOrderClause
This represents &#39;atomic_default_mem_order&#39; clause in the &#39;#pragma omp requires&#39; directive.
Definition: OpenMPClause.h:870
clang::CXXUnresolvedConstructExpr::isListInitialization
bool isListInitialization() const
Determine whether this expression models list-initialization.
Definition: ExprCXX.h:3223
clang::OMPTaskReductionClause::rhs_exprs
helper_expr_const_range rhs_exprs() const
Definition: OpenMPClause.h:2327
clang::OMPPrivateClause::private_copies
private_copies_range private_copies()
Definition: OpenMPClause.h:1507
clang::ObjCProtocolExpr::getProtocol
ObjCProtocolDecl * getProtocol() const
Definition: ExprObjC.h:490
clang::CoreturnStmt
Represents a &#39;co_return&#39; statement in the C++ Coroutines TS.
Definition: StmtCXX.h:435
clang::Stmt
Stmt - This represents one statement.
Definition: Stmt.h:66
clang::CallExpr::getNumArgs
unsigned getNumArgs() const
getNumArgs - Return the number of actual arguments to this call.
Definition: Expr.h:2540
clang::OMPInReductionClause
This represents clause &#39;in_reduction&#39; in the &#39;#pragma omp task&#39; directives.
Definition: OpenMPClause.h:2362
clang::ODRHash::AddQualType
void AddQualType(QualType T)
Definition: ODRHash.cpp:1040
clang::IfStmt
IfStmt - This represents an if/then/else.
Definition: Stmt.h:1687
clang::OMPFirstprivateClause::inits
inits_range inits()
Definition: OpenMPClause.h:1637
clang::DependentScopeDeclRefExpr::getTemplateArgs
TemplateArgumentLoc const * getTemplateArgs() const
Definition: ExprCXX.h:3040
clang::OMPClauseWithPreInit
Class that handles pre-initialization statement for some clauses, like &#39;shedule&#39;, &#39;firstprivate&#39; etc...
Definition: OpenMPClause.h:99
clang::ObjCSubscriptRefExpr::setAtIndexMethodDecl
ObjCMethodDecl * setAtIndexMethodDecl() const
Definition: ExprObjC.h:858
clang::AsmStmt::getNumOutputs
unsigned getNumOutputs() const
Definition: Stmt.h:2569
clang::OMPForSimdDirective
This represents &#39;#pragma omp for simd&#39; directive.
Definition: StmtOpenMP.h:1181
clang::TemplateArgument::Expression
The template argument is an expression, and we&#39;ve not resolved it to one of the other forms yet...
Definition: TemplateBase.h:87
clang::GCCAsmStmt::getAsmString
const StringLiteral * getAsmString() const
Definition: Stmt.h:2701
clang::OMPInReductionClause::rhs_exprs
helper_expr_const_range rhs_exprs() const
Definition: OpenMPClause.h:2560
clang::Decl
Decl - This represents one declaration (or definition), e.g.
Definition: DeclBase.h:87
OMPGrainsizeClause
This represents &#39;grainsize&#39; clause in the &#39;#pragma omp ...&#39; directive.
Definition: OpenMPClause.h:4464
clang::OMPTeamsDistributeParallelForDirective
This represents &#39;#pragma omp teams distribute parallel for&#39; composite directive.
Definition: StmtOpenMP.h:3659
clang::FloatingLiteral::getValue
llvm::APFloat getValue() const
Definition: Expr.h:1459
clang::ObjCPropertyRefExpr::getImplicitPropertySetter
ObjCMethodDecl * getImplicitPropertySetter() const
Definition: ExprObjC.h:680
clang::ArrayInitIndexExpr
Represents the index of the current element of an array being initialized by an ArrayInitLoopExpr.
Definition: Expr.h:4858
clang::CXXNewExpr::getOperatorNew
FunctionDecl * getOperatorNew() const
Definition: ExprCXX.h:2033
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:2828
clang::OMPIfClause
This represents &#39;if&#39; clause in the &#39;#pragma omp ...&#39; directive.
Definition: OpenMPClause.h:240
clang::MSDependentExistsStmt::getNameInfo
DeclarationNameInfo getNameInfo() const
Retrieve the name of the entity we&#39;re testing for, along with location information.
Definition: StmtCXX.h:277
DeclTemplate.h
Defines the C++ template declaration subclasses.
clang::BinaryOperator::getOpcode
Opcode getOpcode() const
Definition: Expr.h:3322
P
StringRef P
Definition: ASTMatchersInternal.cpp:439
clang::AttributedStmt
Represents an attribute applied to a statement.
Definition: Stmt.h:1633
clang::ParenExpr
ParenExpr - This represents a parethesized expression, e.g.
Definition: Expr.h:1844
OMPCopyinClause::assignment_ops
helper_expr_const_range assignment_ops() const
Definition: OpenMPClause.h:3068
clang::MSDependentExistsStmt::getQualifierLoc
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier that qualifies this name, if any.
Definition: StmtCXX.h:273
clang::IntegerLiteral
Definition: Expr.h:1308
OMPPriorityClause
This represents &#39;priority&#39; clause in the &#39;#pragma omp ...&#39; directive.
Definition: OpenMPClause.h:4407
clang::OMPTargetTeamsDistributeDirective
This represents &#39;#pragma omp target teams distribute&#39; combined directive.
Definition: StmtOpenMP.h:3796
clang::OMPReductionClause::lhs_exprs
helper_expr_const_range lhs_exprs() const
Definition: OpenMPClause.h:2099
clang::DependentScopeDeclRefExpr::getQualifier
NestedNameSpecifier * getQualifier() const
Retrieve the nested-name-specifier that qualifies this declaration.
Definition: ExprCXX.h:2998
clang::ObjCAtThrowStmt
Represents Objective-C&#39;s @throw statement.
Definition: StmtObjC.h:313
clang::DeclRefExpr::hasExplicitTemplateArgs
bool hasExplicitTemplateArgs() const
Determines whether this declaration reference was followed by an explicit template argument list...
Definition: Expr.h:1195
clang::TemplateArgument::Declaration
The template argument is a declaration that was provided for a pointer, reference, or pointer to member non-type template parameter.
Definition: TemplateBase.h:64
clang::CXXConstructExpr
Represents a call to a C++ constructor.
Definition: ExprCXX.h:1262
clang::ObjCSubscriptRefExpr
ObjCSubscriptRefExpr - used for array and dictionary subscripting.
Definition: ExprObjC.h:803
clang::ArrayTypeTraitExpr
An Embarcadero array type trait, as used in the implementation of __array_rank and __array_extent...
Definition: ExprCXX.h:2514
clang::OMPFinalClause::getCondition
Expr * getCondition() const
Returns condition.
Definition: OpenMPClause.h:365
DeclObjC.h
clang::OMPUpdateClause
This represents &#39;update&#39; clause in the &#39;#pragma omp atomic&#39; directive.
Definition: OpenMPClause.h:1354
clang::CXXPseudoDestructorExpr::getQualifier
NestedNameSpecifier * getQualifier() const
If the member name was qualified, retrieves the nested-name-specifier that precedes the member name...
Definition: ExprCXX.h:2343
clang::OMPIfClause::getCondition
Expr * getCondition() const
Returns condition.
Definition: OpenMPClause.h:308
clang::OMPParallelForDirective
This represents &#39;#pragma omp parallel for&#39; directive.
Definition: StmtOpenMP.h:1552
clang::MSPropertySubscriptExpr
MS property subscript expression.
Definition: ExprCXX.h:828
clang::PredefinedExpr::getIdentKind
IdentKind getIdentKind() const
Definition: Expr.h:1806
clang::OMPTargetTeamsDistributeParallelForDirective
This represents &#39;#pragma omp target teams distribute parallel for&#39; combined directive.
Definition: StmtOpenMP.h:3864
clang::LambdaCapture
Describes the capture of a variable or of this, or of a C++1y init-capture.
Definition: LambdaCapture.h:26
clang::MaterializeTemporaryExpr
Represents a prvalue temporary that is written into memory so that a reference can bind to it...
Definition: ExprCXX.h:4156
OMPAlignedClause::getAlignment
Expr * getAlignment()
Returns alignment.
Definition: OpenMPClause.h:2909
clang::OMPOrderedClause::getNumForLoops
Expr * getNumForLoops() const
Return the number of associated for-loops.
Definition: OpenMPClause.h:1187
clang::OMPTargetExitDataDirective
This represents &#39;#pragma omp target exit data&#39; directive.
Definition: StmtOpenMP.h:2463
clang::OMPReadClause
This represents &#39;read&#39; clause in the &#39;#pragma omp atomic&#39; directive.
Definition: OpenMPClause.h:1298
OMPCopyprivateClause::assignment_ops
helper_expr_const_range assignment_ops() const
Definition: OpenMPClause.h:3219
clang::OMPPrivateClause
This represents clause &#39;private&#39; in the &#39;#pragma omp ...&#39; directives.
Definition: OpenMPClause.h:1441
clang::ObjCIsaExpr
ObjCIsaExpr - Represent X->isa and X.isa when X is an ObjC &#39;id&#39; type.
Definition: ExprObjC.h:1437
clang::CompoundLiteralExpr
CompoundLiteralExpr - [C99 6.5.2.5].
Definition: Expr.h:2925
clang::OMPNumThreadsClause
This represents &#39;num_threads&#39; clause in the &#39;#pragma omp ...&#39; directive.
Definition: OpenMPClause.h:382
clang::TypeTraitExpr::getNumArgs
unsigned getNumArgs() const
Determine the number of arguments to this type trait.
Definition: ExprCXX.h:2479
clang::TemplateArgument::Null
Represents an empty template argument, e.g., one that has not been deduced.
Definition: TemplateBase.h:57
OMPDefaultmapClause
This represents &#39;defaultmap&#39; clause in the &#39;#pragma omp ...&#39; directive.
Definition: OpenMPClause.h:4750
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:2012
clang::ObjCIsaExpr::isArrow
bool isArrow() const
Definition: ExprObjC.h:1465
clang::DeclarationName::getAsOpaquePtr
void * getAsOpaquePtr() const
Get the representation of this declaration name as an opaque pointer.
Definition: DeclarationName.h:421
clang::OverloadExpr::getName
DeclarationName getName() const
Gets the name looked up.
Definition: ExprCXX.h:2744
clang::CXXStdInitializerListExpr
Implicit construction of a std::initializer_list<T> object from an array temporary within list-initia...
Definition: ExprCXX.h:624
clang::CXXNewExpr::getNumPlacementArgs
unsigned getNumPlacementArgs() const
Definition: ExprCXX.h:2051
OMPFlushClause
This represents implicit clause &#39;flush&#39; for the &#39;#pragma omp flush&#39; directive.
Definition: OpenMPClause.h:3251
clang::OMPReductionClause::getNameInfo
const DeclarationNameInfo & getNameInfo() const
Gets the name info for specified reduction identifier.
Definition: OpenMPClause.h:2080
clang::CXXInheritedCtorInitExpr::getConstructor
CXXConstructorDecl * getConstructor() const
Get the constructor that this expression will call.
Definition: ExprCXX.h:1483
clang::CXXThrowExpr
A C++ throw-expression (C++ [except.throw]).
Definition: ExprCXX.h:1015
clang::ExprWithCleanups
Represents an expression – generally a full-expression – that introduces cleanups to be run at the ...
Definition: ExprCXX.h:3089
clang::OMPReverseOffloadClause
This represents &#39;reverse_offload&#39; clause in the &#39;#pragma omp requires&#39; directive. ...
Definition: OpenMPClause.h:807
clang::TypeTraitExpr::getArg
TypeSourceInfo * getArg(unsigned I) const
Retrieve the Ith argument.
Definition: ExprCXX.h:2482
clang::ParmVarDecl
Represents a parameter to a function.
Definition: Decl.h:1550
ExprCXX.h
Defines the clang::Expr interface and subclasses for C++ expressions.
clang::TemplateArgument::getIntegralType
QualType getIntegralType() const
Retrieve the type of the integral value.
Definition: TemplateBase.h:315
clang::GCCAsmStmt::getInputName
StringRef getInputName(unsigned i) const
Definition: Stmt.h:2793
clang::FunctionParmPackExpr::begin
iterator begin() const
Definition: ExprCXX.h:4115
OMPGrainsizeClause::getGrainsize
Expr * getGrainsize() const
Return safe iteration space distance.
Definition: OpenMPClause.h:4498
OMPNogroupClause
This represents &#39;nogroup&#39; clause in the &#39;#pragma omp ...&#39; directive.
Definition: OpenMPClause.h:4513
clang::OMPSafelenClause
This represents &#39;safelen&#39; clause in the &#39;#pragma omp ...&#39; directive.
Definition: OpenMPClause.h:447
clang::ObjCPropertyRefExpr::getExplicitProperty
ObjCPropertyDecl * getExplicitProperty() const
Definition: ExprObjC.h:670
clang::CXXStaticCastExpr
A C++ static_cast expression (C++ [expr.static.cast]).
Definition: ExprCXX.h:326
clang::LabelStmt
LabelStmt - Represents a label, which has a substatement.
Definition: Stmt.h:1593
clang::DesignatedInitExpr
Represents a C99 designated initializer expression.
Definition: Expr.h:4419
clang::CXXPseudoDestructorExpr::getScopeTypeInfo
TypeSourceInfo * getScopeTypeInfo() const
Retrieve the scope type in a qualified pseudo-destructor expression.
Definition: ExprCXX.h:2363
clang::IdentifierInfo
One of these records is kept for each identifier that is lexed.
Definition: IdentifierTable.h:58
clang::OffsetOfNode::getField
FieldDecl * getField() const
For a field offsetof node, returns the field.
Definition: Expr.h:2077
clang::OMPParallelDirective
This represents &#39;#pragma omp parallel&#39; directive.
Definition: StmtOpenMP.h:276
clang::ShuffleVectorExpr
ShuffleVectorExpr - clang-specific builtin-in function __builtin_shufflevector.
Definition: Expr.h:3846
clang::TemplateArgument::getAsExpr
Expr * getAsExpr() const
Retrieve the template argument as an expression.
Definition: TemplateBase.h:330
clang::ASTContext
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
Definition: ASTContext.h:155
clang::CXXCatchStmt::getCaughtType
QualType getCaughtType() const
Definition: StmtCXX.cpp:20
OMPSIMDClause
This represents &#39;simd&#39; clause in the &#39;#pragma omp ...&#39; directive.
Definition: OpenMPClause.h:3520
clang::TemplateArgument::Integral
The template argument is an integral value stored in an llvm::APSInt that was provided for an integra...
Definition: TemplateBase.h:72
clang::CompoundLiteralExpr::isFileScope
bool isFileScope() const
Definition: Expr.h:2955
clang::OMPLastprivateClause
This represents clause &#39;lastprivate&#39; in the &#39;#pragma omp ...&#39; directives.
Definition: OpenMPClause.h:1662
clang::NoInitExpr
Represents a place-holder for an object not to be initialized by anything.
Definition: Expr.h:4713
clang::SEHFinallyStmt
Definition: Stmt.h:2990
clang::LambdaExpr::getBody
CompoundStmt * getBody() const
Retrieve the body of the lambda.
Definition: ExprCXX.cpp:1211
OMPDistScheduleClause::getChunkSize
Expr * getChunkSize()
Get chunk size.
Definition: OpenMPClause.h:4728
clang::GNUNullExpr
GNUNullExpr - Implements the GNU __null extension, which is a name for a null pointer constant that h...
Definition: Expr.h:4057
OMPMapClause
This represents clause &#39;map&#39; in the &#39;#pragma omp ...&#39; directives.
Definition: OpenMPClause.h:4043
clang::CXXPseudoDestructorExpr::getDestroyedType
QualType getDestroyedType() const
Retrieve the type being destroyed.
Definition: ExprCXX.cpp:290
OMPToClause
This represents clause &#39;to&#39; in the &#39;#pragma omp ...&#39; directives.
Definition: OpenMPClause.h:4852
clang::FixedPointLiteral
Definition: Expr.h:1351
clang::OMPTargetSimdDirective
This represents &#39;#pragma omp target simd&#39; directive.
Definition: StmtOpenMP.h:3384
clang::UnresolvedMemberExpr
Represents a C++ member access expression for which lookup produced a set of overloaded functions...
Definition: ExprCXX.h:3538
clang::ExtVectorElementExpr
ExtVectorElementExpr - This represents access to specific elements of a vector, and may occur on the ...
Definition: Expr.h:5116
clang::OMPSafelenClause::getSafelen
Expr * getSafelen() const
Return safe iteration space distance.
Definition: OpenMPClause.h:481
clang::OMPBarrierDirective
This represents &#39;#pragma omp barrier&#39; directive.
Definition: StmtOpenMP.h:1883
clang::ObjCArrayLiteral
ObjCArrayLiteral - used for objective-c array containers; as in: @["Hello", NSApp, [NSNumber numberWithInt:42]];.
Definition: ExprObjC.h:171
clang::OMPLoopDirective
This is a common base class for loop directives (&#39;omp simd&#39;, &#39;omp for&#39;, &#39;omp for simd&#39; etc...
Definition: StmtOpenMP.h:338
OMPNumTeamsClause::getNumTeams
Expr * getNumTeams()
Return NumTeams number.
Definition: OpenMPClause.h:4322
clang::SubstNonTypeTemplateParmPackExpr
Represents a reference to a non-type template parameter pack that has been substituted with a non-tem...
Definition: ExprCXX.h:4014
clang::SEHTryStmt
Definition: Stmt.h:3021
clang::OMPCriticalDirective
This represents &#39;#pragma omp critical&#39; directive.
Definition: StmtOpenMP.h:1478
clang::DependentScopeDeclRefExpr::hasExplicitTemplateArgs
bool hasExplicitTemplateArgs() const
Determines whether this lookup had explicit template arguments.
Definition: ExprCXX.h:3030
clang::ObjCSelectorExpr::getSelector
Selector getSelector() const
Definition: ExprObjC.h:442
clang::PseudoObjectExpr::const_semantics_iterator
const Expr *const * const_semantics_iterator
Definition: Expr.h:5366
clang::ObjCAtCatchStmt
Represents Objective-C&#39;s @catch statement.
Definition: StmtObjC.h:74
OMPCopyprivateClause
This represents clause &#39;copyprivate&#39; in the &#39;#pragma omp ...&#39; directives.
Definition: OpenMPClause.h:3096
clang::IndirectGotoStmt
IndirectGotoStmt - This represents an indirect goto.
Definition: Stmt.h:2339
clang::InitListExpr
Describes an C or C++ initializer list.
Definition: Expr.h:4185
clang::CXXTypeidExpr
A C++ typeid expression (C++ [expr.typeid]), which gets the type_info that corresponds to the supplie...
Definition: ExprCXX.h:669
clang::OMPDistributeParallelForDirective
This represents &#39;#pragma omp distribute parallel for&#39; composite directive.
Definition: StmtOpenMP.h:3099
clang::ObjCIvarRefExpr::isArrow
bool isArrow() const
Definition: ExprObjC.h:551
clang::OMPTeamsDistributeParallelForSimdDirective
This represents &#39;#pragma omp teams distribute parallel for simd&#39; composite directive.
Definition: StmtOpenMP.h:3588
clang::BinaryOperatorKind
BinaryOperatorKind
Definition: OperationKinds.h:26
clang::FunctionParmPackExpr::getNumExpansions
unsigned getNumExpansions() const
Get the number of parameters in this parameter pack.
Definition: ExprCXX.h:4119
clang::ForStmt
ForStmt - This represents a &#39;for (init;cond;inc)&#39; stmt.
Definition: Stmt.h:2237
clang::OMPInReductionClause::getQualifierLoc
NestedNameSpecifierLoc getQualifierLoc() const
Gets the nested name specifier.
Definition: OpenMPClause.h:2536
clang::CXXDeleteExpr::getOperatorDelete
FunctionDecl * getOperatorDelete() const
Definition: ExprCXX.h:2210
clang::SubstNonTypeTemplateParmPackExpr::getArgumentPack
TemplateArgument getArgumentPack() const
Retrieve the template argument pack containing the substituted template arguments.
Definition: ExprCXX.cpp:1533
clang::CXXConstructExpr::isElidable
bool isElidable() const
Whether this construction is elidable.
Definition: ExprCXX.h:1340
clang::ODRHash::AddDecl
void AddDecl(const Decl *D)
Definition: ODRHash.cpp:620
clang::LCK_ByCopy
< Capturing the *this object by copy
Definition: Lambda.h:37
clang::CXXNewExpr::isGlobalNew
bool isGlobalNew() const
Definition: ExprCXX.h:2074
clang::LabelStmt::getDecl
LabelDecl * getDecl() const
Definition: Stmt.h:1610
clang::TemplateArgument::getNullPtrType
QualType getNullPtrType() const
Retrieve the type for null non-type template argument.
Definition: TemplateBase.h:275
clang::Expr::getValueKind
ExprValueKind getValueKind() const
getValueKind - The value kind that this expression produces.
Definition: Expr.h:405
clang::OMPClauseWithPreInit::getPreInitStmt
const Stmt * getPreInitStmt() const
Get pre-initialization statement for the clause.
Definition: OpenMPClause.h:121
clang::Stmt::children
child_range children()
Definition: Stmt.cpp:237
clang::PseudoObjectExpr::semantics_end
semantics_iterator semantics_end()
Definition: Expr.h:5373
clang::CXXDependentScopeMemberExpr::getNumTemplateArgs
unsigned getNumTemplateArgs() const
Retrieve the number of template arguments provided as part of this template-id.
Definition: ExprCXX.h:3486
DecodeOperatorCall
static Stmt::StmtClass DecodeOperatorCall(const CXXOperatorCallExpr *S, UnaryOperatorKind &UnaryOp, BinaryOperatorKind &BinaryOp)
Definition: StmtProfile.cpp:1287
clang::BinaryOperator
A builtin binary operation expression such as "x + y" or "x <= y".
Definition: Expr.h:3287
clang::GenericSelectionExpr::getAssocExpr
const Expr * getAssocExpr(unsigned i) const
Definition: Expr.h:5043
clang::GCCAsmStmt::getInputConstraintLiteral
const StringLiteral * getInputConstraintLiteral(unsigned i) const
Definition: Stmt.h:2802
clang::CXXForRangeStmt
CXXForRangeStmt - This represents C++0x [stmt.ranged]&#39;s ranged for statement, represented as &#39;for (ra...
Definition: StmtCXX.h:127
ExprObjC.h
clang::MemberExpr::isArrow
bool isArrow() const
Definition: Expr.h:2874
clang::OMPClauseWithPostUpdate
Class that handles post-update expression for some clauses, like &#39;lastprivate&#39;, &#39;reduction&#39; etc...
Definition: OpenMPClause.h:135
clang::OMPCancellationPointDirective
This represents &#39;#pragma omp cancellation point&#39; directive.
Definition: StmtOpenMP.h:2718
clang::OMPDefaultClause
This represents &#39;default&#39; clause in the &#39;#pragma omp ...&#39; directive.
Definition: OpenMPClause.h:606
clang::ObjCStringLiteral
ObjCStringLiteral, used for Objective-C string literals i.e.
Definition: ExprObjC.h:51
clang::CaseStmt
CaseStmt - Represent a case statement.
Definition: Stmt.h:1394
clang::TypoExpr
TypoExpr - Internal placeholder for expressions where typo correction still needs to be performed and...
Definition: Expr.h:5562
clang::OMPFinalClause
This represents &#39;final&#39; clause in the &#39;#pragma omp ...&#39; directive.
Definition: OpenMPClause.h:330
clang::OMPMergeableClause
This represents &#39;mergeable&#39; clause in the &#39;#pragma omp ...&#39; directive.
Definition: OpenMPClause.h:1270
clang::OMPTeamsDirective
This represents &#39;#pragma omp teams&#39; directive.
Definition: StmtOpenMP.h:2661
clang::ParenListExpr
Definition: Expr.h:4919
clang::OverloadExpr::getQualifier
NestedNameSpecifier * getQualifier() const
Fetches the nested-name qualifier, if one was given.
Definition: ExprCXX.h:2750
clang::CastExpr
CastExpr - Base class for type casts, including both implicit casts (ImplicitCastExpr) and explicit c...
Definition: Expr.h:2998
clang::OMPReductionClause
This represents clause &#39;reduction&#39; in the &#39;#pragma omp ...&#39; directives.
Definition: OpenMPClause.h:1921
clang::CXXDefaultInitExpr::getField
FieldDecl * getField()
Get the field whose initializer will be used.
Definition: ExprCXX.h:1158
clang::OffsetOfNode
Helper class for OffsetOfExpr.
Definition: Expr.h:2013
clang::OMPTeamsDistributeSimdDirective
This represents &#39;#pragma omp teams distribute simd&#39; combined directive.
Definition: StmtOpenMP.h:3518
clang::CXXBindTemporaryExpr
Represents binding an expression to a temporary.
Definition: ExprCXX.h:1217
clang::GCCAsmStmt::getClobberStringLiteral
StringLiteral * getClobberStringLiteral(unsigned i)
Definition: Stmt.h:2836
clang::GCCAsmStmt::getOutputName
StringRef getOutputName(unsigned i) const
Definition: Stmt.h:2765
clang::CXXBindTemporaryExpr::getTemporary
CXXTemporary * getTemporary()
Definition: ExprCXX.h:1236
clang::LambdaExpr
A C++ lambda expression, which produces a function object (of unspecified type) that can be invoked l...
Definition: ExprCXX.h:1649
clang::Expr::isTypeDependent
bool isTypeDependent() const
isTypeDependent - Determines whether this expression is type-dependent (C++ [temp.dep.expr]), which means that its type could change from one template instantiation to the next.
Definition: Expr.h:167
OMPCopyinClause::source_exprs
helper_expr_const_range source_exprs() const
Definition: OpenMPClause.h:3049
clang::QualType::getAsOpaquePtr
void * getAsOpaquePtr() const
Definition: Type.h:683
clang::DependentScopeDeclRefExpr::getDeclName
DeclarationName getDeclName() const
Retrieve the name that this expression refers to.
Definition: ExprCXX.h:2985
clang::CXXDependentScopeMemberExpr
Represents a C++ member access expression where the actual member referenced could not be resolved be...
Definition: ExprCXX.h:3284
clang::FloatingLiteral
Definition: Expr.h:1445
OMPIsDevicePtrClause
This represents clause &#39;is_device_ptr&#39; in the &#39;#pragma omp ...&#39; directives.
Definition: OpenMPClause.h:5214
llvm::ArrayRef
Definition: LLVM.h:32
clang::Stmt::StmtClass
StmtClass
Definition: Stmt.h:68
OMPCopyprivateClause::source_exprs
helper_expr_const_range source_exprs() const
Definition: OpenMPClause.h:3200
clang::CXXDefaultArgExpr
A default argument (C++ [dcl.fct.default]).
Definition: ExprCXX.h:1073
clang::FloatingLiteral::isExact
bool isExact() const
Definition: Expr.h:1485
clang::Decl::getCanonicalDecl
virtual Decl * getCanonicalDecl()
Retrieves the "canonical" declaration of the given declaration.
Definition: DeclBase.h:870
clang::CXXUuidofExpr::isTypeOperand
bool isTypeOperand() const
Definition: ExprCXX.h:916
clang::OMPReductionClause::privates
helper_expr_const_range privates() const
Definition: OpenMPClause.h:2091
OMPFromClause
This represents clause &#39;from&#39; in the &#39;#pragma omp ...&#39; directives.
Definition: OpenMPClause.h:4950
clang::CXXThisExpr
Represents the this expression in C++.
Definition: ExprCXX.h:976
clang::UnresolvedMemberExpr::getMemberName
DeclarationName getMemberName() const
Retrieve the name of the member that this expression refers to.
Definition: ExprCXX.h:3650
clang::ObjCIvarRefExpr::getDecl
ObjCIvarDecl * getDecl()
Definition: ExprObjC.h:543
clang::ODRHash::AddTemplateName
void AddTemplateName(TemplateName Name)
Definition: ODRHash.cpp:134
clang::CXXDeleteExpr::isArrayForm
bool isArrayForm() const
Definition: ExprCXX.h:2197
clang::OMPTaskReductionClause::reduction_ops
helper_expr_const_range reduction_ops() const
Definition: OpenMPClause.h:2335
clang::OMPTargetParallelForSimdDirective
This represents &#39;#pragma omp target parallel for simd&#39; directive.
Definition: StmtOpenMP.h:3316
clang::ExplicitCastExpr::getTypeAsWritten
QualType getTypeAsWritten() const
getTypeAsWritten - Returns the type that this expression is casting to, as written in the source code...
Definition: Expr.h:3213
clang::OMPArraySectionExpr
OpenMP 4.0 [2.4, Array Sections].
Definition: ExprOpenMP.h:45
clang::OMPDynamicAllocatorsClause
This represents &#39;dynamic_allocators&#39; clause in the &#39;#pragma omp requires&#39; directive.
Definition: OpenMPClause.h:838
clang::ConditionalOperator
ConditionalOperator - The ?: ternary operator.
Definition: Expr.h:3582
clang::CXXPseudoDestructorExpr
Represents a C++ pseudo-destructor (C++ [expr.pseudo]).
Definition: ExprCXX.h:2286
clang::CompoundStmt
CompoundStmt - This represents a group of statements like { stmt stmt }.
Definition: Stmt.h:1241
clang::ArrayTypeTraitExpr::getQueriedType
QualType getQueriedType() const
Definition: ExprCXX.h:2555
OMPThreadsClause
This represents &#39;threads&#39; clause in the &#39;#pragma omp ...&#39; directive.
Definition: OpenMPClause.h:3492
clang::OMPTaskgroupDirective
This represents &#39;#pragma omp taskgroup&#39; directive.
Definition: StmtOpenMP.h:1971
clang::OMPLastprivateClause::destination_exprs
helper_expr_const_range destination_exprs() const
Definition: OpenMPClause.h:1823
clang::OMPSimdlenClause::getSimdlen
Expr * getSimdlen() const
Return safe iteration space distance.
Definition: OpenMPClause.h:535
clang::CXXConstructExpr::getConstructor
CXXConstructorDecl * getConstructor() const
Get the constructor that this expression will (ultimately) call.
Definition: ExprCXX.h:1334
clang::OMPLastprivateClause::source_exprs
helper_expr_const_range source_exprs() const
Definition: OpenMPClause.h:1814
clang::MemberExpr::getQualifier
NestedNameSpecifier * getQualifier() const
If the member name was qualified, retrieves the nested-name-specifier that precedes the member name...
Definition: Expr.h:2801
OMPAlignedClause
This represents clause &#39;aligned&#39; in the &#39;#pragma omp ...&#39; directives.
Definition: OpenMPClause.h:2845
clang::CXXDependentScopeMemberExpr::getTemplateArgs
const TemplateArgumentLoc * getTemplateArgs() const
Retrieve the template arguments provided as part of this template-id.
Definition: ExprCXX.h:3477
clang::UnaryExprOrTypeTraitExpr
UnaryExprOrTypeTraitExpr - expression with either a type or (unevaluated) expression operand...
Definition: Expr.h:2222
clang::OMPTaskReductionClause
This represents clause &#39;task_reduction&#39; in the &#39;#pragma omp taskgroup&#39; directives.
Definition: OpenMPClause.h:2143
clang::ConstantExpr
ConstantExpr - An expression that occurs in a constant context.
Definition: Expr.h:904
clang::VAArgExpr
Represents a call to the builtin function __builtin_va_arg.
Definition: Expr.h:4091
clang::TemplateArgument::getAsDecl
ValueDecl * getAsDecl() const
Retrieve the declaration for a declaration non-type template argument.
Definition: TemplateBase.h:264
OMPCopyprivateClause::destination_exprs
helper_expr_const_range destination_exprs() const
Definition: OpenMPClause.h:3209
clang::CXXDependentScopeMemberExpr::isImplicitAccess
bool isImplicitAccess() const
True if this is an implicit access, i.e.
Definition: ExprCXX.h:3374
clang::OffsetOfNode::Field
A field.
Definition: Expr.h:2020
clang::CharacterLiteral::getValue
unsigned getValue() const
Definition: Expr.h:1426
clang::OMPDistributeDirective
This represents &#39;#pragma omp distribute&#39; directive.
Definition: StmtOpenMP.h:2972
OMPDependClause
This represents implicit clause &#39;depend&#39; for the &#39;#pragma omp task&#39; directive.
Definition: OpenMPClause.h:3312
clang::CXXScalarValueInitExpr
An expression "T()" which creates a value-initialized rvalue of type T, which is a non-class type...
Definition: ExprCXX.h:1871
clang::DesignatedInitExpr::designators
llvm::MutableArrayRef< Designator > designators()
Definition: Expr.h:4622
clang::OMPProcBindClause
This represents &#39;proc_bind&#39; clause in the &#39;#pragma omp ...&#39; directive.
Definition: OpenMPClause.h:675
clang::OMPCaptureClause
This represents &#39;capture&#39; clause in the &#39;#pragma omp atomic&#39; directive.
Definition: OpenMPClause.h:1383
clang::Expr
This represents one expression.
Definition: Expr.h:106
clang::OverloadExpr::getTemplateArgs
TemplateArgumentLoc const * getTemplateArgs() const
Definition: ExprCXX.h:2788
clang::OffsetOfNode::getFieldName
IdentifierInfo * getFieldName() const
For a field or identifier offsetof node, returns the name of the field.
Definition: Expr.cpp:1493
clang::UnresolvedMemberExpr::isArrow
bool isArrow() const
Determine whether this member expression used the &#39;->&#39; operator; otherwise, it used the &#39;...
Definition: ExprCXX.h:3634
clang::OMPSimdlenClause
This represents &#39;simdlen&#39; clause in the &#39;#pragma omp ...&#39; directive.
Definition: OpenMPClause.h:501
ConstOMPClauseVisitor
Definition: OpenMPClause.h:5346
clang::TemplateTypeParmDecl
Declaration of a template type parameter.
Definition: DeclTemplate.h:1158
OMPNumTasksClause::getNumTasks
Expr * getNumTasks() const
Return safe iteration space distance.
Definition: OpenMPClause.h:4577
clang::UnresolvedMemberExpr::isImplicitAccess
bool isImplicitAccess() const
True if this is an implicit access, i.e., one in which the member being accessed was not written in t...
Definition: ExprCXX.cpp:1435
clang::Type::castAs
const T * castAs() const
Member-template castAs<specific type>.
Definition: Type.h:6811
clang::CXXTemporaryObjectExpr
Represents a C++ functional cast expression that builds a temporary object.
Definition: ExprCXX.h:1581
clang::TemplateArgument::NullPtr
The template argument is a null pointer or null pointer to member that was provided for a non-type te...
Definition: TemplateBase.h:68
clang::DesignatedInitUpdateExpr
Definition: Expr.h:4749
clang::CXXConstCastExpr
A C++ const_cast expression (C++ [expr.const.cast]).
Definition: ExprCXX.h:444
clang::BlockExpr
BlockExpr - Adaptor class for mixing a BlockDecl with expressions.
Definition: Expr.h:5177
clang::CXXPseudoDestructorExpr::getDestroyedTypeIdentifier
IdentifierInfo * getDestroyedTypeIdentifier() const
In a dependent pseudo-destructor expression for which we do not have full type information on the des...
Definition: ExprCXX.h:2386
clang::OMPTargetTeamsDistributeParallelForSimdDirective
This represents &#39;#pragma omp target teams distribute parallel for simd&#39; combined directive.
Definition: StmtOpenMP.h:3948
clang::UnaryExprOrTypeTraitExpr::getArgumentType
QualType getArgumentType() const
Definition: Expr.h:2259
clang::CXXPseudoDestructorExpr::isArrow
bool isArrow() const
Determine whether this pseudo-destructor expression was written using an &#39;->&#39; (otherwise, it used a &#39;.
Definition: ExprCXX.h:2349
clang::OverloadExpr::getNumTemplateArgs
unsigned getNumTemplateArgs() const
Definition: ExprCXX.h:2794
clang::ObjCDictionaryLiteral
ObjCDictionaryLiteral - AST node to represent objective-c dictionary literals; as in:"name" : NSUserN...
Definition: ExprObjC.h:288
clang::ObjCAtSynchronizedStmt
Represents Objective-C&#39;s @synchronized statement.
Definition: StmtObjC.h:262
clang::ObjCSelectorExpr
ObjCSelectorExpr used for @selector in Objective-C.
Definition: ExprObjC.h:429
clang::OffsetOfExpr::getTypeSourceInfo
TypeSourceInfo * getTypeSourceInfo() const
Definition: Expr.h:2159
clang::SizeOfPackExpr
Represents an expression that computes the length of a parameter pack.
Definition: ExprCXX.h:3844
clang::CXXTryStmt
CXXTryStmt - A C++ try block, including all handlers.
Definition: StmtCXX.h:65
clang::AsTypeExpr
AsTypeExpr - Clang builtin function __builtin_astype [OpenCL 6.2.4.2] This AST node provides support ...
Definition: Expr.h:5226
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:2018
clang::NonTypeTemplateParmDecl
NonTypeTemplateParmDecl - Declares a non-type template parameter, e.g., "Size" in.
Definition: DeclTemplate.h:1261
clang::ExtVectorElementExpr::getAccessor
IdentifierInfo & getAccessor() const
Definition: Expr.h:5138
clang::TemplateName
Represents a C++ template name within the type system.
Definition: TemplateName.h:179
clang::OMPTargetTeamsDistributeSimdDirective
This represents &#39;#pragma omp target teams distribute simd&#39; combined directive.
Definition: StmtOpenMP.h:4021
clang::ArrayTypeTraitExpr::getTrait
ArrayTypeTrait getTrait() const
Definition: ExprCXX.h:2553
clang::OMPReductionClause::rhs_exprs
helper_expr_const_range rhs_exprs() const
Definition: OpenMPClause.h:2107
clang::OMPOrderedClause
This represents &#39;ordered&#39; clause in the &#39;#pragma omp ...&#39; directive.
Definition: OpenMPClause.h:1129
clang::OffsetOfNode::getKind
Kind getKind() const
Determine what kind of offsetof node this is.
Definition: Expr.h:2067
clang::Expr::getType
QualType getType() const
Definition: Expr.h:128
clang::OMPForDirective
This represents &#39;#pragma omp for&#39; directive.
Definition: StmtOpenMP.h:1104
StmtVisitor.h
clang::GotoStmt::getLabel
LabelDecl * getLabel() const
Definition: Stmt.h:2317
clang::CXXFoldExpr
Represents a folding of a pack over an operator.
Definition: ExprCXX.h:4266
clang::ObjCEncodeExpr::getEncodedType
QualType getEncodedType() const
Definition: ExprObjC.h:407
clang::ReturnStmt
ReturnStmt - This represents a return, optionally of an expression: return; return 4;...
Definition: Stmt.h:2443
clang::OMPTargetTeamsDirective
This represents &#39;#pragma omp target teams&#39; directive.
Definition: StmtOpenMP.h:3737
clang::ObjCMessageExpr
An expression that sends a message to the given Objective-C object or class.
Definition: ExprObjC.h:904
clang::MSAsmStmt
This represents a Microsoft inline-assembly statement extension.
Definition: Stmt.h:2850
clang::ObjCPropertyRefExpr::getImplicitPropertyGetter
ObjCMethodDecl * getImplicitPropertyGetter() const
Definition: ExprObjC.h:675
clang::NUM_OVERLOADED_OPERATORS
Definition: OperatorKinds.h:27
clang::UnaryOperator
UnaryOperator - This represents the unary-expression&#39;s (except sizeof and alignof), the postinc/postdec operators from postfix-expression, and various extensions.
Definition: Expr.h:1896
clang::DesignatedInitExpr::usesGNUSyntax
bool usesGNUSyntax() const
Determines whether this designated initializer used the deprecated GNU syntax for designated initiali...
Definition: Expr.h:4649
clang::AtomicExpr::getOp
AtomicOp getOp() const
Definition: Expr.h:5497
clang::MSPropertyRefExpr
A member reference to an MSPropertyDecl.
Definition: ExprCXX.h:759
clang::TemplateTemplateParmDecl
TemplateTemplateParmDecl - Declares a template template parameter, e.g., "T" in.
Definition: DeclTemplate.h:1446
clang::SubstNonTypeTemplateParmExpr
Represents a reference to a non-type template parameter that has been substituted with a template arg...
Definition: ExprCXX.h:3958
clang::OffsetOfExpr::getComponent
const OffsetOfNode & getComponent(unsigned Idx) const
Definition: Expr.h:2166
clang::DefaultStmt
Definition: Stmt.h:1544
OMPDeviceClause::getDevice
Expr * getDevice()
Return device number.
Definition: OpenMPClause.h:3474
clang::OMPCancelDirective
This represents &#39;#pragma omp cancel&#39; directive.
Definition: StmtOpenMP.h:2776
clang::OMPCollapseClause
This represents &#39;collapse&#39; clause in the &#39;#pragma omp ...&#39; directive.
Definition: OpenMPClause.h:555
clang::OMPFirstprivateClause
This represents clause &#39;firstprivate&#39; in the &#39;#pragma omp ...&#39; directives.
Definition: OpenMPClause.h:1535
clang::DeclRefExpr::getDecl
ValueDecl * getDecl()
Definition: Expr.h:1114
clang::ObjCBridgedCastExpr::getBridgeKind
ObjCBridgeCastKind getBridgeKind() const
Determine which kind of bridge is being performed via this cast.
Definition: ExprObjC.h:1602
clang::FunctionParmPackExpr::iterator
ParmVarDecl *const * iterator
Iterators over the parameters which the parameter pack expanded into.
Definition: ExprCXX.h:4114
clang::LCK_StarThis
Definition: Lambda.h:36
clang::CStyleCastExpr
CStyleCastExpr - An explicit cast in C (C99 6.5.4) or a C-style cast in C++ (C++ [expr.cast]), which uses the syntax (Type)expr.
Definition: Expr.h:3224
clang::QualType::isNull
bool isNull() const
Return true if this QualType doesn&#39;t point to a type yet.
Definition: Type.h:703
clang::CXXBoolLiteralExpr::getValue
bool getValue() const
Definition: ExprCXX.h:574
clang::ImaginaryLiteral
ImaginaryLiteral - We support imaginary integer and floating point literals, like "1...
Definition: Expr.h:1517
clang::OMPFlushDirective
This represents &#39;#pragma omp flush&#39; directive.
Definition: StmtOpenMP.h:2044
clang::OMPParallelForSimdDirective
This represents &#39;#pragma omp parallel for simd&#39; directive.
Definition: StmtOpenMP.h:1632
clang::DoStmt
DoStmt - This represents a &#39;do/while&#39; stmt.
Definition: Stmt.h:2185
clang::OMPSeqCstClause
This represents &#39;seq_cst&#39; clause in the &#39;#pragma omp atomic&#39; directive.
Definition: OpenMPClause.h:1412
clang::OMPLastprivateClause::assignment_ops
helper_expr_const_range assignment_ops() const
Definition: OpenMPClause.h:1833
clang::OMPUntiedClause
This represents &#39;untied&#39; clause in the &#39;#pragma omp ...&#39; directive.
Definition: OpenMPClause.h:1241
clang::CXXDependentScopeMemberExpr::getQualifier
NestedNameSpecifier * getQualifier() const
Retrieve the nested-name-specifier that qualifies the member name.
Definition: ExprCXX.h:3399
clang::OMPUnifiedAddressClause
This represents &#39;unified_address&#39; clause in the &#39;#pragma omp requires&#39; directive. ...
Definition: OpenMPClause.h:745
clang::OMPTargetEnterDataDirective
This represents &#39;#pragma omp target enter data&#39; directive.
Definition: StmtOpenMP.h:2404
OMPNumTeamsClause
This represents &#39;num_teams&#39; clause in the &#39;#pragma omp ...&#39; directive.
Definition: OpenMPClause.h:4278
clang::CXXDynamicCastExpr
A C++ dynamic_cast expression (C++ [expr.dynamic.cast]).
Definition: ExprCXX.h:362
clang::OpaqueValueExpr
OpaqueValueExpr - An expression referring to an opaque object of a fixed type and value class...
Definition: Expr.h:945
clang::ConvertVectorExpr
ConvertVectorExpr - Clang builtin function __builtin_convertvector This AST node provides support for...
Definition: Expr.h:3914
false
#define false
Definition: stdbool.h:33
clang::OverloadExpr
A reference to an overloaded function set, either an UnresolvedLookupExpr or an UnresolvedMemberExpr...
Definition: ExprCXX.h:2635
clang::OffsetOfNode::Identifier
A field in a dependent type, known only by its name.
Definition: Expr.h:2022
clang::CapturedStmt
This captures a statement into a function.
Definition: Stmt.h:3105
clang::CXXInheritedCtorInitExpr
Represents a call to an inherited base class constructor from an inheriting constructor.
Definition: ExprCXX.h:1448
clang::ExpressionTraitExpr::getTrait
ExpressionTrait getTrait() const
Definition: ExprCXX.h:2617
clang::PseudoObjectExpr
PseudoObjectExpr - An expression which accesses a pseudo-object l-value.
Definition: Expr.h:5299
clang::ObjCPropertyRefExpr::isImplicitProperty
bool isImplicitProperty() const
Definition: ExprObjC.h:667
clang::OMPInReductionClause::taskgroup_descriptors
helper_expr_const_range taskgroup_descriptors() const
Definition: OpenMPClause.h:2578
clang::OMPSingleDirective
This represents &#39;#pragma omp single&#39; directive.
Definition: StmtOpenMP.h:1376
clang::LambdaExpr::explicit_capture_begin
capture_iterator explicit_capture_begin() const
Retrieve an iterator pointing to the first explicit lambda capture.
Definition: ExprCXX.cpp:1170
OMPHintClause
This represents &#39;hint&#39; clause in the &#39;#pragma omp ...&#39; directive.
Definition: OpenMPClause.h:4593
clang::CXXDependentScopeMemberExpr::hasExplicitTemplateArgs
bool hasExplicitTemplateArgs() const
Determines whether this member expression actually had a C++ template argument list explicitly specif...
Definition: ExprCXX.h:3465
clang::OMPExecutableDirective
This is a basic class for representing single OpenMP executable directive.
Definition: StmtOpenMP.h:33
clang::OMPFirstprivateClause::private_copies
private_copies_range private_copies()
Definition: OpenMPClause.h:1623
clang::CXXNewExpr
Represents a new-expression for memory allocation and constructor calls, e.g: "new CXXNewExpr(foo)"...
Definition: ExprCXX.h:1914
clang::UserDefinedLiteral
A call to a literal operator (C++11 [over.literal]) written as a user-defined literal (C++11 [lit...
Definition: ExprCXX.h:481
clang::DeclarationNameInfo::getName
DeclarationName getName() const
getName - Returns the embedded declaration name.
Definition: DeclarationName.h:714
clang::OMPScheduleClause
This represents &#39;schedule&#39; clause in the &#39;#pragma omp ...&#39; directive.
Definition: OpenMPClause.h:948
clang::CXXMemberCallExpr
Represents a call to a member function that may be written either with member call syntax (e...
Definition: ExprCXX.h:171
clang::SEHExceptStmt
Definition: Stmt.h:2950
clang::ODRHash::AddIdentifierInfo
void AddIdentifierInfo(const IdentifierInfo *II)
Definition: ODRHash.cpp:30
clang::DeclStmt
DeclStmt - Adaptor class for mixing declarations with statements and expressions. ...
Definition: Stmt.h:1143
clang::OMPSharedClause
This represents clause &#39;shared&#39; in the &#39;#pragma omp ...&#39; directives.
Definition: OpenMPClause.h:1860
clang::OMPCriticalDirective::getDirectiveName
DeclarationNameInfo getDirectiveName() const
Return name of the directive.
Definition: StmtOpenMP.h:1536
OMPPriorityClause::getPriority
Expr * getPriority()
Return Priority number.
Definition: OpenMPClause.h:4444
clang::NestedNameSpecifier
Represents a C++ nested name specifier, such as "\::std::vector<int>::".
Definition: NestedNameSpecifier.h:49
clang::OMPTaskwaitDirective
This represents &#39;#pragma omp taskwait&#39; directive.
Definition: StmtOpenMP.h:1927
clang::CXXNewExpr::getAllocatedType
QualType getAllocatedType() const
Definition: ExprCXX.h:2007
clang::AtomicExpr
AtomicExpr - Variadic atomic builtins: __atomic_exchange, __atomic_fetch_*, __atomic_load, __atomic_store, and __atomic_compare_exchange_*, for the similarly-named C++11 instructions, and __c11 variants for <stdatomic.h>, and corresponding __opencl_atomic_* for OpenCL 2.0.
Definition: Expr.h:5433
clang::UnaryExprOrTypeTraitExpr::getKind
UnaryExprOrTypeTrait getKind() const
Definition: Expr.h:2253
clang::CXXNewExpr::isArray
bool isArray() const
Definition: ExprCXX.h:2038
clang::TemplateName::Profile
void Profile(llvm::FoldingSetNodeID &ID)
Definition: TemplateName.h:306
clang::ObjCProtocolExpr
ObjCProtocolExpr used for protocol expression in Objective-C.
Definition: ExprObjC.h:474
clang::GCCAsmStmt::getOutputConstraintLiteral
const StringLiteral * getOutputConstraintLiteral(unsigned i) const
Definition: Stmt.h:2774
clang::ImplicitCastExpr
ImplicitCastExpr - Allows us to explicitly represent implicit type conversions, which have no direct ...
Definition: Expr.h:3115
clang::CharacterLiteral::getKind
CharacterKind getKind() const
Definition: Expr.h:1419
clang::OMPTargetDirective
This represents &#39;#pragma omp target&#39; directive.
Definition: StmtOpenMP.h:2288
clang::OMPCollapseClause::getNumForLoops
Expr * getNumForLoops() const
Return the number of associated for-loops.
Definition: OpenMPClause.h:590
clang::CXXNewExpr::isParenTypeId
bool isParenTypeId() const
Definition: ExprCXX.h:2068
clang::ODRHash::AddNestedNameSpecifier
void AddNestedNameSpecifier(const NestedNameSpecifier *NNS)
Definition: ODRHash.cpp:105
clang::TemplateArgument::getAsIntegral
llvm::APSInt getAsIntegral() const
Retrieve the template argument as an integral value.
Definition: TemplateBase.h:301
clang::CharacterLiteral
Definition: Expr.h:1392
clang::ExpressionTraitExpr
An expression trait intrinsic.
Definition: ExprCXX.h:2580
clang::ObjCMessageExpr::getMethodDecl
const ObjCMethodDecl * getMethodDecl() const
Definition: ExprObjC.h:1303
ExprOpenMP.h
clang::SwitchStmt::getConditionVariable
VarDecl * getConditionVariable()
Retrieve the variable declared in this "switch" statement, if any.
Definition: Stmt.cpp:965
clang::OMPOrderedDirective
This represents &#39;#pragma omp ordered&#39; directive.
Definition: StmtOpenMP.h:2099
clang::StmtExpr
StmtExpr - This is the GNU Statement Expression extension: ({int X=4; X;}).
Definition: Expr.h:3801
clang::OMPTargetUpdateDirective
This represents &#39;#pragma omp target update&#39; directive.
Definition: StmtOpenMP.h:3040
clang::ObjCBoxedExpr
ObjCBoxedExpr - used for generalized expression boxing.
Definition: ExprObjC.h:117
clang::UnaryExprOrTypeTraitExpr::isArgumentType
bool isArgumentType() const
Definition: Expr.h:2258
clang::OMPInReductionClause::lhs_exprs
helper_expr_const_range lhs_exprs() const
Definition: OpenMPClause.h:2552
clang::CXXNewExpr::getOperatorDelete
FunctionDecl * getOperatorDelete() const
Definition: ExprCXX.h:2035
clang::MSDependentExistsStmt
Representation of a Microsoft __if_exists or __if_not_exists statement with a dependent name...
Definition: StmtCXX.h:241
clang::DependentScopeDeclRefExpr
A qualified reference to a name whose declaration cannot yet be resolved.
Definition: ExprCXX.h:2942
clang::CXXNewExpr::getInitializationStyle
InitializationStyle getInitializationStyle() const
The kind of initializer this new-expression has.
Definition: ExprCXX.h:2082
clang::TemplateArgument::pack_elements
ArrayRef< TemplateArgument > pack_elements() const
Iterator range referencing all of the elements of a template argument pack.
Definition: TemplateBase.h:354
clang::CompoundAssignOperator
CompoundAssignOperator - For compound assignments (e.g.
Definition: Expr.h:3504
clang::GenericSelectionExpr
Represents a C11 generic selection.
Definition: Expr.h:5010
clang::SizeOfPackExpr::getPartialArguments
ArrayRef< TemplateArgument > getPartialArguments() const
Get.
Definition: ExprCXX.h:3937
clang::AddrLabelExpr
AddrLabelExpr - The GNU address of label extension, representing &&label.
Definition: Expr.h:3757
clang::ObjCBridgedCastExpr
An Objective-C "bridged" cast expression, which casts between Objective-C pointers and C pointers...
Definition: ExprObjC.h:1575
Node
ast_type_traits::DynTypedNode Node
Definition: ASTMatchFinder.cpp:61
clang::FunctionParmPackExpr
Represents a reference to a function parameter pack that has been substituted but not yet expanded...
Definition: ExprCXX.h:4078
clang::TemplateArgument
Represents a template argument.
Definition: TemplateBase.h:51
clang::CXXPseudoDestructorExpr::getDestroyedTypeInfo
TypeSourceInfo * getDestroyedTypeInfo() const
Retrieve the source location information for the type being destroyed.
Definition: ExprCXX.h:2379
clang::NullStmt
NullStmt - This is the null statement ";": C99 6.8.3p3.
Definition: Stmt.h:1210
clang::CXXTypeidExpr::isTypeOperand
bool isTypeOperand() const
Definition: ExprCXX.h:709
clang::GenericSelectionExpr::getNumAssocs
unsigned getNumAssocs() const
Definition: Expr.h:5037
clang
Dataflow Directional Tag Classes.
Definition: CFGReachabilityAnalysis.h:22
OMPDeviceClause
This represents &#39;device&#39; clause in the &#39;#pragma omp ...&#39; directive.
Definition: OpenMPClause.h:3431
clang::NestedNameSpecifierLoc::getNestedNameSpecifier
NestedNameSpecifier * getNestedNameSpecifier() const
Retrieve the nested-name-specifier to which this instance refers.
Definition: NestedNameSpecifier.h:268
clang::AsmStmt::isVolatile
bool isVolatile() const
Definition: Stmt.h:2556
clang::WhileStmt::getConditionVariable
VarDecl * getConditionVariable()
Retrieve the variable declared in this "while" statement, if any.
Definition: Stmt.cpp:1021
clang::PredefinedExpr
[C99 6.4.2.2] - A predefined identifier such as func.
Definition: Expr.h:1758
clang::UnaryOperatorKind
UnaryOperatorKind
Definition: OperationKinds.h:31
clang::CXXDeleteExpr
Represents a delete expression for memory deallocation and destructor calls, e.g. ...
Definition: ExprCXX.h:2170
clang::AsmStmt::isSimple
bool isSimple() const
Definition: Stmt.h:2553
clang::CXXOperatorCallExpr::getOperator
OverloadedOperatorKind getOperator() const
Returns the kind of overloaded operator that this expression refers to.
Definition: ExprCXX.h:107
clang::OMPInReductionClause::privates
helper_expr_const_range privates() const
Definition: OpenMPClause.h:2544
clang::SubstNonTypeTemplateParmPackExpr::getParameterPack
NonTypeTemplateParmDecl * getParameterPack() const
Retrieve the non-type template parameter pack being substituted.
Definition: ExprCXX.h:4042
clang::MSPropertyRefExpr::getPropertyDecl
MSPropertyDecl * getPropertyDecl() const
Definition: ExprCXX.h:811
clang::TemplateArgument::TemplateExpansion
The template argument is a pack expansion of a template name that was provided for a template templat...
Definition: TemplateBase.h:80
clang::CXXThisExpr::isImplicit
bool isImplicit() const
Definition: ExprCXX.h:997
clang::OMPSectionDirective
This represents &#39;#pragma omp section&#39; directive.
Definition: StmtOpenMP.h:1314
clang::OMPTeamsDistributeDirective
This represents &#39;#pragma omp teams distribute&#39; directive.
Definition: StmtOpenMP.h:3450
clang::GenericSelectionExpr::getAssocType
QualType getAssocType(unsigned i) const
Definition: Expr.h:5061
clang::ObjCAvailabilityCheckExpr
A runtime availability query.
Definition: ExprObjC.h:1636
clang::CXXReinterpretCastExpr
A C++ reinterpret_cast expression (C++ [expr.reinterpret.cast]).
Definition: ExprCXX.h:404
clang::OMPSimdDirective
This represents &#39;#pragma omp simd&#39; directive.
Definition: StmtOpenMP.h:1039
clang::CoyieldExpr
Represents a &#39;co_yield&#39; expression.
Definition: ExprCXX.h:4502
clang::CXXDependentScopeMemberExpr::getMember
DeclarationName getMember() const
Retrieve the name of the member that this expression refers to.
Definition: ExprCXX.h:3430
clang::DeclarationName
The name of a declaration.
Definition: DeclarationName.h:146
clang::Stmt::getStmtClass
StmtClass getStmtClass() const
Definition: Stmt.h:1029
clang::Decl::getKind
Kind getKind() const
Definition: DeclBase.h:421
clang::OMPTaskgroupDirective::getReductionRef
const Expr * getReductionRef() const
Returns reference to the task_reduction return variable.
Definition: StmtOpenMP.h:2022
clang::PackExpansionExpr
Represents a C++11 pack expansion that produces a sequence of expressions.
Definition: ExprCXX.h:3772
clang::OMPUnifiedSharedMemoryClause
This represents &#39;unified_shared_memory&#39; clause in the &#39;#pragma omp requires&#39; directive.
Definition: OpenMPClause.h:776
clang::OMPLinearClause
This represents clause &#39;linear&#39; in the &#39;#pragma omp ...&#39; directives.
Definition: OpenMPClause.h:2606
clang::PseudoObjectExpr::semantics_begin
semantics_iterator semantics_begin()
Definition: Expr.h:5367
clang::MSDependentExistsStmt::isIfExists
bool isIfExists() const
Determine whether this is an __if_exists statement.
Definition: StmtCXX.h:266
clang::ExplicitCastExpr
ExplicitCastExpr - An explicit cast written in the source code.
Definition: Expr.h:3190
clang::OMPAtomicDirective
This represents &#39;#pragma omp atomic&#39; directive.
Definition: StmtOpenMP.h:2154
clang::CXXTypeidExpr::getTypeOperandSourceInfo
TypeSourceInfo * getTypeOperandSourceInfo() const
Retrieve source information for the type operand.
Definition: ExprCXX.h:716
clang::APIntStorage::getValue
llvm::APInt getValue() const
Definition: Expr.h:1292
clang::SEHLeaveStmt
Represents a __leave statement.
Definition: Stmt.h:3070
clang::AddrLabelExpr::getLabel
LabelDecl * getLabel() const
Definition: Expr.h:3779
clang::OMPTaskReductionClause::privates
helper_expr_const_range privates() const
Definition: OpenMPClause.h:2311
clang::FunctionParmPackExpr::end
iterator end() const
Definition: ExprCXX.h:4116
clang::CXXNoexceptExpr
Represents a C++11 noexcept expression (C++ [expr.unary.noexcept]).
Definition: ExprCXX.h:3719
clang::SwitchStmt
SwitchStmt - This represents a &#39;switch&#39; stmt.
Definition: Stmt.h:1886
clang::LCK_VLAType
Capturing variable-length array type.
Definition: Lambda.h:39
clang::OO_None
Not an overloaded operator.
Definition: OperatorKinds.h:23
clang::CoroutineBodyStmt
Represents the body of a coroutine.
Definition: StmtCXX.h:302
clang::TemplateArgumentLoc
Location wrapper for a TemplateArgument.
Definition: TemplateBase.h:450
clang::ArraySubscriptExpr
ArraySubscriptExpr - [C99 6.5.2.1] Array Subscripting.
Definition: Expr.h:2312
clang::ObjCForCollectionStmt
Represents Objective-C&#39;s collection statement.
Definition: StmtObjC.h:24
clang::ObjCEncodeExpr
ObjCEncodeExpr, used for @encode in Objective-C.
Definition: ExprObjC.h:386
clang::ObjCAtCatchStmt::hasEllipsis
bool hasEllipsis() const
Definition: StmtObjC.h:110
OMPCopyinClause::destination_exprs
helper_expr_const_range destination_exprs() const
Definition: OpenMPClause.h:3058
clang::OffsetOfNode::Base
An implicit indirection through a C++ base class, when the field found is in a base class...
Definition: Expr.h:2025
clang::CUDAKernelCallExpr
Represents a call to a CUDA kernel function.
Definition: ExprCXX.h:219
clang::CoawaitExpr
Represents a &#39;co_await&#39; expression.
Definition: ExprCXX.h:4419
clang::SubstNonTypeTemplateParmExpr::getReplacement
Expr * getReplacement() const
Definition: ExprCXX.h:3990
clang::UnaryOperator::getOpcode
Opcode getOpcode() const
Definition: Expr.h:1921
clang::DeclStmt::decls
decl_range decls()
Definition: Stmt.h:1186
clang::StringLiteral::getBytes
StringRef getBytes() const
Allow access to clients that need the byte representation, such as ASTWriterStmt::VisitStringLiteral(...
Definition: Expr.h:1657
clang::ObjCAtFinallyStmt
Represents Objective-C&#39;s @finally statement.
Definition: StmtObjC.h:120
clang::TemplateArgument::Type
The template argument is a type.
Definition: TemplateBase.h:60
clang::TemplateArgument::Pack
The template argument is actually a parameter pack.
Definition: TemplateBase.h:91
clang::CXXDependentScopeMemberExpr::isArrow
bool isArrow() const
Determine whether this member expression used the &#39;->&#39; operator; otherwise, it used the &#39;...
Definition: ExprCXX.h:3391
clang::OMPTaskReductionClause::getNameInfo
const DeclarationNameInfo & getNameInfo() const
Gets the name info for specified reduction identifier.
Definition: OpenMPClause.h:2300
clang::LCK_This
Capturing the *this object by reference.
Definition: Lambda.h:35
clang::OMPWriteClause
This represents &#39;write&#39; clause in the &#39;#pragma omp atomic&#39; directive.
Definition: OpenMPClause.h:1325
clang::AsmStmt::getNumClobbers
unsigned getNumClobbers() const
Definition: Stmt.h:2601
clang::ObjCIvarRefExpr
ObjCIvarRefExpr - A reference to an ObjC instance variable.
Definition: ExprObjC.h:513
clang::SizeOfPackExpr::isPartiallySubstituted
bool isPartiallySubstituted() const
Determine whether this represents a partially-substituted sizeof...
Definition: ExprCXX.h:3932
clang::CXXUnresolvedConstructExpr
Describes an explicit type conversion that uses functional notion but could not be resolved because o...
Definition: ExprCXX.h:3169
clang::ASTContext::getCanonicalType
CanQualType getCanonicalType(QualType T) const
Return the canonical (structural) type corresponding to the specified potentially non-canonical type ...
Definition: ASTContext.h:2253
clang::GotoStmt
GotoStmt - This represents a direct goto.
Definition: Stmt.h:2304
clang::CXXDefaultInitExpr
A use of a default initializer in a constructor or in aggregate initialization.
Definition: ExprCXX.h:1137
clang::TemplateArgument::getKind
ArgKind getKind() const
Return the kind of stored template argument.
Definition: TemplateBase.h:235
clang::ObjCIvarRefExpr::isFreeIvar
bool isFreeIvar() const
Definition: ExprObjC.h:552
clang::ObjCPropertyRefExpr::getSuperReceiverType
QualType getSuperReceiverType() const
Definition: ExprObjC.h:730
DeclCXX.h
Defines the C++ Decl subclasses, other than those for templates (found in DeclTemplate.h) and friends (in DeclFriend.h).
clang::OMPInReductionClause::getNameInfo
const DeclarationNameInfo & getNameInfo() const
Gets the name info for specified reduction identifier.
Definition: OpenMPClause.h:2533
clang::IfStmt::getConditionVariable
VarDecl * getConditionVariable()
Retrieve the variable declared in this "if" statement, if any.
Definition: Stmt.cpp:864
clang::MemberExpr
MemberExpr - [C99 6.5.2.3] Structure and Union Members.
Definition: Expr.h:2682
clang::OMPTargetParallelDirective
This represents &#39;#pragma omp target parallel&#39; directive.
Definition: StmtOpenMP.h:2521
clang::OMPNowaitClause
This represents &#39;nowait&#39; clause in the &#39;#pragma omp ...&#39; directive.
Definition: OpenMPClause.h:1213
clang::ContinueStmt
ContinueStmt - This represents a continue.
Definition: Stmt.h:2384
clang::ArrayInitLoopExpr
Represents a loop initializing the elements of an array.
Definition: Expr.h:4803
OMPNumTasksClause
This represents &#39;num_tasks&#39; clause in the &#39;#pragma omp ...&#39; directive.
Definition: OpenMPClause.h:4543
clang::TemplateArgument::Template
The template argument is a template name that was provided for a template template parameter...
Definition: TemplateBase.h:76
clang::ChooseExpr
ChooseExpr - GNU builtin-in function __builtin_choose_expr.
Definition: Expr.h:3977
clang::ASTContext::getCanonicalTemplateName
TemplateName getCanonicalTemplateName(TemplateName Name) const
Retrieves the "canonical" template name that refers to a given template.
Definition: ASTContext.cpp:5255
clang::BinaryConditionalOperator
BinaryConditionalOperator - The GNU extension to the conditional operator which allows the middle ope...
Definition: Expr.h:3655
clang::CXXCatchStmt
CXXCatchStmt - This represents a C++ catch block.
Definition: StmtCXX.h:29
clang::OffsetOfNode::Array
An index into an array.
Definition: Expr.h:2018
clang::CXXFunctionalCastExpr
Represents an explicit C++ type conversion that uses "functional" notation (C++ [expr.type.conv]).
Definition: ExprCXX.h:1519
clang::WhileStmt
WhileStmt - This represents a &#39;while&#39; stmt.
Definition: Stmt.h:2063
clang::AttrSyntax::C
clang::LCK_ByRef
Capturing by reference.
Definition: Lambda.h:38
clang::OMPInReductionClause::reduction_ops
helper_expr_const_range reduction_ops() const
Definition: OpenMPClause.h:2568
OMPThreadLimitClause::getThreadLimit
Expr * getThreadLimit()
Return ThreadLimit number.
Definition: OpenMPClause.h:4387
Expr.h
clang::BuiltinType
This class is used for builtin types like &#39;int&#39;.
Definition: Type.h:2391
clang::ObjCIndirectCopyRestoreExpr::shouldCopy
bool shouldCopy() const
shouldCopy - True if we should do the &#39;copy&#39; part of the copy-restore.
Definition: ExprObjC.h:1548
clang::ObjCAtTryStmt
Represents Objective-C&#39;s @try ... @catch ... @finally statement.
Definition: StmtObjC.h:154
clang::CXXDeleteExpr::isGlobalDelete
bool isGlobalDelete() const
Definition: ExprCXX.h:2196
clang::OMPTaskLoopSimdDirective
This represents &#39;#pragma omp taskloop simd&#39; directive.
Definition: StmtOpenMP.h:2906
clang::StringLiteral
StringLiteral - This represents a string literal expression, e.g.
Definition: Expr.h:1566
clang::CallExpr
CallExpr - Represents a function call (C99 6.5.2.2, C++ [expr.call]).
Definition: Expr.h:2396
OMPDistScheduleClause
This represents &#39;dist_schedule&#39; clause in the &#39;#pragma omp ...&#39; directive.
Definition: OpenMPClause.h:4644
getKind
static Decl::Kind getKind(const Decl *D)
Definition: DeclBase.cpp:954
clang::CXXNamedCastExpr
Abstract class common to all of the C++ "named"/"keyword" casts.
Definition: ExprCXX.h:270
clang::OMPSectionsDirective
This represents &#39;#pragma omp sections&#39; directive.
Definition: StmtOpenMP.h:1246
OMPHintClause::getHint
Expr * getHint() const
Returns number of threads.
Definition: OpenMPClause.h:4627
clang::OMPTaskReductionClause::getQualifierLoc
NestedNameSpecifierLoc getQualifierLoc() const
Gets the nested name specifier.
Definition: OpenMPClause.h:2303
clang::ObjCBoolLiteralExpr
ObjCBoolLiteralExpr - Objective-C Boolean Literal.
Definition: ExprObjC.h:82
clang::OffsetOfExpr::getNumComponents
unsigned getNumComponents() const
Definition: Expr.h:2176
clang::OMPTargetDataDirective
This represents &#39;#pragma omp target data&#39; directive.
Definition: StmtOpenMP.h:2346
clang::CXXDefaultArgExpr::getParam
const ParmVarDecl * getParam() const
Definition: ExprCXX.h:1102
clang::TemplateArgument::getAsType
QualType getAsType() const
Retrieve the type for a type template argument.
Definition: TemplateBase.h:257
clang::DeclRefExpr
A reference to a declared variable, function, enum, etc.
Definition: Expr.h:1041
clang::OMPReductionClause::getQualifierLoc
NestedNameSpecifierLoc getQualifierLoc() const
Gets the nested name specifier.
Definition: OpenMPClause.h:2083
clang::BreakStmt
BreakStmt - This represents a break.
Definition: Stmt.h:2410
clang::OMPScheduleClause::getChunkSize
Expr * getChunkSize()
Get chunk size.
Definition: OpenMPClause.h:1107
clang::ObjCAtCatchStmt::getCatchParamDecl
const VarDecl * getCatchParamDecl() const
Definition: StmtObjC.h:94
clang::OMPNumThreadsClause::getNumThreads
Expr * getNumThreads() const
Returns number of threads.
Definition: OpenMPClause.h:426
clang::CXXUnresolvedConstructExpr::getTypeAsWritten
QualType getTypeAsWritten() const
Retrieve the type that is being constructed, as specified in the source code.
Definition: ExprCXX.h:3204
clang::ValueDecl::getType
QualType getType() const
Definition: Decl.h:648
clang::FunctionParmPackExpr::getParameterPack
ParmVarDecl * getParameterPack() const
Get the parameter pack which this expression refers to.
Definition: ExprCXX.h:4107
clang::OMPTaskyieldDirective
This represents &#39;#pragma omp taskyield&#39; directive.
Definition: StmtOpenMP.h:1839
clang::OMPDistributeParallelForSimdDirective
This represents &#39;#pragma omp distribute parallel for simd&#39; composite directive.
Definition: StmtOpenMP.h:3179
clang::CXXBoolLiteralExpr
A boolean literal, per ([C++ lex.bool] Boolean literals).
Definition: ExprCXX.h:562
clang::DeclRefExpr::getQualifier
NestedNameSpecifier * getQualifier() const
If the name was qualified, retrieves the nested-name-specifier that precedes the name.
Definition: Expr.h:1141
clang::OffsetOfExpr
OffsetOfExpr - [C99 7.17] - This represents an expression of the form offsetof(record-type, member-designator).
Definition: Expr.h:2117
clang::ExpressionTraitExpr::getQueriedExpression
Expr * getQueriedExpression() const
Definition: ExprCXX.h:2619
clang::OMPParallelSectionsDirective
This represents &#39;#pragma omp parallel sections&#39; directive.
Definition: StmtOpenMP.h:1700
clang::CXXUuidofExpr
A Microsoft C++ __uuidof expression, which gets the _GUID that corresponds to the supplied type or ex...
Definition: ExprCXX.h:887
clang::DependentScopeDeclRefExpr::getNumTemplateArgs
unsigned getNumTemplateArgs() const
Definition: ExprCXX.h:3047
clang::OMPClauseWithPostUpdate::getPostUpdateExpr
const Expr * getPostUpdateExpr() const
Get post-update expression for the clause.
Definition: OpenMPClause.h:151
clang::ASTContext::getCanonicalNestedNameSpecifier
NestedNameSpecifier * getCanonicalNestedNameSpecifier(NestedNameSpecifier *NNS) const
Retrieves the "canonical" nested name specifier for a given nested name specifier.
Definition: ASTContext.cpp:5354
clang::TemplateArgument::getAsTemplateOrTemplatePattern
TemplateName getAsTemplateOrTemplatePattern() const
Retrieve the template argument as a template name; if the argument is a pack expansion, return the pattern as a template name.
Definition: TemplateBase.h:288
clang::CXXFoldExpr::getOperator
BinaryOperatorKind getOperator() const
Definition: ExprCXX.h:4309
clang::SizeOfPackExpr::getPack
NamedDecl * getPack() const
Retrieve the parameter pack.
Definition: ExprCXX.h:3915
clang::ObjCAutoreleasePoolStmt
Represents Objective-C&#39;s @autoreleasepool Statement.
Definition: StmtObjC.h:345
clang::InitListExpr::getSyntacticForm
InitListExpr * getSyntacticForm() const
Definition: Expr.h:4342
clang::ImplicitValueInitExpr
Represents an implicitly-generated value initialization of an object of a given type.
Definition: Expr.h:4893
clang::OMPTargetParallelForDirective
This represents &#39;#pragma omp target parallel for&#39; directive.
Definition: StmtOpenMP.h:2581
OMPUseDevicePtrClause
This represents clause &#39;use_device_ptr&#39; in the &#39;#pragma omp ...&#39; directives.
Definition: OpenMPClause.h:5049
clang::TypeSourceInfo::getType
QualType getType() const
Return the type wrapped by this type source info.
Definition: Decl.h:98
clang::TypeTraitExpr::getTrait
TypeTrait getTrait() const
Determine which type trait this expression uses.
Definition: ExprCXX.h:2469
clang::OMPTaskLoopDirective
This represents &#39;#pragma omp taskloop&#39; directive.
Definition: StmtOpenMP.h:2841