Coverage Report

Created: 2018-07-19 03:59

/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/clang-build/tools/clang/include/clang/AST/AttrImpl.inc
Line
Count
Source (jump to first uncovered line)
1
/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
2
|*                                                                            *|
3
|* Attribute classes' member function definitions                             *|
4
|*                                                                            *|
5
|* Automatically generated file, do not edit!                                 *|
6
|*                                                                            *|
7
\*===----------------------------------------------------------------------===*/
8
9
0
AMDGPUFlatWorkGroupSizeAttr *AMDGPUFlatWorkGroupSizeAttr::clone(ASTContext &C) const {
10
0
  auto *A = new (C) AMDGPUFlatWorkGroupSizeAttr(getLocation(), C, min, max, getSpellingListIndex());
11
0
  A->Inherited = Inherited;
12
0
  A->IsPackExpansion = IsPackExpansion;
13
0
  A->Implicit = Implicit;
14
0
  return A;
15
0
}
16
17
0
void AMDGPUFlatWorkGroupSizeAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
18
0
  switch (SpellingListIndex) {
19
0
  default:
20
0
    llvm_unreachable("Unknown attribute spelling!");
21
0
    break;
22
0
  case 0 : {
23
0
    OS << " __attribute__((amdgpu_flat_work_group_size(" << getMin() << ", " << getMax() << ")))";
24
0
    break;
25
0
  }
26
0
  case 1 : {
27
0
    OS << " [[clang::amdgpu_flat_work_group_size(" << getMin() << ", " << getMax() << ")]]";
28
0
    break;
29
0
  }
30
0
}
31
0
}
32
33
1
const char *AMDGPUFlatWorkGroupSizeAttr::getSpelling() const {
34
1
  switch (SpellingListIndex) {
35
1
  default:
36
0
    llvm_unreachable("Unknown attribute spelling!");
37
1
    
return "(No spelling)"0
;
38
1
  case 0:
39
1
    return "amdgpu_flat_work_group_size";
40
1
  case 1:
41
0
    return "amdgpu_flat_work_group_size";
42
1
  }
43
1
}
44
45
0
AMDGPUNumSGPRAttr *AMDGPUNumSGPRAttr::clone(ASTContext &C) const {
46
0
  auto *A = new (C) AMDGPUNumSGPRAttr(getLocation(), C, numSGPR, getSpellingListIndex());
47
0
  A->Inherited = Inherited;
48
0
  A->IsPackExpansion = IsPackExpansion;
49
0
  A->Implicit = Implicit;
50
0
  return A;
51
0
}
52
53
0
void AMDGPUNumSGPRAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
54
0
  switch (SpellingListIndex) {
55
0
  default:
56
0
    llvm_unreachable("Unknown attribute spelling!");
57
0
    break;
58
0
  case 0 : {
59
0
    OS << " __attribute__((amdgpu_num_sgpr(" << getNumSGPR() << ")))";
60
0
    break;
61
0
  }
62
0
  case 1 : {
63
0
    OS << " [[clang::amdgpu_num_sgpr(" << getNumSGPR() << ")]]";
64
0
    break;
65
0
  }
66
0
}
67
0
}
68
69
1
const char *AMDGPUNumSGPRAttr::getSpelling() const {
70
1
  switch (SpellingListIndex) {
71
1
  default:
72
0
    llvm_unreachable("Unknown attribute spelling!");
73
1
    
return "(No spelling)"0
;
74
1
  case 0:
75
1
    return "amdgpu_num_sgpr";
76
1
  case 1:
77
0
    return "amdgpu_num_sgpr";
78
1
  }
79
1
}
80
81
0
AMDGPUNumVGPRAttr *AMDGPUNumVGPRAttr::clone(ASTContext &C) const {
82
0
  auto *A = new (C) AMDGPUNumVGPRAttr(getLocation(), C, numVGPR, getSpellingListIndex());
83
0
  A->Inherited = Inherited;
84
0
  A->IsPackExpansion = IsPackExpansion;
85
0
  A->Implicit = Implicit;
86
0
  return A;
87
0
}
88
89
0
void AMDGPUNumVGPRAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
90
0
  switch (SpellingListIndex) {
91
0
  default:
92
0
    llvm_unreachable("Unknown attribute spelling!");
93
0
    break;
94
0
  case 0 : {
95
0
    OS << " __attribute__((amdgpu_num_vgpr(" << getNumVGPR() << ")))";
96
0
    break;
97
0
  }
98
0
  case 1 : {
99
0
    OS << " [[clang::amdgpu_num_vgpr(" << getNumVGPR() << ")]]";
100
0
    break;
101
0
  }
102
0
}
103
0
}
104
105
1
const char *AMDGPUNumVGPRAttr::getSpelling() const {
106
1
  switch (SpellingListIndex) {
107
1
  default:
108
0
    llvm_unreachable("Unknown attribute spelling!");
109
1
    
return "(No spelling)"0
;
110
1
  case 0:
111
1
    return "amdgpu_num_vgpr";
112
1
  case 1:
113
0
    return "amdgpu_num_vgpr";
114
1
  }
115
1
}
116
117
0
AMDGPUWavesPerEUAttr *AMDGPUWavesPerEUAttr::clone(ASTContext &C) const {
118
0
  auto *A = new (C) AMDGPUWavesPerEUAttr(getLocation(), C, min, max, getSpellingListIndex());
119
0
  A->Inherited = Inherited;
120
0
  A->IsPackExpansion = IsPackExpansion;
121
0
  A->Implicit = Implicit;
122
0
  return A;
123
0
}
124
125
0
void AMDGPUWavesPerEUAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
126
0
  switch (SpellingListIndex) {
127
0
  default:
128
0
    llvm_unreachable("Unknown attribute spelling!");
129
0
    break;
130
0
  case 0 : {
131
0
    OS << " __attribute__((amdgpu_waves_per_eu(" << getMin() << ", " << getMax() << ")))";
132
0
    break;
133
0
  }
134
0
  case 1 : {
135
0
    OS << " [[clang::amdgpu_waves_per_eu(" << getMin() << ", " << getMax() << ")]]";
136
0
    break;
137
0
  }
138
0
}
139
0
}
140
141
2
const char *AMDGPUWavesPerEUAttr::getSpelling() const {
142
2
  switch (SpellingListIndex) {
143
2
  default:
144
0
    llvm_unreachable("Unknown attribute spelling!");
145
2
    
return "(No spelling)"0
;
146
2
  case 0:
147
2
    return "amdgpu_waves_per_eu";
148
2
  case 1:
149
0
    return "amdgpu_waves_per_eu";
150
2
  }
151
2
}
152
153
0
ARMInterruptAttr *ARMInterruptAttr::clone(ASTContext &C) const {
154
0
  auto *A = new (C) ARMInterruptAttr(getLocation(), C, interrupt, getSpellingListIndex());
155
0
  A->Inherited = Inherited;
156
0
  A->IsPackExpansion = IsPackExpansion;
157
0
  A->Implicit = Implicit;
158
0
  return A;
159
0
}
160
161
0
void ARMInterruptAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
162
0
  switch (SpellingListIndex) {
163
0
  default:
164
0
    llvm_unreachable("Unknown attribute spelling!");
165
0
    break;
166
0
  case 0 : {
167
0
    OS << " __attribute__((interrupt(\"" << ARMInterruptAttr::ConvertInterruptTypeToStr(getInterrupt()) << "\")))";
168
0
    break;
169
0
  }
170
0
  case 1 : {
171
0
    OS << " [[gnu::interrupt(\"" << ARMInterruptAttr::ConvertInterruptTypeToStr(getInterrupt()) << "\")]]";
172
0
    break;
173
0
  }
174
0
}
175
0
}
176
177
0
const char *ARMInterruptAttr::getSpelling() const {
178
0
  switch (SpellingListIndex) {
179
0
  default:
180
0
    llvm_unreachable("Unknown attribute spelling!");
181
0
    return "(No spelling)";
182
0
  case 0:
183
0
    return "interrupt";
184
0
  case 1:
185
0
    return "interrupt";
186
0
  }
187
0
}
188
189
0
AVRInterruptAttr *AVRInterruptAttr::clone(ASTContext &C) const {
190
0
  auto *A = new (C) AVRInterruptAttr(getLocation(), C, getSpellingListIndex());
191
0
  A->Inherited = Inherited;
192
0
  A->IsPackExpansion = IsPackExpansion;
193
0
  A->Implicit = Implicit;
194
0
  return A;
195
0
}
196
197
0
void AVRInterruptAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
198
0
  switch (SpellingListIndex) {
199
0
  default:
200
0
    llvm_unreachable("Unknown attribute spelling!");
201
0
    break;
202
0
  case 0 : {
203
0
    OS << " __attribute__((interrupt))";
204
0
    break;
205
0
  }
206
0
  case 1 : {
207
0
    OS << " [[gnu::interrupt]]";
208
0
    break;
209
0
  }
210
0
}
211
0
}
212
213
0
const char *AVRInterruptAttr::getSpelling() const {
214
0
  switch (SpellingListIndex) {
215
0
  default:
216
0
    llvm_unreachable("Unknown attribute spelling!");
217
0
    return "(No spelling)";
218
0
  case 0:
219
0
    return "interrupt";
220
0
  case 1:
221
0
    return "interrupt";
222
0
  }
223
0
}
224
225
0
AVRSignalAttr *AVRSignalAttr::clone(ASTContext &C) const {
226
0
  auto *A = new (C) AVRSignalAttr(getLocation(), C, getSpellingListIndex());
227
0
  A->Inherited = Inherited;
228
0
  A->IsPackExpansion = IsPackExpansion;
229
0
  A->Implicit = Implicit;
230
0
  return A;
231
0
}
232
233
0
void AVRSignalAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
234
0
  switch (SpellingListIndex) {
235
0
  default:
236
0
    llvm_unreachable("Unknown attribute spelling!");
237
0
    break;
238
0
  case 0 : {
239
0
    OS << " __attribute__((signal))";
240
0
    break;
241
0
  }
242
0
  case 1 : {
243
0
    OS << " [[gnu::signal]]";
244
0
    break;
245
0
  }
246
0
}
247
0
}
248
249
0
const char *AVRSignalAttr::getSpelling() const {
250
0
  switch (SpellingListIndex) {
251
0
  default:
252
0
    llvm_unreachable("Unknown attribute spelling!");
253
0
    return "(No spelling)";
254
0
  case 0:
255
0
    return "signal";
256
0
  case 1:
257
0
    return "signal";
258
0
  }
259
0
}
260
261
28
AbiTagAttr *AbiTagAttr::clone(ASTContext &C) const {
262
28
  auto *A = new (C) AbiTagAttr(getLocation(), C, tags_, tags_Size, getSpellingListIndex());
263
28
  A->Inherited = Inherited;
264
28
  A->IsPackExpansion = IsPackExpansion;
265
28
  A->Implicit = Implicit;
266
28
  return A;
267
28
}
268
269
0
void AbiTagAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
270
0
  switch (SpellingListIndex) {
271
0
  default:
272
0
    llvm_unreachable("Unknown attribute spelling!");
273
0
    break;
274
0
  case 0 : {
275
0
    OS << " __attribute__((abi_tag(";
276
0
  bool isFirst = true;
277
0
  for (const auto &Val : tags()) {
278
0
    if (isFirst) isFirst = false;
279
0
    else OS << ", ";
280
0
    OS << "\"" << Val << "\"";
281
0
  }
282
0
  OS << ")))";
283
0
    break;
284
0
  }
285
0
  case 1 : {
286
0
    OS << " [[gnu::abi_tag(";
287
0
  bool isFirst = true;
288
0
  for (const auto &Val : tags()) {
289
0
    if (isFirst) isFirst = false;
290
0
    else OS << ", ";
291
0
    OS << "\"" << Val << "\"";
292
0
  }
293
0
  OS << ")]]";
294
0
    break;
295
0
  }
296
0
}
297
0
}
298
299
0
const char *AbiTagAttr::getSpelling() const {
300
0
  switch (SpellingListIndex) {
301
0
  default:
302
0
    llvm_unreachable("Unknown attribute spelling!");
303
0
    return "(No spelling)";
304
0
  case 0:
305
0
    return "abi_tag";
306
0
  case 1:
307
0
    return "abi_tag";
308
0
  }
309
0
}
310
311
50
AcquireCapabilityAttr *AcquireCapabilityAttr::clone(ASTContext &C) const {
312
50
  auto *A = new (C) AcquireCapabilityAttr(getLocation(), C, args_, args_Size, getSpellingListIndex());
313
50
  A->Inherited = Inherited;
314
50
  A->IsPackExpansion = IsPackExpansion;
315
50
  A->Implicit = Implicit;
316
50
  return A;
317
50
}
318
319
0
void AcquireCapabilityAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
320
0
  switch (SpellingListIndex) {
321
0
  default:
322
0
    llvm_unreachable("Unknown attribute spelling!");
323
0
    break;
324
0
  case 0 : {
325
0
    OS << " __attribute__((acquire_capability(";
326
0
  bool isFirst = true;
327
0
  for (const auto &Val : args()) {
328
0
    if (isFirst) isFirst = false;
329
0
    else OS << ", ";
330
0
    OS << Val;
331
0
  }
332
0
  OS << ")))";
333
0
    break;
334
0
  }
335
0
  case 1 : {
336
0
    OS << " [[clang::acquire_capability(";
337
0
  bool isFirst = true;
338
0
  for (const auto &Val : args()) {
339
0
    if (isFirst) isFirst = false;
340
0
    else OS << ", ";
341
0
    OS << Val;
342
0
  }
343
0
  OS << ")]]";
344
0
    break;
345
0
  }
346
0
  case 2 : {
347
0
    OS << " __attribute__((acquire_shared_capability(";
348
0
  bool isFirst = true;
349
0
  for (const auto &Val : args()) {
350
0
    if (isFirst) isFirst = false;
351
0
    else OS << ", ";
352
0
    OS << Val;
353
0
  }
354
0
  OS << ")))";
355
0
    break;
356
0
  }
357
0
  case 3 : {
358
0
    OS << " [[clang::acquire_shared_capability(";
359
0
  bool isFirst = true;
360
0
  for (const auto &Val : args()) {
361
0
    if (isFirst) isFirst = false;
362
0
    else OS << ", ";
363
0
    OS << Val;
364
0
  }
365
0
  OS << ")]]";
366
0
    break;
367
0
  }
368
0
  case 4 : {
369
0
    OS << " __attribute__((exclusive_lock_function(";
370
0
  bool isFirst = true;
371
0
  for (const auto &Val : args()) {
372
0
    if (isFirst) isFirst = false;
373
0
    else OS << ", ";
374
0
    OS << Val;
375
0
  }
376
0
  OS << ")))";
377
0
    break;
378
0
  }
379
0
  case 5 : {
380
0
    OS << " __attribute__((shared_lock_function(";
381
0
  bool isFirst = true;
382
0
  for (const auto &Val : args()) {
383
0
    if (isFirst) isFirst = false;
384
0
    else OS << ", ";
385
0
    OS << Val;
386
0
  }
387
0
  OS << ")))";
388
0
    break;
389
0
  }
390
0
}
391
0
}
392
393
0
const char *AcquireCapabilityAttr::getSpelling() const {
394
0
  switch (SpellingListIndex) {
395
0
  default:
396
0
    llvm_unreachable("Unknown attribute spelling!");
397
0
    return "(No spelling)";
398
0
  case 0:
399
0
    return "acquire_capability";
400
0
  case 1:
401
0
    return "acquire_capability";
402
0
  case 2:
403
0
    return "acquire_shared_capability";
404
0
  case 3:
405
0
    return "acquire_shared_capability";
406
0
  case 4:
407
0
    return "exclusive_lock_function";
408
0
  case 5:
409
0
    return "shared_lock_function";
410
0
  }
411
0
}
412
413
0
AcquiredAfterAttr *AcquiredAfterAttr::clone(ASTContext &C) const {
414
0
  auto *A = new (C) AcquiredAfterAttr(getLocation(), C, args_, args_Size, getSpellingListIndex());
415
0
  A->Inherited = Inherited;
416
0
  A->IsPackExpansion = IsPackExpansion;
417
0
  A->Implicit = Implicit;
418
0
  return A;
419
0
}
420
421
0
void AcquiredAfterAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
422
0
  switch (SpellingListIndex) {
423
0
  default:
424
0
    llvm_unreachable("Unknown attribute spelling!");
425
0
    break;
426
0
  case 0 : {
427
0
    OS << " __attribute__((acquired_after(";
428
0
  bool isFirst = true;
429
0
  for (const auto &Val : args()) {
430
0
    if (isFirst) isFirst = false;
431
0
    else OS << ", ";
432
0
    OS << Val;
433
0
  }
434
0
  OS << ")))";
435
0
    break;
436
0
  }
437
0
}
438
0
}
439
440
0
const char *AcquiredAfterAttr::getSpelling() const {
441
0
  switch (SpellingListIndex) {
442
0
  default:
443
0
    llvm_unreachable("Unknown attribute spelling!");
444
0
    return "(No spelling)";
445
0
  case 0:
446
0
    return "acquired_after";
447
0
  }
448
0
}
449
450
0
AcquiredBeforeAttr *AcquiredBeforeAttr::clone(ASTContext &C) const {
451
0
  auto *A = new (C) AcquiredBeforeAttr(getLocation(), C, args_, args_Size, getSpellingListIndex());
452
0
  A->Inherited = Inherited;
453
0
  A->IsPackExpansion = IsPackExpansion;
454
0
  A->Implicit = Implicit;
455
0
  return A;
456
0
}
457
458
0
void AcquiredBeforeAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
459
0
  switch (SpellingListIndex) {
460
0
  default:
461
0
    llvm_unreachable("Unknown attribute spelling!");
462
0
    break;
463
0
  case 0 : {
464
0
    OS << " __attribute__((acquired_before(";
465
0
  bool isFirst = true;
466
0
  for (const auto &Val : args()) {
467
0
    if (isFirst) isFirst = false;
468
0
    else OS << ", ";
469
0
    OS << Val;
470
0
  }
471
0
  OS << ")))";
472
0
    break;
473
0
  }
474
0
}
475
0
}
476
477
0
const char *AcquiredBeforeAttr::getSpelling() const {
478
0
  switch (SpellingListIndex) {
479
0
  default:
480
0
    llvm_unreachable("Unknown attribute spelling!");
481
0
    return "(No spelling)";
482
0
  case 0:
483
0
    return "acquired_before";
484
0
  }
485
0
}
486
487
0
AliasAttr *AliasAttr::clone(ASTContext &C) const {
488
0
  auto *A = new (C) AliasAttr(getLocation(), C, getAliasee(), getSpellingListIndex());
489
0
  A->Inherited = Inherited;
490
0
  A->IsPackExpansion = IsPackExpansion;
491
0
  A->Implicit = Implicit;
492
0
  return A;
493
0
}
494
495
0
void AliasAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
496
0
  switch (SpellingListIndex) {
497
0
  default:
498
0
    llvm_unreachable("Unknown attribute spelling!");
499
0
    break;
500
0
  case 0 : {
501
0
    OS << " __attribute__((alias(\"" << getAliasee() << "\")))";
502
0
    break;
503
0
  }
504
0
  case 1 : {
505
0
    OS << " [[gnu::alias(\"" << getAliasee() << "\")]]";
506
0
    break;
507
0
  }
508
0
}
509
0
}
510
511
0
const char *AliasAttr::getSpelling() const {
512
0
  switch (SpellingListIndex) {
513
0
  default:
514
0
    llvm_unreachable("Unknown attribute spelling!");
515
0
    return "(No spelling)";
516
0
  case 0:
517
0
    return "alias";
518
0
  case 1:
519
0
    return "alias";
520
0
  }
521
0
}
522
523
0
AlignMac68kAttr *AlignMac68kAttr::clone(ASTContext &C) const {
524
0
  auto *A = new (C) AlignMac68kAttr(getLocation(), C, getSpellingListIndex());
525
0
  A->Inherited = Inherited;
526
0
  A->IsPackExpansion = IsPackExpansion;
527
0
  A->Implicit = Implicit;
528
0
  return A;
529
0
}
530
531
0
void AlignMac68kAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
532
0
}
533
534
0
const char *AlignMac68kAttr::getSpelling() const {
535
0
  return "(No spelling)";
536
0
}
537
538
0
AlignValueAttr *AlignValueAttr::clone(ASTContext &C) const {
539
0
  auto *A = new (C) AlignValueAttr(getLocation(), C, alignment, getSpellingListIndex());
540
0
  A->Inherited = Inherited;
541
0
  A->IsPackExpansion = IsPackExpansion;
542
0
  A->Implicit = Implicit;
543
0
  return A;
544
0
}
545
546
0
void AlignValueAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
547
0
  switch (SpellingListIndex) {
548
0
  default:
549
0
    llvm_unreachable("Unknown attribute spelling!");
550
0
    break;
551
0
  case 0 : {
552
0
    OS << " __attribute__((align_value(" << getAlignment() << ")))";
553
0
    break;
554
0
  }
555
0
}
556
0
}
557
558
1
const char *AlignValueAttr::getSpelling() const {
559
1
  switch (SpellingListIndex) {
560
1
  default:
561
0
    llvm_unreachable("Unknown attribute spelling!");
562
1
    
return "(No spelling)"0
;
563
1
  case 0:
564
1
    return "align_value";
565
1
  }
566
1
}
567
568
8.74k
bool AlignedAttr::isAlignmentDependent() const {
569
8.74k
  if (isalignmentExpr)
570
8.74k
    return alignmentExpr && 
(8.71k
alignmentExpr->isValueDependent()8.71k
||
alignmentExpr->isTypeDependent()8.50k
);
571
0
  else
572
0
    return alignmentType->getType()->isDependentType();
573
8.74k
}
574
15.3k
unsigned AlignedAttr::getAlignment(ASTContext &Ctx) const {
575
15.3k
  assert(!isAlignmentDependent());
576
15.3k
  if (isalignmentExpr)
577
15.3k
    return alignmentExpr ? 
alignmentExpr->EvaluateKnownConstInt(Ctx).getZExtValue() * Ctx.getCharWidth()15.2k
:
Ctx.getTargetDefaultAlignForAttributeAligned()44
;
578
0
  else
579
0
    return 0; // FIXME
580
15.3k
}
581
1.28k
AlignedAttr *AlignedAttr::clone(ASTContext &C) const {
582
1.28k
  auto *A = new (C) AlignedAttr(getLocation(), C, isalignmentExpr, isalignmentExpr ? static_cast<void*>(alignmentExpr) : 
alignmentType0
, getSpellingListIndex());
583
1.28k
  A->Inherited = Inherited;
584
1.28k
  A->IsPackExpansion = IsPackExpansion;
585
1.28k
  A->Implicit = Implicit;
586
1.28k
  return A;
587
1.28k
}
588
589
56
void AlignedAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
590
56
  switch (SpellingListIndex) {
591
56
  default:
592
0
    llvm_unreachable("Unknown attribute spelling!");
593
56
    
break0
;
594
56
  case 0 : {
595
48
    OS << " __attribute__((aligned";
596
48
    unsigned TrailingOmittedArgs = 0;
597
48
    if (!isalignmentExpr || !alignmentExpr)
598
4
      ++TrailingOmittedArgs;
599
48
    OS << "";
600
48
    if (TrailingOmittedArgs < 1)
601
44
       OS << "(";
602
48
    OS << "";
603
48
    if (!(!isalignmentExpr || !alignmentExpr)) {
604
44
      OS << "";
605
44
    alignmentExpr->printPretty(OS, nullptr, Policy);
606
44
    OS << "";
607
44
    }
608
48
    OS << "";
609
48
    if (TrailingOmittedArgs < 1)
610
44
       OS << ")";
611
48
    OS << "))";
612
48
    break;
613
56
  }
614
56
  case 1 : {
615
1
    OS << " [[gnu::aligned";
616
1
    unsigned TrailingOmittedArgs = 0;
617
1
    if (!isalignmentExpr || !alignmentExpr)
618
0
      ++TrailingOmittedArgs;
619
1
    OS << "";
620
1
    if (TrailingOmittedArgs < 1)
621
1
       OS << "(";
622
1
    OS << "";
623
1
    if (!(!isalignmentExpr || !alignmentExpr)) {
624
1
      OS << "";
625
1
    alignmentExpr->printPretty(OS, nullptr, Policy);
626
1
    OS << "";
627
1
    }
628
1
    OS << "";
629
1
    if (TrailingOmittedArgs < 1)
630
1
       OS << ")";
631
1
    OS << "]]";
632
1
    break;
633
56
  }
634
56
  case 2 : {
635
3
    OS << " __declspec(align";
636
3
    unsigned TrailingOmittedArgs = 0;
637
3
    if (!isalignmentExpr || !alignmentExpr)
638
0
      ++TrailingOmittedArgs;
639
3
    OS << "";
640
3
    if (TrailingOmittedArgs < 1)
641
3
       OS << "(";
642
3
    OS << "";
643
3
    if (!(!isalignmentExpr || !alignmentExpr)) {
644
3
      OS << "";
645
3
    alignmentExpr->printPretty(OS, nullptr, Policy);
646
3
    OS << "";
647
3
    }
648
3
    OS << "";
649
3
    if (TrailingOmittedArgs < 1)
650
3
       OS << ")";
651
3
    OS << ")";
652
3
    break;
653
56
  }
654
56
  case 3 : {
655
3
    OS << " alignas";
656
3
    unsigned TrailingOmittedArgs = 0;
657
3
    if (!isalignmentExpr || !alignmentExpr)
658
0
      ++TrailingOmittedArgs;
659
3
    OS << "";
660
3
    if (TrailingOmittedArgs < 1)
661
3
       OS << "(";
662
3
    OS << "";
663
3
    if (!(!isalignmentExpr || !alignmentExpr)) {
664
3
      OS << "";
665
3
    alignmentExpr->printPretty(OS, nullptr, Policy);
666
3
    OS << "";
667
3
    }
668
3
    OS << "";
669
3
    if (TrailingOmittedArgs < 1)
670
3
       OS << ")";
671
3
    OS << "";
672
3
    break;
673
56
  }
674
56
  case 4 : {
675
1
    OS << " _Alignas";
676
1
    unsigned TrailingOmittedArgs = 0;
677
1
    if (!isalignmentExpr || !alignmentExpr)
678
0
      ++TrailingOmittedArgs;
679
1
    OS << "";
680
1
    if (TrailingOmittedArgs < 1)
681
1
       OS << "(";
682
1
    OS << "";
683
1
    if (!(!isalignmentExpr || !alignmentExpr)) {
684
1
      OS << "";
685
1
    alignmentExpr->printPretty(OS, nullptr, Policy);
686
1
    OS << "";
687
1
    }
688
1
    OS << "";
689
1
    if (TrailingOmittedArgs < 1)
690
1
       OS << ")";
691
1
    OS << "";
692
1
    break;
693
56
  }
694
56
}
695
56
}
696
697
47
const char *AlignedAttr::getSpelling() const {
698
47
  switch (SpellingListIndex) {
699
47
  default:
700
0
    llvm_unreachable("Unknown attribute spelling!");
701
47
    
return "(No spelling)"0
;
702
47
  case 0:
703
13
    return "aligned";
704
47
  case 1:
705
0
    return "aligned";
706
47
  case 2:
707
0
    return "align";
708
47
  case 3:
709
26
    return "alignas";
710
47
  case 4:
711
8
    return "_Alignas";
712
47
  }
713
47
}
714
715
0
AllocAlignAttr *AllocAlignAttr::clone(ASTContext &C) const {
716
0
  auto *A = new (C) AllocAlignAttr(getLocation(), C, paramIndex, getSpellingListIndex());
717
0
  A->Inherited = Inherited;
718
0
  A->IsPackExpansion = IsPackExpansion;
719
0
  A->Implicit = Implicit;
720
0
  return A;
721
0
}
722
723
4
void AllocAlignAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
724
4
  switch (SpellingListIndex) {
725
4
  default:
726
0
    llvm_unreachable("Unknown attribute spelling!");
727
4
    
break0
;
728
4
  case 0 : {
729
4
    OS << " __attribute__((alloc_align(" << getParamIndex().getSourceIndex() << ")))";
730
4
    break;
731
4
  }
732
4
  case 1 : {
733
0
    OS << " [[gnu::alloc_align(" << getParamIndex().getSourceIndex() << ")]]";
734
0
    break;
735
4
  }
736
4
}
737
4
}
738
739
10
const char *AllocAlignAttr::getSpelling() const {
740
10
  switch (SpellingListIndex) {
741
10
  default:
742
0
    llvm_unreachable("Unknown attribute spelling!");
743
10
    
return "(No spelling)"0
;
744
10
  case 0:
745
10
    return "alloc_align";
746
10
  case 1:
747
0
    return "alloc_align";
748
10
  }
749
10
}
750
751
555
AllocSizeAttr *AllocSizeAttr::clone(ASTContext &C) const {
752
555
  auto *A = new (C) AllocSizeAttr(getLocation(), C, elemSizeParam, numElemsParam, getSpellingListIndex());
753
555
  A->Inherited = Inherited;
754
555
  A->IsPackExpansion = IsPackExpansion;
755
555
  A->Implicit = Implicit;
756
555
  return A;
757
555
}
758
759
8
void AllocSizeAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
760
8
  switch (SpellingListIndex) {
761
8
  default:
762
0
    llvm_unreachable("Unknown attribute spelling!");
763
8
    
break0
;
764
8
  case 0 : {
765
8
    OS << " __attribute__((alloc_size";
766
8
    unsigned TrailingOmittedArgs = 0;
767
8
    if (!getNumElemsParam().isValid())
768
4
      ++TrailingOmittedArgs;
769
8
    OS << "(" << getElemSizeParam().getSourceIndex() << "";
770
8
    if (1 < 2 - TrailingOmittedArgs)
771
4
      OS << ", ";
772
8
    OS << "";
773
8
    if (!(!getNumElemsParam().isValid())) {
774
4
      OS << "" << getNumElemsParam().getSourceIndex() << "";
775
4
    }
776
8
    OS << ")))";
777
8
    break;
778
8
  }
779
8
  case 1 : {
780
0
    OS << " [[gnu::alloc_size";
781
0
    unsigned TrailingOmittedArgs = 0;
782
0
    if (!getNumElemsParam().isValid())
783
0
      ++TrailingOmittedArgs;
784
0
    OS << "(" << getElemSizeParam().getSourceIndex() << "";
785
0
    if (1 < 2 - TrailingOmittedArgs)
786
0
      OS << ", ";
787
0
    OS << "";
788
0
    if (!(!getNumElemsParam().isValid())) {
789
0
      OS << "" << getNumElemsParam().getSourceIndex() << "";
790
0
    }
791
0
    OS << ")]]";
792
0
    break;
793
8
  }
794
8
}
795
8
}
796
797
0
const char *AllocSizeAttr::getSpelling() const {
798
0
  switch (SpellingListIndex) {
799
0
  default:
800
0
    llvm_unreachable("Unknown attribute spelling!");
801
0
    return "(No spelling)";
802
0
  case 0:
803
0
    return "alloc_size";
804
0
  case 1:
805
0
    return "alloc_size";
806
0
  }
807
0
}
808
809
659k
AlwaysInlineAttr *AlwaysInlineAttr::clone(ASTContext &C) const {
810
659k
  auto *A = new (C) AlwaysInlineAttr(getLocation(), C, getSpellingListIndex());
811
659k
  A->Inherited = Inherited;
812
659k
  A->IsPackExpansion = IsPackExpansion;
813
659k
  A->Implicit = Implicit;
814
659k
  return A;
815
659k
}
816
817
0
void AlwaysInlineAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
818
0
  switch (SpellingListIndex) {
819
0
  default:
820
0
    llvm_unreachable("Unknown attribute spelling!");
821
0
    break;
822
0
  case 0 : {
823
0
    OS << " __attribute__((always_inline))";
824
0
    break;
825
0
  }
826
0
  case 1 : {
827
0
    OS << " [[gnu::always_inline]]";
828
0
    break;
829
0
  }
830
0
  case 2 : {
831
0
    OS << " __forceinline";
832
0
    break;
833
0
  }
834
0
}
835
0
}
836
837
102k
const char *AlwaysInlineAttr::getSpelling() const {
838
102k
  switch (SpellingListIndex) {
839
102k
  default:
840
0
    llvm_unreachable("Unknown attribute spelling!");
841
102k
    
return "(No spelling)"0
;
842
102k
  case 0:
843
102k
    return "always_inline";
844
102k
  case 1:
845
0
    return "always_inline";
846
102k
  case 2:
847
5
    return "__forceinline";
848
102k
  }
849
102k
}
850
851
0
AnalyzerNoReturnAttr *AnalyzerNoReturnAttr::clone(ASTContext &C) const {
852
0
  auto *A = new (C) AnalyzerNoReturnAttr(getLocation(), C, getSpellingListIndex());
853
0
  A->Inherited = Inherited;
854
0
  A->IsPackExpansion = IsPackExpansion;
855
0
  A->Implicit = Implicit;
856
0
  return A;
857
0
}
858
859
0
void AnalyzerNoReturnAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
860
0
  switch (SpellingListIndex) {
861
0
  default:
862
0
    llvm_unreachable("Unknown attribute spelling!");
863
0
    break;
864
0
  case 0 : {
865
0
    OS << " __attribute__((analyzer_noreturn))";
866
0
    break;
867
0
  }
868
0
}
869
0
}
870
871
0
const char *AnalyzerNoReturnAttr::getSpelling() const {
872
0
  switch (SpellingListIndex) {
873
0
  default:
874
0
    llvm_unreachable("Unknown attribute spelling!");
875
0
    return "(No spelling)";
876
0
  case 0:
877
0
    return "analyzer_noreturn";
878
0
  }
879
0
}
880
881
46
AnnotateAttr *AnnotateAttr::clone(ASTContext &C) const {
882
46
  auto *A = new (C) AnnotateAttr(getLocation(), C, getAnnotation(), getSpellingListIndex());
883
46
  A->Inherited = Inherited;
884
46
  A->IsPackExpansion = IsPackExpansion;
885
46
  A->Implicit = Implicit;
886
46
  return A;
887
46
}
888
889
0
void AnnotateAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
890
0
  switch (SpellingListIndex) {
891
0
  default:
892
0
    llvm_unreachable("Unknown attribute spelling!");
893
0
    break;
894
0
  case 0 : {
895
0
    OS << " __attribute__((annotate(\"" << getAnnotation() << "\")))";
896
0
    break;
897
0
  }
898
0
  case 1 : {
899
0
    OS << " [[clang::annotate(\"" << getAnnotation() << "\")]]";
900
0
    break;
901
0
  }
902
0
  case 2 : {
903
0
    OS << " [[clang::annotate(\"" << getAnnotation() << "\")]]";
904
0
    break;
905
0
  }
906
0
}
907
0
}
908
909
0
const char *AnnotateAttr::getSpelling() const {
910
0
  switch (SpellingListIndex) {
911
0
  default:
912
0
    llvm_unreachable("Unknown attribute spelling!");
913
0
    return "(No spelling)";
914
0
  case 0:
915
0
    return "annotate";
916
0
  case 1:
917
0
    return "annotate";
918
0
  case 2:
919
0
    return "annotate";
920
0
  }
921
0
}
922
923
5
AnyX86InterruptAttr *AnyX86InterruptAttr::clone(ASTContext &C) const {
924
5
  auto *A = new (C) AnyX86InterruptAttr(getLocation(), C, getSpellingListIndex());
925
5
  A->Inherited = Inherited;
926
5
  A->IsPackExpansion = IsPackExpansion;
927
5
  A->Implicit = Implicit;
928
5
  return A;
929
5
}
930
931
0
void AnyX86InterruptAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
932
0
  switch (SpellingListIndex) {
933
0
  default:
934
0
    llvm_unreachable("Unknown attribute spelling!");
935
0
    break;
936
0
  case 0 : {
937
0
    OS << " __attribute__((interrupt))";
938
0
    break;
939
0
  }
940
0
  case 1 : {
941
0
    OS << " [[gnu::interrupt]]";
942
0
    break;
943
0
  }
944
0
}
945
0
}
946
947
0
const char *AnyX86InterruptAttr::getSpelling() const {
948
0
  switch (SpellingListIndex) {
949
0
  default:
950
0
    llvm_unreachable("Unknown attribute spelling!");
951
0
    return "(No spelling)";
952
0
  case 0:
953
0
    return "interrupt";
954
0
  case 1:
955
0
    return "interrupt";
956
0
  }
957
0
}
958
959
0
AnyX86NoCallerSavedRegistersAttr *AnyX86NoCallerSavedRegistersAttr::clone(ASTContext &C) const {
960
0
  auto *A = new (C) AnyX86NoCallerSavedRegistersAttr(getLocation(), C, getSpellingListIndex());
961
0
  A->Inherited = Inherited;
962
0
  A->IsPackExpansion = IsPackExpansion;
963
0
  A->Implicit = Implicit;
964
0
  return A;
965
0
}
966
967
0
void AnyX86NoCallerSavedRegistersAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
968
0
  switch (SpellingListIndex) {
969
0
  default:
970
0
    llvm_unreachable("Unknown attribute spelling!");
971
0
    break;
972
0
  case 0 : {
973
0
    OS << " __attribute__((no_caller_saved_registers))";
974
0
    break;
975
0
  }
976
0
  case 1 : {
977
0
    OS << " [[gnu::no_caller_saved_registers]]";
978
0
    break;
979
0
  }
980
0
}
981
0
}
982
983
2
const char *AnyX86NoCallerSavedRegistersAttr::getSpelling() const {
984
2
  switch (SpellingListIndex) {
985
2
  default:
986
0
    llvm_unreachable("Unknown attribute spelling!");
987
2
    
return "(No spelling)"0
;
988
2
  case 0:
989
2
    return "no_caller_saved_registers";
990
2
  case 1:
991
0
    return "no_caller_saved_registers";
992
2
  }
993
2
}
994
995
0
AnyX86NoCfCheckAttr *AnyX86NoCfCheckAttr::clone(ASTContext &C) const {
996
0
  auto *A = new (C) AnyX86NoCfCheckAttr(getLocation(), C, getSpellingListIndex());
997
0
  A->Inherited = Inherited;
998
0
  A->IsPackExpansion = IsPackExpansion;
999
0
  A->Implicit = Implicit;
1000
0
  return A;
1001
0
}
1002
1003
0
void AnyX86NoCfCheckAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
1004
0
  switch (SpellingListIndex) {
1005
0
  default:
1006
0
    llvm_unreachable("Unknown attribute spelling!");
1007
0
    break;
1008
0
  case 0 : {
1009
0
    OS << " __attribute__((nocf_check))";
1010
0
    break;
1011
0
  }
1012
0
  case 1 : {
1013
0
    OS << " [[gnu::nocf_check]]";
1014
0
    break;
1015
0
  }
1016
0
}
1017
0
}
1018
1019
0
const char *AnyX86NoCfCheckAttr::getSpelling() const {
1020
0
  switch (SpellingListIndex) {
1021
0
  default:
1022
0
    llvm_unreachable("Unknown attribute spelling!");
1023
0
    return "(No spelling)";
1024
0
  case 0:
1025
0
    return "nocf_check";
1026
0
  case 1:
1027
0
    return "nocf_check";
1028
0
  }
1029
0
}
1030
1031
0
ArcWeakrefUnavailableAttr *ArcWeakrefUnavailableAttr::clone(ASTContext &C) const {
1032
0
  auto *A = new (C) ArcWeakrefUnavailableAttr(getLocation(), C, getSpellingListIndex());
1033
0
  A->Inherited = Inherited;
1034
0
  A->IsPackExpansion = IsPackExpansion;
1035
0
  A->Implicit = Implicit;
1036
0
  return A;
1037
0
}
1038
1039
0
void ArcWeakrefUnavailableAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
1040
0
  switch (SpellingListIndex) {
1041
0
  default:
1042
0
    llvm_unreachable("Unknown attribute spelling!");
1043
0
    break;
1044
0
  case 0 : {
1045
0
    OS << " __attribute__((objc_arc_weak_reference_unavailable))";
1046
0
    break;
1047
0
  }
1048
0
  case 1 : {
1049
0
    OS << " [[clang::objc_arc_weak_reference_unavailable]]";
1050
0
    break;
1051
0
  }
1052
0
  case 2 : {
1053
0
    OS << " [[clang::objc_arc_weak_reference_unavailable]]";
1054
0
    break;
1055
0
  }
1056
0
}
1057
0
}
1058
1059
0
const char *ArcWeakrefUnavailableAttr::getSpelling() const {
1060
0
  switch (SpellingListIndex) {
1061
0
  default:
1062
0
    llvm_unreachable("Unknown attribute spelling!");
1063
0
    return "(No spelling)";
1064
0
  case 0:
1065
0
    return "objc_arc_weak_reference_unavailable";
1066
0
  case 1:
1067
0
    return "objc_arc_weak_reference_unavailable";
1068
0
  case 2:
1069
0
    return "objc_arc_weak_reference_unavailable";
1070
0
  }
1071
0
}
1072
1073
0
ArgumentWithTypeTagAttr *ArgumentWithTypeTagAttr::clone(ASTContext &C) const {
1074
0
  auto *A = new (C) ArgumentWithTypeTagAttr(getLocation(), C, argumentKind, argumentIdx, typeTagIdx, isPointer, getSpellingListIndex());
1075
0
  A->Inherited = Inherited;
1076
0
  A->IsPackExpansion = IsPackExpansion;
1077
0
  A->Implicit = Implicit;
1078
0
  return A;
1079
0
}
1080
1081
8
void ArgumentWithTypeTagAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
1082
8
  switch (SpellingListIndex) {
1083
8
  default:
1084
0
    llvm_unreachable("Unknown attribute spelling!");
1085
8
    
break0
;
1086
8
  case 0 : {
1087
4
    OS << " __attribute__((argument_with_type_tag(" << (getArgumentKind() ? getArgumentKind()->getName() : 
""0
) << ", " << getArgumentIdx().getSourceIndex() << ", " << getTypeTagIdx().getSourceIndex() << ")))";
1088
4
    break;
1089
8
  }
1090
8
  case 1 : {
1091
0
    OS << " [[clang::argument_with_type_tag(" << (getArgumentKind() ? getArgumentKind()->getName() : "") << ", " << getArgumentIdx().getSourceIndex() << ", " << getTypeTagIdx().getSourceIndex() << ")]]";
1092
0
    break;
1093
8
  }
1094
8
  case 2 : {
1095
0
    OS << " [[clang::argument_with_type_tag(" << (getArgumentKind() ? getArgumentKind()->getName() : "") << ", " << getArgumentIdx().getSourceIndex() << ", " << getTypeTagIdx().getSourceIndex() << ")]]";
1096
0
    break;
1097
8
  }
1098
8
  case 3 : {
1099
4
    OS << " __attribute__((pointer_with_type_tag(" << (getArgumentKind() ? getArgumentKind()->getName() : 
""0
) << ", " << getArgumentIdx().getSourceIndex() << ", " << getTypeTagIdx().getSourceIndex() << ")))";
1100
4
    break;
1101
8
  }
1102
8
  case 4 : {
1103
0
    OS << " [[clang::pointer_with_type_tag(" << (getArgumentKind() ? getArgumentKind()->getName() : "") << ", " << getArgumentIdx().getSourceIndex() << ", " << getTypeTagIdx().getSourceIndex() << ")]]";
1104
0
    break;
1105
8
  }
1106
8
  case 5 : {
1107
0
    OS << " [[clang::pointer_with_type_tag(" << (getArgumentKind() ? getArgumentKind()->getName() : "") << ", " << getArgumentIdx().getSourceIndex() << ", " << getTypeTagIdx().getSourceIndex() << ")]]";
1108
0
    break;
1109
8
  }
1110
8
}
1111
8
}
1112
1113
3
const char *ArgumentWithTypeTagAttr::getSpelling() const {
1114
3
  switch (SpellingListIndex) {
1115
3
  default:
1116
0
    llvm_unreachable("Unknown attribute spelling!");
1117
3
    
return "(No spelling)"0
;
1118
3
  case 0:
1119
0
    return "argument_with_type_tag";
1120
3
  case 1:
1121
0
    return "argument_with_type_tag";
1122
3
  case 2:
1123
0
    return "argument_with_type_tag";
1124
3
  case 3:
1125
3
    return "pointer_with_type_tag";
1126
3
  case 4:
1127
0
    return "pointer_with_type_tag";
1128
3
  case 5:
1129
0
    return "pointer_with_type_tag";
1130
3
  }
1131
3
}
1132
1133
0
ArtificialAttr *ArtificialAttr::clone(ASTContext &C) const {
1134
0
  auto *A = new (C) ArtificialAttr(getLocation(), C, getSpellingListIndex());
1135
0
  A->Inherited = Inherited;
1136
0
  A->IsPackExpansion = IsPackExpansion;
1137
0
  A->Implicit = Implicit;
1138
0
  return A;
1139
0
}
1140
1141
0
void ArtificialAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
1142
0
  switch (SpellingListIndex) {
1143
0
  default:
1144
0
    llvm_unreachable("Unknown attribute spelling!");
1145
0
    break;
1146
0
  case 0 : {
1147
0
    OS << " __attribute__((artificial))";
1148
0
    break;
1149
0
  }
1150
0
  case 1 : {
1151
0
    OS << " [[gnu::artificial]]";
1152
0
    break;
1153
0
  }
1154
0
}
1155
0
}
1156
1157
0
const char *ArtificialAttr::getSpelling() const {
1158
0
  switch (SpellingListIndex) {
1159
0
  default:
1160
0
    llvm_unreachable("Unknown attribute spelling!");
1161
0
    return "(No spelling)";
1162
0
  case 0:
1163
0
    return "artificial";
1164
0
  case 1:
1165
0
    return "artificial";
1166
0
  }
1167
0
}
1168
1169
29
AsmLabelAttr *AsmLabelAttr::clone(ASTContext &C) const {
1170
29
  auto *A = new (C) AsmLabelAttr(getLocation(), C, getLabel(), getSpellingListIndex());
1171
29
  A->Inherited = Inherited;
1172
29
  A->IsPackExpansion = IsPackExpansion;
1173
29
  A->Implicit = Implicit;
1174
29
  return A;
1175
29
}
1176
1177
0
void AsmLabelAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
1178
0
  switch (SpellingListIndex) {
1179
0
  default:
1180
0
    llvm_unreachable("Unknown attribute spelling!");
1181
0
    break;
1182
0
  case 0 : {
1183
0
    OS << " asm(\"" << getLabel() << "\")";
1184
0
    break;
1185
0
  }
1186
0
  case 1 : {
1187
0
    OS << " __asm__(\"" << getLabel() << "\")";
1188
0
    break;
1189
0
  }
1190
0
}
1191
0
}
1192
1193
0
const char *AsmLabelAttr::getSpelling() const {
1194
0
  switch (SpellingListIndex) {
1195
0
  default:
1196
0
    llvm_unreachable("Unknown attribute spelling!");
1197
0
    return "(No spelling)";
1198
0
  case 0:
1199
0
    return "asm";
1200
0
  case 1:
1201
0
    return "__asm__";
1202
0
  }
1203
0
}
1204
1205
12
AssertCapabilityAttr *AssertCapabilityAttr::clone(ASTContext &C) const {
1206
12
  auto *A = new (C) AssertCapabilityAttr(getLocation(), C, args_, args_Size, getSpellingListIndex());
1207
12
  A->Inherited = Inherited;
1208
12
  A->IsPackExpansion = IsPackExpansion;
1209
12
  A->Implicit = Implicit;
1210
12
  return A;
1211
12
}
1212
1213
0
void AssertCapabilityAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
1214
0
  switch (SpellingListIndex) {
1215
0
  default:
1216
0
    llvm_unreachable("Unknown attribute spelling!");
1217
0
    break;
1218
0
  case 0 : {
1219
0
    OS << " __attribute__((assert_capability(";
1220
0
  bool isFirst = true;
1221
0
  for (const auto &Val : args()) {
1222
0
    if (isFirst) isFirst = false;
1223
0
    else OS << ", ";
1224
0
    OS << Val;
1225
0
  }
1226
0
  OS << ")))";
1227
0
    break;
1228
0
  }
1229
0
  case 1 : {
1230
0
    OS << " [[clang::assert_capability(";
1231
0
  bool isFirst = true;
1232
0
  for (const auto &Val : args()) {
1233
0
    if (isFirst) isFirst = false;
1234
0
    else OS << ", ";
1235
0
    OS << Val;
1236
0
  }
1237
0
  OS << ")]]";
1238
0
    break;
1239
0
  }
1240
0
  case 2 : {
1241
0
    OS << " __attribute__((assert_shared_capability(";
1242
0
  bool isFirst = true;
1243
0
  for (const auto &Val : args()) {
1244
0
    if (isFirst) isFirst = false;
1245
0
    else OS << ", ";
1246
0
    OS << Val;
1247
0
  }
1248
0
  OS << ")))";
1249
0
    break;
1250
0
  }
1251
0
  case 3 : {
1252
0
    OS << " [[clang::assert_shared_capability(";
1253
0
  bool isFirst = true;
1254
0
  for (const auto &Val : args()) {
1255
0
    if (isFirst) isFirst = false;
1256
0
    else OS << ", ";
1257
0
    OS << Val;
1258
0
  }
1259
0
  OS << ")]]";
1260
0
    break;
1261
0
  }
1262
0
}
1263
0
}
1264
1265
0
const char *AssertCapabilityAttr::getSpelling() const {
1266
0
  switch (SpellingListIndex) {
1267
0
  default:
1268
0
    llvm_unreachable("Unknown attribute spelling!");
1269
0
    return "(No spelling)";
1270
0
  case 0:
1271
0
    return "assert_capability";
1272
0
  case 1:
1273
0
    return "assert_capability";
1274
0
  case 2:
1275
0
    return "assert_shared_capability";
1276
0
  case 3:
1277
0
    return "assert_shared_capability";
1278
0
  }
1279
0
}
1280
1281
6
AssertExclusiveLockAttr *AssertExclusiveLockAttr::clone(ASTContext &C) const {
1282
6
  auto *A = new (C) AssertExclusiveLockAttr(getLocation(), C, args_, args_Size, getSpellingListIndex());
1283
6
  A->Inherited = Inherited;
1284
6
  A->IsPackExpansion = IsPackExpansion;
1285
6
  A->Implicit = Implicit;
1286
6
  return A;
1287
6
}
1288
1289
0
void AssertExclusiveLockAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
1290
0
  switch (SpellingListIndex) {
1291
0
  default:
1292
0
    llvm_unreachable("Unknown attribute spelling!");
1293
0
    break;
1294
0
  case 0 : {
1295
0
    OS << " __attribute__((assert_exclusive_lock(";
1296
0
  bool isFirst = true;
1297
0
  for (const auto &Val : args()) {
1298
0
    if (isFirst) isFirst = false;
1299
0
    else OS << ", ";
1300
0
    OS << Val;
1301
0
  }
1302
0
  OS << ")))";
1303
0
    break;
1304
0
  }
1305
0
}
1306
0
}
1307
1308
0
const char *AssertExclusiveLockAttr::getSpelling() const {
1309
0
  switch (SpellingListIndex) {
1310
0
  default:
1311
0
    llvm_unreachable("Unknown attribute spelling!");
1312
0
    return "(No spelling)";
1313
0
  case 0:
1314
0
    return "assert_exclusive_lock";
1315
0
  }
1316
0
}
1317
1318
6
AssertSharedLockAttr *AssertSharedLockAttr::clone(ASTContext &C) const {
1319
6
  auto *A = new (C) AssertSharedLockAttr(getLocation(), C, args_, args_Size, getSpellingListIndex());
1320
6
  A->Inherited = Inherited;
1321
6
  A->IsPackExpansion = IsPackExpansion;
1322
6
  A->Implicit = Implicit;
1323
6
  return A;
1324
6
}
1325
1326
0
void AssertSharedLockAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
1327
0
  switch (SpellingListIndex) {
1328
0
  default:
1329
0
    llvm_unreachable("Unknown attribute spelling!");
1330
0
    break;
1331
0
  case 0 : {
1332
0
    OS << " __attribute__((assert_shared_lock(";
1333
0
  bool isFirst = true;
1334
0
  for (const auto &Val : args()) {
1335
0
    if (isFirst) isFirst = false;
1336
0
    else OS << ", ";
1337
0
    OS << Val;
1338
0
  }
1339
0
  OS << ")))";
1340
0
    break;
1341
0
  }
1342
0
}
1343
0
}
1344
1345
0
const char *AssertSharedLockAttr::getSpelling() const {
1346
0
  switch (SpellingListIndex) {
1347
0
  default:
1348
0
    llvm_unreachable("Unknown attribute spelling!");
1349
0
    return "(No spelling)";
1350
0
  case 0:
1351
0
    return "assert_shared_lock";
1352
0
  }
1353
0
}
1354
1355
4
AssumeAlignedAttr *AssumeAlignedAttr::clone(ASTContext &C) const {
1356
4
  auto *A = new (C) AssumeAlignedAttr(getLocation(), C, alignment, offset, getSpellingListIndex());
1357
4
  A->Inherited = Inherited;
1358
4
  A->IsPackExpansion = IsPackExpansion;
1359
4
  A->Implicit = Implicit;
1360
4
  return A;
1361
4
}
1362
1363
0
void AssumeAlignedAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
1364
0
  switch (SpellingListIndex) {
1365
0
  default:
1366
0
    llvm_unreachable("Unknown attribute spelling!");
1367
0
    break;
1368
0
  case 0 : {
1369
0
    OS << " __attribute__((assume_aligned(" << getAlignment() << ", " << getOffset() << ")))";
1370
0
    break;
1371
0
  }
1372
0
  case 1 : {
1373
0
    OS << " [[gnu::assume_aligned(" << getAlignment() << ", " << getOffset() << ")]]";
1374
0
    break;
1375
0
  }
1376
0
}
1377
0
}
1378
1379
3
const char *AssumeAlignedAttr::getSpelling() const {
1380
3
  switch (SpellingListIndex) {
1381
3
  default:
1382
0
    llvm_unreachable("Unknown attribute spelling!");
1383
3
    
return "(No spelling)"0
;
1384
3
  case 0:
1385
3
    return "assume_aligned";
1386
3
  case 1:
1387
0
    return "assume_aligned";
1388
3
  }
1389
3
}
1390
1391
21.7k
AvailabilityAttr *AvailabilityAttr::clone(ASTContext &C) const {
1392
21.7k
  auto *A = new (C) AvailabilityAttr(getLocation(), C, platform, getIntroduced(), getDeprecated(), getObsoleted(), unavailable, getMessage(), strict, getReplacement(), getSpellingListIndex());
1393
21.7k
  A->Inherited = Inherited;
1394
21.7k
  A->IsPackExpansion = IsPackExpansion;
1395
21.7k
  A->Implicit = Implicit;
1396
21.7k
  return A;
1397
21.7k
}
1398
1399
6
void AvailabilityAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
1400
6
  switch (SpellingListIndex) {
1401
6
  default:
1402
0
    llvm_unreachable("Unknown attribute spelling!");
1403
6
    
break0
;
1404
6
  case 0 : {
1405
6
    OS << " __attribute__((availability(" << getPlatform()->getName();
1406
6
  if (getStrict()) 
OS << ", strict"1
;
1407
6
  if (!getIntroduced().empty()) OS << ", introduced=" << getIntroduced();
1408
6
  if (!getDeprecated().empty()) 
OS << ", deprecated=" << getDeprecated()5
;
1409
6
  if (!getObsoleted().empty()) 
OS << ", obsoleted=" << getObsoleted()0
;
1410
6
  if (getUnavailable()) 
OS << ", unavailable"0
;
1411
6
  OS << ")))";
1412
6
    break;
1413
6
  }
1414
6
  case 1 : {
1415
0
    OS << " [[clang::availability(" << (getPlatform() ? getPlatform()->getName() : "") << ", introduced=" << getIntroduced() << ", deprecated=" << getDeprecated() << ", obsoleted=" << getObsoleted() << ", " << getUnavailable() << ", \"" << getMessage() << "\", " << getStrict() << ", \"" << getReplacement() << "\")]]";
1416
0
    break;
1417
6
  }
1418
6
  case 2 : {
1419
0
    OS << " [[clang::availability(" << (getPlatform() ? getPlatform()->getName() : "") << ", introduced=" << getIntroduced() << ", deprecated=" << getDeprecated() << ", obsoleted=" << getObsoleted() << ", " << getUnavailable() << ", \"" << getMessage() << "\", " << getStrict() << ", \"" << getReplacement() << "\")]]";
1420
0
    break;
1421
6
  }
1422
6
}
1423
6
}
1424
1425
0
const char *AvailabilityAttr::getSpelling() const {
1426
0
  switch (SpellingListIndex) {
1427
0
  default:
1428
0
    llvm_unreachable("Unknown attribute spelling!");
1429
0
    return "(No spelling)";
1430
0
  case 0:
1431
0
    return "availability";
1432
0
  case 1:
1433
0
    return "availability";
1434
0
  case 2:
1435
0
    return "availability";
1436
0
  }
1437
0
}
1438
1439
3
BlocksAttr *BlocksAttr::clone(ASTContext &C) const {
1440
3
  auto *A = new (C) BlocksAttr(getLocation(), C, type, getSpellingListIndex());
1441
3
  A->Inherited = Inherited;
1442
3
  A->IsPackExpansion = IsPackExpansion;
1443
3
  A->Implicit = Implicit;
1444
3
  return A;
1445
3
}
1446
1447
2
void BlocksAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
1448
2
  switch (SpellingListIndex) {
1449
2
  default:
1450
0
    llvm_unreachable("Unknown attribute spelling!");
1451
2
    
break0
;
1452
2
  case 0 : {
1453
2
    OS << " __attribute__((blocks(\"" << BlocksAttr::ConvertBlockTypeToStr(getType()) << "\")))";
1454
2
    break;
1455
2
  }
1456
2
  case 1 : {
1457
0
    OS << " [[clang::blocks(\"" << BlocksAttr::ConvertBlockTypeToStr(getType()) << "\")]]";
1458
0
    break;
1459
2
  }
1460
2
  case 2 : {
1461
0
    OS << " [[clang::blocks(\"" << BlocksAttr::ConvertBlockTypeToStr(getType()) << "\")]]";
1462
0
    break;
1463
2
  }
1464
2
}
1465
2
}
1466
1467
0
const char *BlocksAttr::getSpelling() const {
1468
0
  switch (SpellingListIndex) {
1469
0
  default:
1470
0
    llvm_unreachable("Unknown attribute spelling!");
1471
0
    return "(No spelling)";
1472
0
  case 0:
1473
0
    return "blocks";
1474
0
  case 1:
1475
0
    return "blocks";
1476
0
  case 2:
1477
0
    return "blocks";
1478
0
  }
1479
0
}
1480
1481
7
C11NoReturnAttr *C11NoReturnAttr::clone(ASTContext &C) const {
1482
7
  auto *A = new (C) C11NoReturnAttr(getLocation(), C, getSpellingListIndex());
1483
7
  A->Inherited = Inherited;
1484
7
  A->IsPackExpansion = IsPackExpansion;
1485
7
  A->Implicit = Implicit;
1486
7
  return A;
1487
7
}
1488
1489
0
void C11NoReturnAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
1490
0
  switch (SpellingListIndex) {
1491
0
  default:
1492
0
    llvm_unreachable("Unknown attribute spelling!");
1493
0
    break;
1494
0
  case 0 : {
1495
0
    OS << " _Noreturn";
1496
0
    break;
1497
0
  }
1498
0
}
1499
0
}
1500
1501
0
const char *C11NoReturnAttr::getSpelling() const {
1502
0
  switch (SpellingListIndex) {
1503
0
  default:
1504
0
    llvm_unreachable("Unknown attribute spelling!");
1505
0
    return "(No spelling)";
1506
0
  case 0:
1507
0
    return "_Noreturn";
1508
0
  }
1509
0
}
1510
1511
0
CDeclAttr *CDeclAttr::clone(ASTContext &C) const {
1512
0
  auto *A = new (C) CDeclAttr(getLocation(), C, getSpellingListIndex());
1513
0
  A->Inherited = Inherited;
1514
0
  A->IsPackExpansion = IsPackExpansion;
1515
0
  A->Implicit = Implicit;
1516
0
  return A;
1517
0
}
1518
1519
0
void CDeclAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
1520
0
  switch (SpellingListIndex) {
1521
0
  default:
1522
0
    llvm_unreachable("Unknown attribute spelling!");
1523
0
    break;
1524
0
  case 0 : {
1525
0
    OS << " __attribute__((cdecl))";
1526
0
    break;
1527
0
  }
1528
0
  case 1 : {
1529
0
    OS << " [[gnu::cdecl]]";
1530
0
    break;
1531
0
  }
1532
0
  case 2 : {
1533
0
    OS << " __cdecl";
1534
0
    break;
1535
0
  }
1536
0
  case 3 : {
1537
0
    OS << " _cdecl";
1538
0
    break;
1539
0
  }
1540
0
}
1541
0
}
1542
1543
0
const char *CDeclAttr::getSpelling() const {
1544
0
  switch (SpellingListIndex) {
1545
0
  default:
1546
0
    llvm_unreachable("Unknown attribute spelling!");
1547
0
    return "(No spelling)";
1548
0
  case 0:
1549
0
    return "cdecl";
1550
0
  case 1:
1551
0
    return "cdecl";
1552
0
  case 2:
1553
0
    return "__cdecl";
1554
0
  case 3:
1555
0
    return "_cdecl";
1556
0
  }
1557
0
}
1558
1559
0
CFAuditedTransferAttr *CFAuditedTransferAttr::clone(ASTContext &C) const {
1560
0
  auto *A = new (C) CFAuditedTransferAttr(getLocation(), C, getSpellingListIndex());
1561
0
  A->Inherited = Inherited;
1562
0
  A->IsPackExpansion = IsPackExpansion;
1563
0
  A->Implicit = Implicit;
1564
0
  return A;
1565
0
}
1566
1567
0
void CFAuditedTransferAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
1568
0
  switch (SpellingListIndex) {
1569
0
  default:
1570
0
    llvm_unreachable("Unknown attribute spelling!");
1571
0
    break;
1572
0
  case 0 : {
1573
0
    OS << " __attribute__((cf_audited_transfer))";
1574
0
    break;
1575
0
  }
1576
0
  case 1 : {
1577
0
    OS << " [[clang::cf_audited_transfer]]";
1578
0
    break;
1579
0
  }
1580
0
  case 2 : {
1581
0
    OS << " [[clang::cf_audited_transfer]]";
1582
0
    break;
1583
0
  }
1584
0
}
1585
0
}
1586
1587
0
const char *CFAuditedTransferAttr::getSpelling() const {
1588
0
  switch (SpellingListIndex) {
1589
0
  default:
1590
0
    llvm_unreachable("Unknown attribute spelling!");
1591
0
    return "(No spelling)";
1592
0
  case 0:
1593
0
    return "cf_audited_transfer";
1594
0
  case 1:
1595
0
    return "cf_audited_transfer";
1596
0
  case 2:
1597
0
    return "cf_audited_transfer";
1598
0
  }
1599
0
}
1600
1601
5
CFConsumedAttr *CFConsumedAttr::clone(ASTContext &C) const {
1602
5
  auto *A = new (C) CFConsumedAttr(getLocation(), C, getSpellingListIndex());
1603
5
  A->Inherited = Inherited;
1604
5
  A->IsPackExpansion = IsPackExpansion;
1605
5
  A->Implicit = Implicit;
1606
5
  return A;
1607
5
}
1608
1609
0
void CFConsumedAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
1610
0
  switch (SpellingListIndex) {
1611
0
  default:
1612
0
    llvm_unreachable("Unknown attribute spelling!");
1613
0
    break;
1614
0
  case 0 : {
1615
0
    OS << " __attribute__((cf_consumed))";
1616
0
    break;
1617
0
  }
1618
0
  case 1 : {
1619
0
    OS << " [[clang::cf_consumed]]";
1620
0
    break;
1621
0
  }
1622
0
  case 2 : {
1623
0
    OS << " [[clang::cf_consumed]]";
1624
0
    break;
1625
0
  }
1626
0
}
1627
0
}
1628
1629
0
const char *CFConsumedAttr::getSpelling() const {
1630
0
  switch (SpellingListIndex) {
1631
0
  default:
1632
0
    llvm_unreachable("Unknown attribute spelling!");
1633
0
    return "(No spelling)";
1634
0
  case 0:
1635
0
    return "cf_consumed";
1636
0
  case 1:
1637
0
    return "cf_consumed";
1638
0
  case 2:
1639
0
    return "cf_consumed";
1640
0
  }
1641
0
}
1642
1643
5
CFReturnsNotRetainedAttr *CFReturnsNotRetainedAttr::clone(ASTContext &C) const {
1644
5
  auto *A = new (C) CFReturnsNotRetainedAttr(getLocation(), C, getSpellingListIndex());
1645
5
  A->Inherited = Inherited;
1646
5
  A->IsPackExpansion = IsPackExpansion;
1647
5
  A->Implicit = Implicit;
1648
5
  return A;
1649
5
}
1650
1651
0
void CFReturnsNotRetainedAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
1652
0
  switch (SpellingListIndex) {
1653
0
  default:
1654
0
    llvm_unreachable("Unknown attribute spelling!");
1655
0
    break;
1656
0
  case 0 : {
1657
0
    OS << " __attribute__((cf_returns_not_retained))";
1658
0
    break;
1659
0
  }
1660
0
  case 1 : {
1661
0
    OS << " [[clang::cf_returns_not_retained]]";
1662
0
    break;
1663
0
  }
1664
0
  case 2 : {
1665
0
    OS << " [[clang::cf_returns_not_retained]]";
1666
0
    break;
1667
0
  }
1668
0
}
1669
0
}
1670
1671
0
const char *CFReturnsNotRetainedAttr::getSpelling() const {
1672
0
  switch (SpellingListIndex) {
1673
0
  default:
1674
0
    llvm_unreachable("Unknown attribute spelling!");
1675
0
    return "(No spelling)";
1676
0
  case 0:
1677
0
    return "cf_returns_not_retained";
1678
0
  case 1:
1679
0
    return "cf_returns_not_retained";
1680
0
  case 2:
1681
0
    return "cf_returns_not_retained";
1682
0
  }
1683
0
}
1684
1685
16
CFReturnsRetainedAttr *CFReturnsRetainedAttr::clone(ASTContext &C) const {
1686
16
  auto *A = new (C) CFReturnsRetainedAttr(getLocation(), C, getSpellingListIndex());
1687
16
  A->Inherited = Inherited;
1688
16
  A->IsPackExpansion = IsPackExpansion;
1689
16
  A->Implicit = Implicit;
1690
16
  return A;
1691
16
}
1692
1693
0
void CFReturnsRetainedAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
1694
0
  switch (SpellingListIndex) {
1695
0
  default:
1696
0
    llvm_unreachable("Unknown attribute spelling!");
1697
0
    break;
1698
0
  case 0 : {
1699
0
    OS << " __attribute__((cf_returns_retained))";
1700
0
    break;
1701
0
  }
1702
0
  case 1 : {
1703
0
    OS << " [[clang::cf_returns_retained]]";
1704
0
    break;
1705
0
  }
1706
0
  case 2 : {
1707
0
    OS << " [[clang::cf_returns_retained]]";
1708
0
    break;
1709
0
  }
1710
0
}
1711
0
}
1712
1713
0
const char *CFReturnsRetainedAttr::getSpelling() const {
1714
0
  switch (SpellingListIndex) {
1715
0
  default:
1716
0
    llvm_unreachable("Unknown attribute spelling!");
1717
0
    return "(No spelling)";
1718
0
  case 0:
1719
0
    return "cf_returns_retained";
1720
0
  case 1:
1721
0
    return "cf_returns_retained";
1722
0
  case 2:
1723
0
    return "cf_returns_retained";
1724
0
  }
1725
0
}
1726
1727
0
CFUnknownTransferAttr *CFUnknownTransferAttr::clone(ASTContext &C) const {
1728
0
  auto *A = new (C) CFUnknownTransferAttr(getLocation(), C, getSpellingListIndex());
1729
0
  A->Inherited = Inherited;
1730
0
  A->IsPackExpansion = IsPackExpansion;
1731
0
  A->Implicit = Implicit;
1732
0
  return A;
1733
0
}
1734
1735
0
void CFUnknownTransferAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
1736
0
  switch (SpellingListIndex) {
1737
0
  default:
1738
0
    llvm_unreachable("Unknown attribute spelling!");
1739
0
    break;
1740
0
  case 0 : {
1741
0
    OS << " __attribute__((cf_unknown_transfer))";
1742
0
    break;
1743
0
  }
1744
0
  case 1 : {
1745
0
    OS << " [[clang::cf_unknown_transfer]]";
1746
0
    break;
1747
0
  }
1748
0
  case 2 : {
1749
0
    OS << " [[clang::cf_unknown_transfer]]";
1750
0
    break;
1751
0
  }
1752
0
}
1753
0
}
1754
1755
0
const char *CFUnknownTransferAttr::getSpelling() const {
1756
0
  switch (SpellingListIndex) {
1757
0
  default:
1758
0
    llvm_unreachable("Unknown attribute spelling!");
1759
0
    return "(No spelling)";
1760
0
  case 0:
1761
0
    return "cf_unknown_transfer";
1762
0
  case 1:
1763
0
    return "cf_unknown_transfer";
1764
0
  case 2:
1765
0
    return "cf_unknown_transfer";
1766
0
  }
1767
0
}
1768
1769
0
CUDAConstantAttr *CUDAConstantAttr::clone(ASTContext &C) const {
1770
0
  auto *A = new (C) CUDAConstantAttr(getLocation(), C, getSpellingListIndex());
1771
0
  A->Inherited = Inherited;
1772
0
  A->IsPackExpansion = IsPackExpansion;
1773
0
  A->Implicit = Implicit;
1774
0
  return A;
1775
0
}
1776
1777
0
void CUDAConstantAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
1778
0
  switch (SpellingListIndex) {
1779
0
  default:
1780
0
    llvm_unreachable("Unknown attribute spelling!");
1781
0
    break;
1782
0
  case 0 : {
1783
0
    OS << " __attribute__((constant))";
1784
0
    break;
1785
0
  }
1786
0
  case 1 : {
1787
0
    OS << " __declspec(__constant__)";
1788
0
    break;
1789
0
  }
1790
0
}
1791
0
}
1792
1793
2
const char *CUDAConstantAttr::getSpelling() const {
1794
2
  switch (SpellingListIndex) {
1795
2
  default:
1796
0
    llvm_unreachable("Unknown attribute spelling!");
1797
2
    
return "(No spelling)"0
;
1798
2
  case 0:
1799
2
    return "constant";
1800
2
  case 1:
1801
0
    return "__constant__";
1802
2
  }
1803
2
}
1804
1805
57
CUDADeviceAttr *CUDADeviceAttr::clone(ASTContext &C) const {
1806
57
  auto *A = new (C) CUDADeviceAttr(getLocation(), C, getSpellingListIndex());
1807
57
  A->Inherited = Inherited;
1808
57
  A->IsPackExpansion = IsPackExpansion;
1809
57
  A->Implicit = Implicit;
1810
57
  return A;
1811
57
}
1812
1813
0
void CUDADeviceAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
1814
0
  switch (SpellingListIndex) {
1815
0
  default:
1816
0
    llvm_unreachable("Unknown attribute spelling!");
1817
0
    break;
1818
0
  case 0 : {
1819
0
    OS << " __attribute__((device))";
1820
0
    break;
1821
0
  }
1822
0
  case 1 : {
1823
0
    OS << " __declspec(__device__)";
1824
0
    break;
1825
0
  }
1826
0
}
1827
0
}
1828
1829
2
const char *CUDADeviceAttr::getSpelling() const {
1830
2
  switch (SpellingListIndex) {
1831
2
  default:
1832
0
    llvm_unreachable("Unknown attribute spelling!");
1833
2
    
return "(No spelling)"0
;
1834
2
  case 0:
1835
2
    return "device";
1836
2
  case 1:
1837
0
    return "__device__";
1838
2
  }
1839
2
}
1840
1841
12
CUDAGlobalAttr *CUDAGlobalAttr::clone(ASTContext &C) const {
1842
12
  auto *A = new (C) CUDAGlobalAttr(getLocation(), C, getSpellingListIndex());
1843
12
  A->Inherited = Inherited;
1844
12
  A->IsPackExpansion = IsPackExpansion;
1845
12
  A->Implicit = Implicit;
1846
12
  return A;
1847
12
}
1848
1849
0
void CUDAGlobalAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
1850
0
  switch (SpellingListIndex) {
1851
0
  default:
1852
0
    llvm_unreachable("Unknown attribute spelling!");
1853
0
    break;
1854
0
  case 0 : {
1855
0
    OS << " __attribute__((global))";
1856
0
    break;
1857
0
  }
1858
0
  case 1 : {
1859
0
    OS << " __declspec(__global__)";
1860
0
    break;
1861
0
  }
1862
0
}
1863
0
}
1864
1865
4
const char *CUDAGlobalAttr::getSpelling() const {
1866
4
  switch (SpellingListIndex) {
1867
4
  default:
1868
0
    llvm_unreachable("Unknown attribute spelling!");
1869
4
    
return "(No spelling)"0
;
1870
4
  case 0:
1871
4
    return "global";
1872
4
  case 1:
1873
0
    return "__global__";
1874
4
  }
1875
4
}
1876
1877
41
CUDAHostAttr *CUDAHostAttr::clone(ASTContext &C) const {
1878
41
  auto *A = new (C) CUDAHostAttr(getLocation(), C, getSpellingListIndex());
1879
41
  A->Inherited = Inherited;
1880
41
  A->IsPackExpansion = IsPackExpansion;
1881
41
  A->Implicit = Implicit;
1882
41
  return A;
1883
41
}
1884
1885
0
void CUDAHostAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
1886
0
  switch (SpellingListIndex) {
1887
0
  default:
1888
0
    llvm_unreachable("Unknown attribute spelling!");
1889
0
    break;
1890
0
  case 0 : {
1891
0
    OS << " __attribute__((host))";
1892
0
    break;
1893
0
  }
1894
0
  case 1 : {
1895
0
    OS << " __declspec(__host__)";
1896
0
    break;
1897
0
  }
1898
0
}
1899
0
}
1900
1901
2
const char *CUDAHostAttr::getSpelling() const {
1902
2
  switch (SpellingListIndex) {
1903
2
  default:
1904
0
    llvm_unreachable("Unknown attribute spelling!");
1905
2
    
return "(No spelling)"0
;
1906
2
  case 0:
1907
2
    return "host";
1908
2
  case 1:
1909
0
    return "__host__";
1910
2
  }
1911
2
}
1912
1913
0
CUDAInvalidTargetAttr *CUDAInvalidTargetAttr::clone(ASTContext &C) const {
1914
0
  auto *A = new (C) CUDAInvalidTargetAttr(getLocation(), C, getSpellingListIndex());
1915
0
  A->Inherited = Inherited;
1916
0
  A->IsPackExpansion = IsPackExpansion;
1917
0
  A->Implicit = Implicit;
1918
0
  return A;
1919
0
}
1920
1921
0
void CUDAInvalidTargetAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
1922
0
}
1923
1924
0
const char *CUDAInvalidTargetAttr::getSpelling() const {
1925
0
  return "(No spelling)";
1926
0
}
1927
1928
0
CUDALaunchBoundsAttr *CUDALaunchBoundsAttr::clone(ASTContext &C) const {
1929
0
  auto *A = new (C) CUDALaunchBoundsAttr(getLocation(), C, maxThreads, minBlocks, getSpellingListIndex());
1930
0
  A->Inherited = Inherited;
1931
0
  A->IsPackExpansion = IsPackExpansion;
1932
0
  A->Implicit = Implicit;
1933
0
  return A;
1934
0
}
1935
1936
0
void CUDALaunchBoundsAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
1937
0
  switch (SpellingListIndex) {
1938
0
  default:
1939
0
    llvm_unreachable("Unknown attribute spelling!");
1940
0
    break;
1941
0
  case 0 : {
1942
0
    OS << " __attribute__((launch_bounds(" << getMaxThreads() << ", " << getMinBlocks() << ")))";
1943
0
    break;
1944
0
  }
1945
0
  case 1 : {
1946
0
    OS << " __declspec(__launch_bounds__(" << getMaxThreads() << ", " << getMinBlocks() << "))";
1947
0
    break;
1948
0
  }
1949
0
}
1950
0
}
1951
1952
7
const char *CUDALaunchBoundsAttr::getSpelling() const {
1953
7
  switch (SpellingListIndex) {
1954
7
  default:
1955
0
    llvm_unreachable("Unknown attribute spelling!");
1956
7
    
return "(No spelling)"0
;
1957
7
  case 0:
1958
7
    return "launch_bounds";
1959
7
  case 1:
1960
0
    return "__launch_bounds__";
1961
7
  }
1962
7
}
1963
1964
2
CUDASharedAttr *CUDASharedAttr::clone(ASTContext &C) const {
1965
2
  auto *A = new (C) CUDASharedAttr(getLocation(), C, getSpellingListIndex());
1966
2
  A->Inherited = Inherited;
1967
2
  A->IsPackExpansion = IsPackExpansion;
1968
2
  A->Implicit = Implicit;
1969
2
  return A;
1970
2
}
1971
1972
0
void CUDASharedAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
1973
0
  switch (SpellingListIndex) {
1974
0
  default:
1975
0
    llvm_unreachable("Unknown attribute spelling!");
1976
0
    break;
1977
0
  case 0 : {
1978
0
    OS << " __attribute__((shared))";
1979
0
    break;
1980
0
  }
1981
0
  case 1 : {
1982
0
    OS << " __declspec(__shared__)";
1983
0
    break;
1984
0
  }
1985
0
}
1986
0
}
1987
1988
4
const char *CUDASharedAttr::getSpelling() const {
1989
4
  switch (SpellingListIndex) {
1990
4
  default:
1991
0
    llvm_unreachable("Unknown attribute spelling!");
1992
4
    
return "(No spelling)"0
;
1993
4
  case 0:
1994
4
    return "shared";
1995
4
  case 1:
1996
0
    return "__shared__";
1997
4
  }
1998
4
}
1999
2000
2.38k
CXX11NoReturnAttr *CXX11NoReturnAttr::clone(ASTContext &C) const {
2001
2.38k
  auto *A = new (C) CXX11NoReturnAttr(getLocation(), C, getSpellingListIndex());
2002
2.38k
  A->Inherited = Inherited;
2003
2.38k
  A->IsPackExpansion = IsPackExpansion;
2004
2.38k
  A->Implicit = Implicit;
2005
2.38k
  return A;
2006
2.38k
}
2007
2008
1
void CXX11NoReturnAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
2009
1
  switch (SpellingListIndex) {
2010
1
  default:
2011
0
    llvm_unreachable("Unknown attribute spelling!");
2012
1
    
break0
;
2013
1
  case 0 : {
2014
1
    OS << " [[noreturn]]";
2015
1
    break;
2016
1
  }
2017
1
}
2018
1
}
2019
2020
0
const char *CXX11NoReturnAttr::getSpelling() const {
2021
0
  switch (SpellingListIndex) {
2022
0
  default:
2023
0
    llvm_unreachable("Unknown attribute spelling!");
2024
0
    return "(No spelling)";
2025
0
  case 0:
2026
0
    return "noreturn";
2027
0
  }
2028
0
}
2029
2030
6
CallableWhenAttr *CallableWhenAttr::clone(ASTContext &C) const {
2031
6
  auto *A = new (C) CallableWhenAttr(getLocation(), C, callableStates_, callableStates_Size, getSpellingListIndex());
2032
6
  A->Inherited = Inherited;
2033
6
  A->IsPackExpansion = IsPackExpansion;
2034
6
  A->Implicit = Implicit;
2035
6
  return A;
2036
6
}
2037
2038
1
void CallableWhenAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
2039
1
  switch (SpellingListIndex) {
2040
1
  default:
2041
0
    llvm_unreachable("Unknown attribute spelling!");
2042
1
    
break0
;
2043
1
  case 0 : {
2044
1
    OS << " __attribute__((callable_when(";
2045
1
  bool isFirst = true;
2046
2
  for (const auto &Val : callableStates()) {
2047
2
    if (isFirst) 
isFirst = false1
;
2048
1
    else OS << ", ";
2049
2
    OS << "\"" << CallableWhenAttr::ConvertConsumedStateToStr(Val)<< "\"";
2050
2
  }
2051
1
  OS << ")))";
2052
1
    break;
2053
1
  }
2054
1
  case 1 : {
2055
0
    OS << " [[clang::callable_when(";
2056
0
  bool isFirst = true;
2057
0
  for (const auto &Val : callableStates()) {
2058
0
    if (isFirst) isFirst = false;
2059
0
    else OS << ", ";
2060
0
    OS << "\"" << CallableWhenAttr::ConvertConsumedStateToStr(Val)<< "\"";
2061
0
  }
2062
0
  OS << ")]]";
2063
0
    break;
2064
1
  }
2065
1
}
2066
1
}
2067
2068
0
const char *CallableWhenAttr::getSpelling() const {
2069
0
  switch (SpellingListIndex) {
2070
0
  default:
2071
0
    llvm_unreachable("Unknown attribute spelling!");
2072
0
    return "(No spelling)";
2073
0
  case 0:
2074
0
    return "callable_when";
2075
0
  case 1:
2076
0
    return "callable_when";
2077
0
  }
2078
0
}
2079
2080
0
CapabilityAttr *CapabilityAttr::clone(ASTContext &C) const {
2081
0
  auto *A = new (C) CapabilityAttr(getLocation(), C, getName(), getSpellingListIndex());
2082
0
  A->Inherited = Inherited;
2083
0
  A->IsPackExpansion = IsPackExpansion;
2084
0
  A->Implicit = Implicit;
2085
0
  return A;
2086
0
}
2087
2088
0
void CapabilityAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
2089
0
  switch (SpellingListIndex) {
2090
0
  default:
2091
0
    llvm_unreachable("Unknown attribute spelling!");
2092
0
    break;
2093
0
  case 0 : {
2094
0
    OS << " __attribute__((capability(\"" << getName() << "\")))";
2095
0
    break;
2096
0
  }
2097
0
  case 1 : {
2098
0
    OS << " [[clang::capability(\"" << getName() << "\")]]";
2099
0
    break;
2100
0
  }
2101
0
  case 2 : {
2102
0
    OS << " __attribute__((shared_capability(\"" << getName() << "\")))";
2103
0
    break;
2104
0
  }
2105
0
  case 3 : {
2106
0
    OS << " [[clang::shared_capability(\"" << getName() << "\")]]";
2107
0
    break;
2108
0
  }
2109
0
}
2110
0
}
2111
2112
1
const char *CapabilityAttr::getSpelling() const {
2113
1
  switch (SpellingListIndex) {
2114
1
  default:
2115
0
    llvm_unreachable("Unknown attribute spelling!");
2116
1
    
return "(No spelling)"0
;
2117
1
  case 0:
2118
1
    return "capability";
2119
1
  case 1:
2120
0
    return "capability";
2121
1
  case 2:
2122
0
    return "shared_capability";
2123
1
  case 3:
2124
0
    return "shared_capability";
2125
1
  }
2126
1
}
2127
2128
0
CapturedRecordAttr *CapturedRecordAttr::clone(ASTContext &C) const {
2129
0
  auto *A = new (C) CapturedRecordAttr(getLocation(), C, getSpellingListIndex());
2130
0
  A->Inherited = Inherited;
2131
0
  A->IsPackExpansion = IsPackExpansion;
2132
0
  A->Implicit = Implicit;
2133
0
  return A;
2134
0
}
2135
2136
0
void CapturedRecordAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
2137
0
}
2138
2139
0
const char *CapturedRecordAttr::getSpelling() const {
2140
0
  return "(No spelling)";
2141
0
}
2142
2143
5
CarriesDependencyAttr *CarriesDependencyAttr::clone(ASTContext &C) const {
2144
5
  auto *A = new (C) CarriesDependencyAttr(getLocation(), C, getSpellingListIndex());
2145
5
  A->Inherited = Inherited;
2146
5
  A->IsPackExpansion = IsPackExpansion;
2147
5
  A->Implicit = Implicit;
2148
5
  return A;
2149
5
}
2150
2151
0
void CarriesDependencyAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
2152
0
  switch (SpellingListIndex) {
2153
0
  default:
2154
0
    llvm_unreachable("Unknown attribute spelling!");
2155
0
    break;
2156
0
  case 0 : {
2157
0
    OS << " __attribute__((carries_dependency))";
2158
0
    break;
2159
0
  }
2160
0
  case 1 : {
2161
0
    OS << " [[carries_dependency]]";
2162
0
    break;
2163
0
  }
2164
0
}
2165
0
}
2166
2167
0
const char *CarriesDependencyAttr::getSpelling() const {
2168
0
  switch (SpellingListIndex) {
2169
0
  default:
2170
0
    llvm_unreachable("Unknown attribute spelling!");
2171
0
    return "(No spelling)";
2172
0
  case 0:
2173
0
    return "carries_dependency";
2174
0
  case 1:
2175
0
    return "carries_dependency";
2176
0
  }
2177
0
}
2178
2179
0
CleanupAttr *CleanupAttr::clone(ASTContext &C) const {
2180
0
  auto *A = new (C) CleanupAttr(getLocation(), C, functionDecl, getSpellingListIndex());
2181
0
  A->Inherited = Inherited;
2182
0
  A->IsPackExpansion = IsPackExpansion;
2183
0
  A->Implicit = Implicit;
2184
0
  return A;
2185
0
}
2186
2187
0
void CleanupAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
2188
0
  switch (SpellingListIndex) {
2189
0
  default:
2190
0
    llvm_unreachable("Unknown attribute spelling!");
2191
0
    break;
2192
0
  case 0 : {
2193
0
    OS << " __attribute__((cleanup(" << getFunctionDecl()->getNameInfo().getAsString() << ")))";
2194
0
    break;
2195
0
  }
2196
0
  case 1 : {
2197
0
    OS << " [[gnu::cleanup(" << getFunctionDecl()->getNameInfo().getAsString() << ")]]";
2198
0
    break;
2199
0
  }
2200
0
}
2201
0
}
2202
2203
0
const char *CleanupAttr::getSpelling() const {
2204
0
  switch (SpellingListIndex) {
2205
0
  default:
2206
0
    llvm_unreachable("Unknown attribute spelling!");
2207
0
    return "(No spelling)";
2208
0
  case 0:
2209
0
    return "cleanup";
2210
0
  case 1:
2211
0
    return "cleanup";
2212
0
  }
2213
0
}
2214
2215
120
CodeSegAttr *CodeSegAttr::clone(ASTContext &C) const {
2216
120
  auto *A = new (C) CodeSegAttr(getLocation(), C, getName(), getSpellingListIndex());
2217
120
  A->Inherited = Inherited;
2218
120
  A->IsPackExpansion = IsPackExpansion;
2219
120
  A->Implicit = Implicit;
2220
120
  return A;
2221
120
}
2222
2223
0
void CodeSegAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
2224
0
  switch (SpellingListIndex) {
2225
0
  default:
2226
0
    llvm_unreachable("Unknown attribute spelling!");
2227
0
    break;
2228
0
  case 0 : {
2229
0
    OS << " __declspec(code_seg(\"" << getName() << "\"))";
2230
0
    break;
2231
0
  }
2232
0
}
2233
0
}
2234
2235
0
const char *CodeSegAttr::getSpelling() const {
2236
0
  switch (SpellingListIndex) {
2237
0
  default:
2238
0
    llvm_unreachable("Unknown attribute spelling!");
2239
0
    return "(No spelling)";
2240
0
  case 0:
2241
0
    return "code_seg";
2242
0
  }
2243
0
}
2244
2245
1
ColdAttr *ColdAttr::clone(ASTContext &C) const {
2246
1
  auto *A = new (C) ColdAttr(getLocation(), C, getSpellingListIndex());
2247
1
  A->Inherited = Inherited;
2248
1
  A->IsPackExpansion = IsPackExpansion;
2249
1
  A->Implicit = Implicit;
2250
1
  return A;
2251
1
}
2252
2253
12
void ColdAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
2254
12
  switch (SpellingListIndex) {
2255
12
  default:
2256
0
    llvm_unreachable("Unknown attribute spelling!");
2257
12
    
break0
;
2258
12
  case 0 : {
2259
12
    OS << " __attribute__((cold))";
2260
12
    break;
2261
12
  }
2262
12
  case 1 : {
2263
0
    OS << " [[gnu::cold]]";
2264
0
    break;
2265
12
  }
2266
12
}
2267
12
}
2268
2269
1
const char *ColdAttr::getSpelling() const {
2270
1
  switch (SpellingListIndex) {
2271
1
  default:
2272
0
    llvm_unreachable("Unknown attribute spelling!");
2273
1
    
return "(No spelling)"0
;
2274
1
  case 0:
2275
1
    return "cold";
2276
1
  case 1:
2277
0
    return "cold";
2278
1
  }
2279
1
}
2280
2281
0
CommonAttr *CommonAttr::clone(ASTContext &C) const {
2282
0
  auto *A = new (C) CommonAttr(getLocation(), C, getSpellingListIndex());
2283
0
  A->Inherited = Inherited;
2284
0
  A->IsPackExpansion = IsPackExpansion;
2285
0
  A->Implicit = Implicit;
2286
0
  return A;
2287
0
}
2288
2289
0
void CommonAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
2290
0
  switch (SpellingListIndex) {
2291
0
  default:
2292
0
    llvm_unreachable("Unknown attribute spelling!");
2293
0
    break;
2294
0
  case 0 : {
2295
0
    OS << " __attribute__((common))";
2296
0
    break;
2297
0
  }
2298
0
  case 1 : {
2299
0
    OS << " [[gnu::common]]";
2300
0
    break;
2301
0
  }
2302
0
}
2303
0
}
2304
2305
5
const char *CommonAttr::getSpelling() const {
2306
5
  switch (SpellingListIndex) {
2307
5
  default:
2308
0
    llvm_unreachable("Unknown attribute spelling!");
2309
5
    
return "(No spelling)"0
;
2310
5
  case 0:
2311
5
    return "common";
2312
5
  case 1:
2313
0
    return "common";
2314
5
  }
2315
5
}
2316
2317
98.9k
ConstAttr *ConstAttr::clone(ASTContext &C) const {
2318
98.9k
  auto *A = new (C) ConstAttr(getLocation(), C, getSpellingListIndex());
2319
98.9k
  A->Inherited = Inherited;
2320
98.9k
  A->IsPackExpansion = IsPackExpansion;
2321
98.9k
  A->Implicit = Implicit;
2322
98.9k
  return A;
2323
98.9k
}
2324
2325
6
void ConstAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
2326
6
  switch (SpellingListIndex) {
2327
6
  default:
2328
0
    llvm_unreachable("Unknown attribute spelling!");
2329
6
    
break0
;
2330
6
  case 0 : {
2331
3
    OS << " __attribute__((const))";
2332
3
    break;
2333
6
  }
2334
6
  case 1 : {
2335
0
    OS << " [[gnu::const]]";
2336
0
    break;
2337
6
  }
2338
6
  case 2 : {
2339
3
    OS << " __attribute__((__const))";
2340
3
    break;
2341
6
  }
2342
6
  case 3 : {
2343
0
    OS << " [[gnu::__const]]";
2344
0
    break;
2345
6
  }
2346
6
}
2347
6
}
2348
2349
0
const char *ConstAttr::getSpelling() const {
2350
0
  switch (SpellingListIndex) {
2351
0
  default:
2352
0
    llvm_unreachable("Unknown attribute spelling!");
2353
0
    return "(No spelling)";
2354
0
  case 0:
2355
0
    return "const";
2356
0
  case 1:
2357
0
    return "const";
2358
0
  case 2:
2359
0
    return "__const";
2360
0
  case 3:
2361
0
    return "__const";
2362
0
  }
2363
0
}
2364
2365
20
ConstructorAttr *ConstructorAttr::clone(ASTContext &C) const {
2366
20
  auto *A = new (C) ConstructorAttr(getLocation(), C, priority, getSpellingListIndex());
2367
20
  A->Inherited = Inherited;
2368
20
  A->IsPackExpansion = IsPackExpansion;
2369
20
  A->Implicit = Implicit;
2370
20
  return A;
2371
20
}
2372
2373
0
void ConstructorAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
2374
0
  switch (SpellingListIndex) {
2375
0
  default:
2376
0
    llvm_unreachable("Unknown attribute spelling!");
2377
0
    break;
2378
0
  case 0 : {
2379
0
    OS << " __attribute__((constructor(" << getPriority() << ")))";
2380
0
    break;
2381
0
  }
2382
0
  case 1 : {
2383
0
    OS << " [[gnu::constructor(" << getPriority() << ")]]";
2384
0
    break;
2385
0
  }
2386
0
}
2387
0
}
2388
2389
0
const char *ConstructorAttr::getSpelling() const {
2390
0
  switch (SpellingListIndex) {
2391
0
  default:
2392
0
    llvm_unreachable("Unknown attribute spelling!");
2393
0
    return "(No spelling)";
2394
0
  case 0:
2395
0
    return "constructor";
2396
0
  case 1:
2397
0
    return "constructor";
2398
0
  }
2399
0
}
2400
2401
2
ConsumableAttr *ConsumableAttr::clone(ASTContext &C) const {
2402
2
  auto *A = new (C) ConsumableAttr(getLocation(), C, defaultState, getSpellingListIndex());
2403
2
  A->Inherited = Inherited;
2404
2
  A->IsPackExpansion = IsPackExpansion;
2405
2
  A->Implicit = Implicit;
2406
2
  return A;
2407
2
}
2408
2409
1
void ConsumableAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
2410
1
  switch (SpellingListIndex) {
2411
1
  default:
2412
0
    llvm_unreachable("Unknown attribute spelling!");
2413
1
    
break0
;
2414
1
  case 0 : {
2415
1
    OS << " __attribute__((consumable(\"" << ConsumableAttr::ConvertConsumedStateToStr(getDefaultState()) << "\")))";
2416
1
    break;
2417
1
  }
2418
1
  case 1 : {
2419
0
    OS << " [[clang::consumable(\"" << ConsumableAttr::ConvertConsumedStateToStr(getDefaultState()) << "\")]]";
2420
0
    break;
2421
1
  }
2422
1
}
2423
1
}
2424
2425
0
const char *ConsumableAttr::getSpelling() const {
2426
0
  switch (SpellingListIndex) {
2427
0
  default:
2428
0
    llvm_unreachable("Unknown attribute spelling!");
2429
0
    return "(No spelling)";
2430
0
  case 0:
2431
0
    return "consumable";
2432
0
  case 1:
2433
0
    return "consumable";
2434
0
  }
2435
0
}
2436
2437
0
ConsumableAutoCastAttr *ConsumableAutoCastAttr::clone(ASTContext &C) const {
2438
0
  auto *A = new (C) ConsumableAutoCastAttr(getLocation(), C, getSpellingListIndex());
2439
0
  A->Inherited = Inherited;
2440
0
  A->IsPackExpansion = IsPackExpansion;
2441
0
  A->Implicit = Implicit;
2442
0
  return A;
2443
0
}
2444
2445
0
void ConsumableAutoCastAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
2446
0
  switch (SpellingListIndex) {
2447
0
  default:
2448
0
    llvm_unreachable("Unknown attribute spelling!");
2449
0
    break;
2450
0
  case 0 : {
2451
0
    OS << " __attribute__((consumable_auto_cast_state))";
2452
0
    break;
2453
0
  }
2454
0
  case 1 : {
2455
0
    OS << " [[clang::consumable_auto_cast_state]]";
2456
0
    break;
2457
0
  }
2458
0
}
2459
0
}
2460
2461
0
const char *ConsumableAutoCastAttr::getSpelling() const {
2462
0
  switch (SpellingListIndex) {
2463
0
  default:
2464
0
    llvm_unreachable("Unknown attribute spelling!");
2465
0
    return "(No spelling)";
2466
0
  case 0:
2467
0
    return "consumable_auto_cast_state";
2468
0
  case 1:
2469
0
    return "consumable_auto_cast_state";
2470
0
  }
2471
0
}
2472
2473
0
ConsumableSetOnReadAttr *ConsumableSetOnReadAttr::clone(ASTContext &C) const {
2474
0
  auto *A = new (C) ConsumableSetOnReadAttr(getLocation(), C, getSpellingListIndex());
2475
0
  A->Inherited = Inherited;
2476
0
  A->IsPackExpansion = IsPackExpansion;
2477
0
  A->Implicit = Implicit;
2478
0
  return A;
2479
0
}
2480
2481
0
void ConsumableSetOnReadAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
2482
0
  switch (SpellingListIndex) {
2483
0
  default:
2484
0
    llvm_unreachable("Unknown attribute spelling!");
2485
0
    break;
2486
0
  case 0 : {
2487
0
    OS << " __attribute__((consumable_set_state_on_read))";
2488
0
    break;
2489
0
  }
2490
0
  case 1 : {
2491
0
    OS << " [[clang::consumable_set_state_on_read]]";
2492
0
    break;
2493
0
  }
2494
0
}
2495
0
}
2496
2497
0
const char *ConsumableSetOnReadAttr::getSpelling() const {
2498
0
  switch (SpellingListIndex) {
2499
0
  default:
2500
0
    llvm_unreachable("Unknown attribute spelling!");
2501
0
    return "(No spelling)";
2502
0
  case 0:
2503
0
    return "consumable_set_state_on_read";
2504
0
  case 1:
2505
0
    return "consumable_set_state_on_read";
2506
0
  }
2507
0
}
2508
2509
0
ConvergentAttr *ConvergentAttr::clone(ASTContext &C) const {
2510
0
  auto *A = new (C) ConvergentAttr(getLocation(), C, getSpellingListIndex());
2511
0
  A->Inherited = Inherited;
2512
0
  A->IsPackExpansion = IsPackExpansion;
2513
0
  A->Implicit = Implicit;
2514
0
  return A;
2515
0
}
2516
2517
0
void ConvergentAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
2518
0
  switch (SpellingListIndex) {
2519
0
  default:
2520
0
    llvm_unreachable("Unknown attribute spelling!");
2521
0
    break;
2522
0
  case 0 : {
2523
0
    OS << " __attribute__((convergent))";
2524
0
    break;
2525
0
  }
2526
0
  case 1 : {
2527
0
    OS << " [[clang::convergent]]";
2528
0
    break;
2529
0
  }
2530
0
  case 2 : {
2531
0
    OS << " [[clang::convergent]]";
2532
0
    break;
2533
0
  }
2534
0
}
2535
0
}
2536
2537
0
const char *ConvergentAttr::getSpelling() const {
2538
0
  switch (SpellingListIndex) {
2539
0
  default:
2540
0
    llvm_unreachable("Unknown attribute spelling!");
2541
0
    return "(No spelling)";
2542
0
  case 0:
2543
0
    return "convergent";
2544
0
  case 1:
2545
0
    return "convergent";
2546
0
  case 2:
2547
0
    return "convergent";
2548
0
  }
2549
0
}
2550
2551
2.56k
DLLExportAttr *DLLExportAttr::clone(ASTContext &C) const {
2552
2.56k
  auto *A = new (C) DLLExportAttr(getLocation(), C, getSpellingListIndex());
2553
2.56k
  A->Inherited = Inherited;
2554
2.56k
  A->IsPackExpansion = IsPackExpansion;
2555
2.56k
  A->Implicit = Implicit;
2556
2.56k
  return A;
2557
2.56k
}
2558
2559
0
void DLLExportAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
2560
0
  switch (SpellingListIndex) {
2561
0
  default:
2562
0
    llvm_unreachable("Unknown attribute spelling!");
2563
0
    break;
2564
0
  case 0 : {
2565
0
    OS << " __declspec(dllexport)";
2566
0
    break;
2567
0
  }
2568
0
  case 1 : {
2569
0
    OS << " __attribute__((dllexport))";
2570
0
    break;
2571
0
  }
2572
0
  case 2 : {
2573
0
    OS << " [[gnu::dllexport]]";
2574
0
    break;
2575
0
  }
2576
0
}
2577
0
}
2578
2579
365
const char *DLLExportAttr::getSpelling() const {
2580
365
  switch (SpellingListIndex) {
2581
365
  default:
2582
0
    llvm_unreachable("Unknown attribute spelling!");
2583
365
    
return "(No spelling)"0
;
2584
365
  case 0:
2585
365
    return "dllexport";
2586
365
  case 1:
2587
0
    return "dllexport";
2588
365
  case 2:
2589
0
    return "dllexport";
2590
365
  }
2591
365
}
2592
2593
2.26k
DLLImportAttr *DLLImportAttr::clone(ASTContext &C) const {
2594
2.26k
  auto *A = new (C) DLLImportAttr(getLocation(), C, getSpellingListIndex());
2595
2.26k
  A->Inherited = Inherited;
2596
2.26k
  A->IsPackExpansion = IsPackExpansion;
2597
2.26k
  A->Implicit = Implicit;
2598
2.26k
  return A;
2599
2.26k
}
2600
2601
0
void DLLImportAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
2602
0
  switch (SpellingListIndex) {
2603
0
  default:
2604
0
    llvm_unreachable("Unknown attribute spelling!");
2605
0
    break;
2606
0
  case 0 : {
2607
0
    OS << " __declspec(dllimport)";
2608
0
    break;
2609
0
  }
2610
0
  case 1 : {
2611
0
    OS << " __attribute__((dllimport))";
2612
0
    break;
2613
0
  }
2614
0
  case 2 : {
2615
0
    OS << " [[gnu::dllimport]]";
2616
0
    break;
2617
0
  }
2618
0
}
2619
0
}
2620
2621
830
const char *DLLImportAttr::getSpelling() const {
2622
830
  switch (SpellingListIndex) {
2623
830
  default:
2624
0
    llvm_unreachable("Unknown attribute spelling!");
2625
830
    
return "(No spelling)"0
;
2626
830
  case 0:
2627
707
    return "dllimport";
2628
830
  case 1:
2629
123
    return "dllimport";
2630
830
  case 2:
2631
0
    return "dllimport";
2632
830
  }
2633
830
}
2634
2635
111
DeprecatedAttr *DeprecatedAttr::clone(ASTContext &C) const {
2636
111
  auto *A = new (C) DeprecatedAttr(getLocation(), C, getMessage(), getReplacement(), getSpellingListIndex());
2637
111
  A->Inherited = Inherited;
2638
111
  A->IsPackExpansion = IsPackExpansion;
2639
111
  A->Implicit = Implicit;
2640
111
  return A;
2641
111
}
2642
2643
55
void DeprecatedAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
2644
55
  switch (SpellingListIndex) {
2645
55
  default:
2646
0
    llvm_unreachable("Unknown attribute spelling!");
2647
55
    
break0
;
2648
55
  case 0 : {
2649
52
    OS << " __attribute__((deprecated(\"" << getMessage() << "\"";
2650
52
    if (!getReplacement().empty()) 
OS << ", \"" << getReplacement() << "\""1
;
2651
52
    OS << ")))";
2652
52
    break;
2653
55
  }
2654
55
  case 1 : {
2655
1
    OS << " [[gnu::deprecated(\"" << getMessage() << "\"";
2656
1
    OS << ")]]";
2657
1
    break;
2658
55
  }
2659
55
  case 2 : {
2660
1
    OS << " __declspec(deprecated(\"" << getMessage() << "\"";
2661
1
    OS << "))";
2662
1
    break;
2663
55
  }
2664
55
  case 3 : {
2665
1
    OS << " [[deprecated(\"" << getMessage() << "\"";
2666
1
    OS << ")]]";
2667
1
    break;
2668
55
  }
2669
55
  case 4 : {
2670
0
    OS << " [[deprecated(\"" << getMessage() << "\"";
2671
0
    OS << ")]]";
2672
0
    break;
2673
55
  }
2674
55
}
2675
55
}
2676
2677
0
const char *DeprecatedAttr::getSpelling() const {
2678
0
  switch (SpellingListIndex) {
2679
0
  default:
2680
0
    llvm_unreachable("Unknown attribute spelling!");
2681
0
    return "(No spelling)";
2682
0
  case 0:
2683
0
    return "deprecated";
2684
0
  case 1:
2685
0
    return "deprecated";
2686
0
  case 2:
2687
0
    return "deprecated";
2688
0
  case 3:
2689
0
    return "deprecated";
2690
0
  case 4:
2691
0
    return "deprecated";
2692
0
  }
2693
0
}
2694
2695
12
DestructorAttr *DestructorAttr::clone(ASTContext &C) const {
2696
12
  auto *A = new (C) DestructorAttr(getLocation(), C, priority, getSpellingListIndex());
2697
12
  A->Inherited = Inherited;
2698
12
  A->IsPackExpansion = IsPackExpansion;
2699
12
  A->Implicit = Implicit;
2700
12
  return A;
2701
12
}
2702
2703
0
void DestructorAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
2704
0
  switch (SpellingListIndex) {
2705
0
  default:
2706
0
    llvm_unreachable("Unknown attribute spelling!");
2707
0
    break;
2708
0
  case 0 : {
2709
0
    OS << " __attribute__((destructor(" << getPriority() << ")))";
2710
0
    break;
2711
0
  }
2712
0
  case 1 : {
2713
0
    OS << " [[gnu::destructor(" << getPriority() << ")]]";
2714
0
    break;
2715
0
  }
2716
0
}
2717
0
}
2718
2719
0
const char *DestructorAttr::getSpelling() const {
2720
0
  switch (SpellingListIndex) {
2721
0
  default:
2722
0
    llvm_unreachable("Unknown attribute spelling!");
2723
0
    return "(No spelling)";
2724
0
  case 0:
2725
0
    return "destructor";
2726
0
  case 1:
2727
0
    return "destructor";
2728
0
  }
2729
0
}
2730
2731
4
DiagnoseIfAttr *DiagnoseIfAttr::clone(ASTContext &C) const {
2732
4
  auto *A = new (C) DiagnoseIfAttr(getLocation(), C, cond, getMessage(), diagnosticType, argDependent, parent, getSpellingListIndex());
2733
4
  A->Inherited = Inherited;
2734
4
  A->IsPackExpansion = IsPackExpansion;
2735
4
  A->Implicit = Implicit;
2736
4
  return A;
2737
4
}
2738
2739
0
void DiagnoseIfAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
2740
0
  switch (SpellingListIndex) {
2741
0
  default:
2742
0
    llvm_unreachable("Unknown attribute spelling!");
2743
0
    break;
2744
0
  case 0 : {
2745
0
    OS << " __attribute__((diagnose_if(" << getCond() << ", \"" << getMessage() << "\", \"" << DiagnoseIfAttr::ConvertDiagnosticTypeToStr(getDiagnosticType()) << "\")))";
2746
0
    break;
2747
0
  }
2748
0
}
2749
0
}
2750
2751
0
const char *DiagnoseIfAttr::getSpelling() const {
2752
0
  switch (SpellingListIndex) {
2753
0
  default:
2754
0
    llvm_unreachable("Unknown attribute spelling!");
2755
0
    return "(No spelling)";
2756
0
  case 0:
2757
0
    return "diagnose_if";
2758
0
  }
2759
0
}
2760
2761
0
DisableTailCallsAttr *DisableTailCallsAttr::clone(ASTContext &C) const {
2762
0
  auto *A = new (C) DisableTailCallsAttr(getLocation(), C, getSpellingListIndex());
2763
0
  A->Inherited = Inherited;
2764
0
  A->IsPackExpansion = IsPackExpansion;
2765
0
  A->Implicit = Implicit;
2766
0
  return A;
2767
0
}
2768
2769
0
void DisableTailCallsAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
2770
0
  switch (SpellingListIndex) {
2771
0
  default:
2772
0
    llvm_unreachable("Unknown attribute spelling!");
2773
0
    break;
2774
0
  case 0 : {
2775
0
    OS << " __attribute__((disable_tail_calls))";
2776
0
    break;
2777
0
  }
2778
0
  case 1 : {
2779
0
    OS << " [[clang::disable_tail_calls]]";
2780
0
    break;
2781
0
  }
2782
0
  case 2 : {
2783
0
    OS << " [[clang::disable_tail_calls]]";
2784
0
    break;
2785
0
  }
2786
0
}
2787
0
}
2788
2789
1
const char *DisableTailCallsAttr::getSpelling() const {
2790
1
  switch (SpellingListIndex) {
2791
1
  default:
2792
0
    llvm_unreachable("Unknown attribute spelling!");
2793
1
    
return "(No spelling)"0
;
2794
1
  case 0:
2795
1
    return "disable_tail_calls";
2796
1
  case 1:
2797
0
    return "disable_tail_calls";
2798
1
  case 2:
2799
0
    return "disable_tail_calls";
2800
1
  }
2801
1
}
2802
2803
0
EmptyBasesAttr *EmptyBasesAttr::clone(ASTContext &C) const {
2804
0
  auto *A = new (C) EmptyBasesAttr(getLocation(), C, getSpellingListIndex());
2805
0
  A->Inherited = Inherited;
2806
0
  A->IsPackExpansion = IsPackExpansion;
2807
0
  A->Implicit = Implicit;
2808
0
  return A;
2809
0
}
2810
2811
0
void EmptyBasesAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
2812
0
  switch (SpellingListIndex) {
2813
0
  default:
2814
0
    llvm_unreachable("Unknown attribute spelling!");
2815
0
    break;
2816
0
  case 0 : {
2817
0
    OS << " __declspec(empty_bases)";
2818
0
    break;
2819
0
  }
2820
0
}
2821
0
}
2822
2823
0
const char *EmptyBasesAttr::getSpelling() const {
2824
0
  switch (SpellingListIndex) {
2825
0
  default:
2826
0
    llvm_unreachable("Unknown attribute spelling!");
2827
0
    return "(No spelling)";
2828
0
  case 0:
2829
0
    return "empty_bases";
2830
0
  }
2831
0
}
2832
2833
0
EnableIfAttr *EnableIfAttr::clone(ASTContext &C) const {
2834
0
  auto *A = new (C) EnableIfAttr(getLocation(), C, cond, getMessage(), getSpellingListIndex());
2835
0
  A->Inherited = Inherited;
2836
0
  A->IsPackExpansion = IsPackExpansion;
2837
0
  A->Implicit = Implicit;
2838
0
  return A;
2839
0
}
2840
2841
0
void EnableIfAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
2842
0
  switch (SpellingListIndex) {
2843
0
  default:
2844
0
    llvm_unreachable("Unknown attribute spelling!");
2845
0
    break;
2846
0
  case 0 : {
2847
0
    OS << " __attribute__((enable_if(" << getCond() << ", \"" << getMessage() << "\")))";
2848
0
    break;
2849
0
  }
2850
0
}
2851
0
}
2852
2853
0
const char *EnableIfAttr::getSpelling() const {
2854
0
  switch (SpellingListIndex) {
2855
0
  default:
2856
0
    llvm_unreachable("Unknown attribute spelling!");
2857
0
    return "(No spelling)";
2858
0
  case 0:
2859
0
    return "enable_if";
2860
0
  }
2861
0
}
2862
2863
2.24k
EnumExtensibilityAttr *EnumExtensibilityAttr::clone(ASTContext &C) const {
2864
2.24k
  auto *A = new (C) EnumExtensibilityAttr(getLocation(), C, extensibility, getSpellingListIndex());
2865
2.24k
  A->Inherited = Inherited;
2866
2.24k
  A->IsPackExpansion = IsPackExpansion;
2867
2.24k
  A->Implicit = Implicit;
2868
2.24k
  return A;
2869
2.24k
}
2870
2871
0
void EnumExtensibilityAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
2872
0
  switch (SpellingListIndex) {
2873
0
  default:
2874
0
    llvm_unreachable("Unknown attribute spelling!");
2875
0
    break;
2876
0
  case 0 : {
2877
0
    OS << " __attribute__((enum_extensibility(\"" << EnumExtensibilityAttr::ConvertKindToStr(getExtensibility()) << "\")))";
2878
0
    break;
2879
0
  }
2880
0
  case 1 : {
2881
0
    OS << " [[clang::enum_extensibility(\"" << EnumExtensibilityAttr::ConvertKindToStr(getExtensibility()) << "\")]]";
2882
0
    break;
2883
0
  }
2884
0
  case 2 : {
2885
0
    OS << " [[clang::enum_extensibility(\"" << EnumExtensibilityAttr::ConvertKindToStr(getExtensibility()) << "\")]]";
2886
0
    break;
2887
0
  }
2888
0
}
2889
0
}
2890
2891
0
const char *EnumExtensibilityAttr::getSpelling() const {
2892
0
  switch (SpellingListIndex) {
2893
0
  default:
2894
0
    llvm_unreachable("Unknown attribute spelling!");
2895
0
    return "(No spelling)";
2896
0
  case 0:
2897
0
    return "enum_extensibility";
2898
0
  case 1:
2899
0
    return "enum_extensibility";
2900
0
  case 2:
2901
0
    return "enum_extensibility";
2902
0
  }
2903
0
}
2904
2905
9
ExclusiveTrylockFunctionAttr *ExclusiveTrylockFunctionAttr::clone(ASTContext &C) const {
2906
9
  auto *A = new (C) ExclusiveTrylockFunctionAttr(getLocation(), C, successValue, args_, args_Size, getSpellingListIndex());
2907
9
  A->Inherited = Inherited;
2908
9
  A->IsPackExpansion = IsPackExpansion;
2909
9
  A->Implicit = Implicit;
2910
9
  return A;
2911
9
}
2912
2913
0
void ExclusiveTrylockFunctionAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
2914
0
  switch (SpellingListIndex) {
2915
0
  default:
2916
0
    llvm_unreachable("Unknown attribute spelling!");
2917
0
    break;
2918
0
  case 0 : {
2919
0
    OS << " __attribute__((exclusive_trylock_function(" << getSuccessValue() << ", ";
2920
0
  bool isFirst = true;
2921
0
  for (const auto &Val : args()) {
2922
0
    if (isFirst) isFirst = false;
2923
0
    else OS << ", ";
2924
0
    OS << Val;
2925
0
  }
2926
0
  OS << ")))";
2927
0
    break;
2928
0
  }
2929
0
}
2930
0
}
2931
2932
0
const char *ExclusiveTrylockFunctionAttr::getSpelling() const {
2933
0
  switch (SpellingListIndex) {
2934
0
  default:
2935
0
    llvm_unreachable("Unknown attribute spelling!");
2936
0
    return "(No spelling)";
2937
0
  case 0:
2938
0
    return "exclusive_trylock_function";
2939
0
  }
2940
0
}
2941
2942
0
ExternalSourceSymbolAttr *ExternalSourceSymbolAttr::clone(ASTContext &C) const {
2943
0
  auto *A = new (C) ExternalSourceSymbolAttr(getLocation(), C, getLanguage(), getDefinedIn(), generatedDeclaration, getSpellingListIndex());
2944
0
  A->Inherited = Inherited;
2945
0
  A->IsPackExpansion = IsPackExpansion;
2946
0
  A->Implicit = Implicit;
2947
0
  return A;
2948
0
}
2949
2950
0
void ExternalSourceSymbolAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
2951
0
  switch (SpellingListIndex) {
2952
0
  default:
2953
0
    llvm_unreachable("Unknown attribute spelling!");
2954
0
    break;
2955
0
  case 0 : {
2956
0
    OS << " __attribute__((external_source_symbol(\"" << getLanguage() << "\", \"" << getDefinedIn() << "\", " << getGeneratedDeclaration() << ")))";
2957
0
    break;
2958
0
  }
2959
0
  case 1 : {
2960
0
    OS << " [[clang::external_source_symbol(\"" << getLanguage() << "\", \"" << getDefinedIn() << "\", " << getGeneratedDeclaration() << ")]]";
2961
0
    break;
2962
0
  }
2963
0
  case 2 : {
2964
0
    OS << " [[clang::external_source_symbol(\"" << getLanguage() << "\", \"" << getDefinedIn() << "\", " << getGeneratedDeclaration() << ")]]";
2965
0
    break;
2966
0
  }
2967
0
}
2968
0
}
2969
2970
0
const char *ExternalSourceSymbolAttr::getSpelling() const {
2971
0
  switch (SpellingListIndex) {
2972
0
  default:
2973
0
    llvm_unreachable("Unknown attribute spelling!");
2974
0
    return "(No spelling)";
2975
0
  case 0:
2976
0
    return "external_source_symbol";
2977
0
  case 1:
2978
0
    return "external_source_symbol";
2979
0
  case 2:
2980
0
    return "external_source_symbol";
2981
0
  }
2982
0
}
2983
2984
0
FallThroughAttr *FallThroughAttr::clone(ASTContext &C) const {
2985
0
  auto *A = new (C) FallThroughAttr(getLocation(), C, getSpellingListIndex());
2986
0
  A->Inherited = Inherited;
2987
0
  A->IsPackExpansion = IsPackExpansion;
2988
0
  A->Implicit = Implicit;
2989
0
  return A;
2990
0
}
2991
2992
3
void FallThroughAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
2993
3
  switch (SpellingListIndex) {
2994
3
  default:
2995
0
    llvm_unreachable("Unknown attribute spelling!");
2996
3
    
break0
;
2997
3
  case 0 : {
2998
0
    OS << " [[fallthrough]]";
2999
0
    break;
3000
3
  }
3001
3
  case 1 : {
3002
0
    OS << " [[fallthrough]]";
3003
0
    break;
3004
3
  }
3005
3
  case 2 : {
3006
3
    OS << " [[clang::fallthrough]]";
3007
3
    break;
3008
3
  }
3009
3
}
3010
3
}
3011
3012
6
const char *FallThroughAttr::getSpelling() const {
3013
6
  switch (SpellingListIndex) {
3014
6
  default:
3015
0
    llvm_unreachable("Unknown attribute spelling!");
3016
6
    
return "(No spelling)"0
;
3017
6
  case 0:
3018
1
    return "fallthrough";
3019
6
  case 1:
3020
1
    return "fallthrough";
3021
6
  case 2:
3022
4
    return "fallthrough";
3023
6
  }
3024
6
}
3025
3026
0
FastCallAttr *FastCallAttr::clone(ASTContext &C) const {
3027
0
  auto *A = new (C) FastCallAttr(getLocation(), C, getSpellingListIndex());
3028
0
  A->Inherited = Inherited;
3029
0
  A->IsPackExpansion = IsPackExpansion;
3030
0
  A->Implicit = Implicit;
3031
0
  return A;
3032
0
}
3033
3034
0
void FastCallAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
3035
0
  switch (SpellingListIndex) {
3036
0
  default:
3037
0
    llvm_unreachable("Unknown attribute spelling!");
3038
0
    break;
3039
0
  case 0 : {
3040
0
    OS << " __attribute__((fastcall))";
3041
0
    break;
3042
0
  }
3043
0
  case 1 : {
3044
0
    OS << " [[gnu::fastcall]]";
3045
0
    break;
3046
0
  }
3047
0
  case 2 : {
3048
0
    OS << " __fastcall";
3049
0
    break;
3050
0
  }
3051
0
  case 3 : {
3052
0
    OS << " _fastcall";
3053
0
    break;
3054
0
  }
3055
0
}
3056
0
}
3057
3058
0
const char *FastCallAttr::getSpelling() const {
3059
0
  switch (SpellingListIndex) {
3060
0
  default:
3061
0
    llvm_unreachable("Unknown attribute spelling!");
3062
0
    return "(No spelling)";
3063
0
  case 0:
3064
0
    return "fastcall";
3065
0
  case 1:
3066
0
    return "fastcall";
3067
0
  case 2:
3068
0
    return "__fastcall";
3069
0
  case 3:
3070
0
    return "_fastcall";
3071
0
  }
3072
0
}
3073
3074
3.35k
FinalAttr *FinalAttr::clone(ASTContext &C) const {
3075
3.35k
  auto *A = new (C) FinalAttr(getLocation(), C, getSpellingListIndex());
3076
3.35k
  A->Inherited = Inherited;
3077
3.35k
  A->IsPackExpansion = IsPackExpansion;
3078
3.35k
  A->Implicit = Implicit;
3079
3.35k
  return A;
3080
3.35k
}
3081
3082
0
void FinalAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
3083
0
  switch (SpellingListIndex) {
3084
0
  default:
3085
0
    llvm_unreachable("Unknown attribute spelling!");
3086
0
    break;
3087
0
  case 0 : {
3088
0
    OS << " final";
3089
0
    break;
3090
0
  }
3091
0
  case 1 : {
3092
0
    OS << " sealed";
3093
0
    break;
3094
0
  }
3095
0
}
3096
0
}
3097
3098
0
const char *FinalAttr::getSpelling() const {
3099
0
  switch (SpellingListIndex) {
3100
0
  default:
3101
0
    llvm_unreachable("Unknown attribute spelling!");
3102
0
    return "(No spelling)";
3103
0
  case 0:
3104
0
    return "final";
3105
0
  case 1:
3106
0
    return "sealed";
3107
0
  }
3108
0
}
3109
3110
846
FlagEnumAttr *FlagEnumAttr::clone(ASTContext &C) const {
3111
846
  auto *A = new (C) FlagEnumAttr(getLocation(), C, getSpellingListIndex());
3112
846
  A->Inherited = Inherited;
3113
846
  A->IsPackExpansion = IsPackExpansion;
3114
846
  A->Implicit = Implicit;
3115
846
  return A;
3116
846
}
3117
3118
0
void FlagEnumAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
3119
0
  switch (SpellingListIndex) {
3120
0
  default:
3121
0
    llvm_unreachable("Unknown attribute spelling!");
3122
0
    break;
3123
0
  case 0 : {
3124
0
    OS << " __attribute__((flag_enum))";
3125
0
    break;
3126
0
  }
3127
0
  case 1 : {
3128
0
    OS << " [[clang::flag_enum]]";
3129
0
    break;
3130
0
  }
3131
0
  case 2 : {
3132
0
    OS << " [[clang::flag_enum]]";
3133
0
    break;
3134
0
  }
3135
0
}
3136
0
}
3137
3138
0
const char *FlagEnumAttr::getSpelling() const {
3139
0
  switch (SpellingListIndex) {
3140
0
  default:
3141
0
    llvm_unreachable("Unknown attribute spelling!");
3142
0
    return "(No spelling)";
3143
0
  case 0:
3144
0
    return "flag_enum";
3145
0
  case 1:
3146
0
    return "flag_enum";
3147
0
  case 2:
3148
0
    return "flag_enum";
3149
0
  }
3150
0
}
3151
3152
0
FlattenAttr *FlattenAttr::clone(ASTContext &C) const {
3153
0
  auto *A = new (C) FlattenAttr(getLocation(), C, getSpellingListIndex());
3154
0
  A->Inherited = Inherited;
3155
0
  A->IsPackExpansion = IsPackExpansion;
3156
0
  A->Implicit = Implicit;
3157
0
  return A;
3158
0
}
3159
3160
0
void FlattenAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
3161
0
  switch (SpellingListIndex) {
3162
0
  default:
3163
0
    llvm_unreachable("Unknown attribute spelling!");
3164
0
    break;
3165
0
  case 0 : {
3166
0
    OS << " __attribute__((flatten))";
3167
0
    break;
3168
0
  }
3169
0
  case 1 : {
3170
0
    OS << " [[gnu::flatten]]";
3171
0
    break;
3172
0
  }
3173
0
}
3174
0
}
3175
3176
0
const char *FlattenAttr::getSpelling() const {
3177
0
  switch (SpellingListIndex) {
3178
0
  default:
3179
0
    llvm_unreachable("Unknown attribute spelling!");
3180
0
    return "(No spelling)";
3181
0
  case 0:
3182
0
    return "flatten";
3183
0
  case 1:
3184
0
    return "flatten";
3185
0
  }
3186
0
}
3187
3188
3
FormatAttr *FormatAttr::clone(ASTContext &C) const {
3189
3
  auto *A = new (C) FormatAttr(getLocation(), C, type, formatIdx, firstArg, getSpellingListIndex());
3190
3
  A->Inherited = Inherited;
3191
3
  A->IsPackExpansion = IsPackExpansion;
3192
3
  A->Implicit = Implicit;
3193
3
  return A;
3194
3
}
3195
3196
5
void FormatAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
3197
5
  switch (SpellingListIndex) {
3198
5
  default:
3199
0
    llvm_unreachable("Unknown attribute spelling!");
3200
5
    
break0
;
3201
5
  case 0 : {
3202
5
    OS << " __attribute__((format(" << (getType() ? getType()->getName() : 
""0
) << ", " << getFormatIdx() << ", " << getFirstArg() << ")))";
3203
5
    break;
3204
5
  }
3205
5
  case 1 : {
3206
0
    OS << " [[gnu::format(" << (getType() ? getType()->getName() : "") << ", " << getFormatIdx() << ", " << getFirstArg() << ")]]";
3207
0
    break;
3208
5
  }
3209
5
}
3210
5
}
3211
3212
0
const char *FormatAttr::getSpelling() const {
3213
0
  switch (SpellingListIndex) {
3214
0
  default:
3215
0
    llvm_unreachable("Unknown attribute spelling!");
3216
0
    return "(No spelling)";
3217
0
  case 0:
3218
0
    return "format";
3219
0
  case 1:
3220
0
    return "format";
3221
0
  }
3222
0
}
3223
3224
0
FormatArgAttr *FormatArgAttr::clone(ASTContext &C) const {
3225
0
  auto *A = new (C) FormatArgAttr(getLocation(), C, formatIdx, getSpellingListIndex());
3226
0
  A->Inherited = Inherited;
3227
0
  A->IsPackExpansion = IsPackExpansion;
3228
0
  A->Implicit = Implicit;
3229
0
  return A;
3230
0
}
3231
3232
4
void FormatArgAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
3233
4
  switch (SpellingListIndex) {
3234
4
  default:
3235
0
    llvm_unreachable("Unknown attribute spelling!");
3236
4
    
break0
;
3237
4
  case 0 : {
3238
4
    OS << " __attribute__((format_arg(" << getFormatIdx().getSourceIndex() << ")))";
3239
4
    break;
3240
4
  }
3241
4
  case 1 : {
3242
0
    OS << " [[gnu::format_arg(" << getFormatIdx().getSourceIndex() << ")]]";
3243
0
    break;
3244
4
  }
3245
4
}
3246
4
}
3247
3248
0
const char *FormatArgAttr::getSpelling() const {
3249
0
  switch (SpellingListIndex) {
3250
0
  default:
3251
0
    llvm_unreachable("Unknown attribute spelling!");
3252
0
    return "(No spelling)";
3253
0
  case 0:
3254
0
    return "format_arg";
3255
0
  case 1:
3256
0
    return "format_arg";
3257
0
  }
3258
0
}
3259
3260
3
GNUInlineAttr *GNUInlineAttr::clone(ASTContext &C) const {
3261
3
  auto *A = new (C) GNUInlineAttr(getLocation(), C, getSpellingListIndex());
3262
3
  A->Inherited = Inherited;
3263
3
  A->IsPackExpansion = IsPackExpansion;
3264
3
  A->Implicit = Implicit;
3265
3
  return A;
3266
3
}
3267
3268
2
void GNUInlineAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
3269
2
  switch (SpellingListIndex) {
3270
2
  default:
3271
0
    llvm_unreachable("Unknown attribute spelling!");
3272
2
    
break0
;
3273
2
  case 0 : {
3274
1
    OS << " __attribute__((gnu_inline))";
3275
1
    break;
3276
2
  }
3277
2
  case 1 : {
3278
1
    OS << " [[gnu::gnu_inline]]";
3279
1
    break;
3280
2
  }
3281
2
}
3282
2
}
3283
3284
0
const char *GNUInlineAttr::getSpelling() const {
3285
0
  switch (SpellingListIndex) {
3286
0
  default:
3287
0
    llvm_unreachable("Unknown attribute spelling!");
3288
0
    return "(No spelling)";
3289
0
  case 0:
3290
0
    return "gnu_inline";
3291
0
  case 1:
3292
0
    return "gnu_inline";
3293
0
  }
3294
0
}
3295
3296
0
GuardedByAttr *GuardedByAttr::clone(ASTContext &C) const {
3297
0
  auto *A = new (C) GuardedByAttr(getLocation(), C, arg, getSpellingListIndex());
3298
0
  A->Inherited = Inherited;
3299
0
  A->IsPackExpansion = IsPackExpansion;
3300
0
  A->Implicit = Implicit;
3301
0
  return A;
3302
0
}
3303
3304
0
void GuardedByAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
3305
0
  switch (SpellingListIndex) {
3306
0
  default:
3307
0
    llvm_unreachable("Unknown attribute spelling!");
3308
0
    break;
3309
0
  case 0 : {
3310
0
    OS << " __attribute__((guarded_by(" << getArg() << ")))";
3311
0
    break;
3312
0
  }
3313
0
}
3314
0
}
3315
3316
0
const char *GuardedByAttr::getSpelling() const {
3317
0
  switch (SpellingListIndex) {
3318
0
  default:
3319
0
    llvm_unreachable("Unknown attribute spelling!");
3320
0
    return "(No spelling)";
3321
0
  case 0:
3322
0
    return "guarded_by";
3323
0
  }
3324
0
}
3325
3326
0
GuardedVarAttr *GuardedVarAttr::clone(ASTContext &C) const {
3327
0
  auto *A = new (C) GuardedVarAttr(getLocation(), C, getSpellingListIndex());
3328
0
  A->Inherited = Inherited;
3329
0
  A->IsPackExpansion = IsPackExpansion;
3330
0
  A->Implicit = Implicit;
3331
0
  return A;
3332
0
}
3333
3334
0
void GuardedVarAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
3335
0
  switch (SpellingListIndex) {
3336
0
  default:
3337
0
    llvm_unreachable("Unknown attribute spelling!");
3338
0
    break;
3339
0
  case 0 : {
3340
0
    OS << " __attribute__((guarded_var))";
3341
0
    break;
3342
0
  }
3343
0
  case 1 : {
3344
0
    OS << " [[clang::guarded_var]]";
3345
0
    break;
3346
0
  }
3347
0
}
3348
0
}
3349
3350
0
const char *GuardedVarAttr::getSpelling() const {
3351
0
  switch (SpellingListIndex) {
3352
0
  default:
3353
0
    llvm_unreachable("Unknown attribute spelling!");
3354
0
    return "(No spelling)";
3355
0
  case 0:
3356
0
    return "guarded_var";
3357
0
  case 1:
3358
0
    return "guarded_var";
3359
0
  }
3360
0
}
3361
3362
0
HotAttr *HotAttr::clone(ASTContext &C) const {
3363
0
  auto *A = new (C) HotAttr(getLocation(), C, getSpellingListIndex());
3364
0
  A->Inherited = Inherited;
3365
0
  A->IsPackExpansion = IsPackExpansion;
3366
0
  A->Implicit = Implicit;
3367
0
  return A;
3368
0
}
3369
3370
0
void HotAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
3371
0
  switch (SpellingListIndex) {
3372
0
  default:
3373
0
    llvm_unreachable("Unknown attribute spelling!");
3374
0
    break;
3375
0
  case 0 : {
3376
0
    OS << " __attribute__((hot))";
3377
0
    break;
3378
0
  }
3379
0
  case 1 : {
3380
0
    OS << " [[gnu::hot]]";
3381
0
    break;
3382
0
  }
3383
0
}
3384
0
}
3385
3386
1
const char *HotAttr::getSpelling() const {
3387
1
  switch (SpellingListIndex) {
3388
1
  default:
3389
0
    llvm_unreachable("Unknown attribute spelling!");
3390
1
    
return "(No spelling)"0
;
3391
1
  case 0:
3392
1
    return "hot";
3393
1
  case 1:
3394
0
    return "hot";
3395
1
  }
3396
1
}
3397
3398
0
IBActionAttr *IBActionAttr::clone(ASTContext &C) const {
3399
0
  auto *A = new (C) IBActionAttr(getLocation(), C, getSpellingListIndex());
3400
0
  A->Inherited = Inherited;
3401
0
  A->IsPackExpansion = IsPackExpansion;
3402
0
  A->Implicit = Implicit;
3403
0
  return A;
3404
0
}
3405
3406
0
void IBActionAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
3407
0
  switch (SpellingListIndex) {
3408
0
  default:
3409
0
    llvm_unreachable("Unknown attribute spelling!");
3410
0
    break;
3411
0
  case 0 : {
3412
0
    OS << " __attribute__((ibaction))";
3413
0
    break;
3414
0
  }
3415
0
  case 1 : {
3416
0
    OS << " [[clang::ibaction]]";
3417
0
    break;
3418
0
  }
3419
0
  case 2 : {
3420
0
    OS << " [[clang::ibaction]]";
3421
0
    break;
3422
0
  }
3423
0
}
3424
0
}
3425
3426
0
const char *IBActionAttr::getSpelling() const {
3427
0
  switch (SpellingListIndex) {
3428
0
  default:
3429
0
    llvm_unreachable("Unknown attribute spelling!");
3430
0
    return "(No spelling)";
3431
0
  case 0:
3432
0
    return "ibaction";
3433
0
  case 1:
3434
0
    return "ibaction";
3435
0
  case 2:
3436
0
    return "ibaction";
3437
0
  }
3438
0
}
3439
3440
0
IBOutletAttr *IBOutletAttr::clone(ASTContext &C) const {
3441
0
  auto *A = new (C) IBOutletAttr(getLocation(), C, getSpellingListIndex());
3442
0
  A->Inherited = Inherited;
3443
0
  A->IsPackExpansion = IsPackExpansion;
3444
0
  A->Implicit = Implicit;
3445
0
  return A;
3446
0
}
3447
3448
0
void IBOutletAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
3449
0
  switch (SpellingListIndex) {
3450
0
  default:
3451
0
    llvm_unreachable("Unknown attribute spelling!");
3452
0
    break;
3453
0
  case 0 : {
3454
0
    OS << " __attribute__((iboutlet))";
3455
0
    break;
3456
0
  }
3457
0
  case 1 : {
3458
0
    OS << " [[clang::iboutlet]]";
3459
0
    break;
3460
0
  }
3461
0
  case 2 : {
3462
0
    OS << " [[clang::iboutlet]]";
3463
0
    break;
3464
0
  }
3465
0
}
3466
0
}
3467
3468
0
const char *IBOutletAttr::getSpelling() const {
3469
0
  switch (SpellingListIndex) {
3470
0
  default:
3471
0
    llvm_unreachable("Unknown attribute spelling!");
3472
0
    return "(No spelling)";
3473
0
  case 0:
3474
0
    return "iboutlet";
3475
0
  case 1:
3476
0
    return "iboutlet";
3477
0
  case 2:
3478
0
    return "iboutlet";
3479
0
  }
3480
0
}
3481
3482
0
IBOutletCollectionAttr *IBOutletCollectionAttr::clone(ASTContext &C) const {
3483
0
  auto *A = new (C) IBOutletCollectionAttr(getLocation(), C, interface_, getSpellingListIndex());
3484
0
  A->Inherited = Inherited;
3485
0
  A->IsPackExpansion = IsPackExpansion;
3486
0
  A->Implicit = Implicit;
3487
0
  return A;
3488
0
}
3489
3490
0
void IBOutletCollectionAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
3491
0
  switch (SpellingListIndex) {
3492
0
  default:
3493
0
    llvm_unreachable("Unknown attribute spelling!");
3494
0
    break;
3495
0
  case 0 : {
3496
0
    OS << " __attribute__((iboutletcollection(" << getInterface().getAsString() << ")))";
3497
0
    break;
3498
0
  }
3499
0
  case 1 : {
3500
0
    OS << " [[clang::iboutletcollection(" << getInterface().getAsString() << ")]]";
3501
0
    break;
3502
0
  }
3503
0
  case 2 : {
3504
0
    OS << " [[clang::iboutletcollection(" << getInterface().getAsString() << ")]]";
3505
0
    break;
3506
0
  }
3507
0
}
3508
0
}
3509
3510
0
const char *IBOutletCollectionAttr::getSpelling() const {
3511
0
  switch (SpellingListIndex) {
3512
0
  default:
3513
0
    llvm_unreachable("Unknown attribute spelling!");
3514
0
    return "(No spelling)";
3515
0
  case 0:
3516
0
    return "iboutletcollection";
3517
0
  case 1:
3518
0
    return "iboutletcollection";
3519
0
  case 2:
3520
0
    return "iboutletcollection";
3521
0
  }
3522
0
}
3523
3524
0
IFuncAttr *IFuncAttr::clone(ASTContext &C) const {
3525
0
  auto *A = new (C) IFuncAttr(getLocation(), C, getResolver(), getSpellingListIndex());
3526
0
  A->Inherited = Inherited;
3527
0
  A->IsPackExpansion = IsPackExpansion;
3528
0
  A->Implicit = Implicit;
3529
0
  return A;
3530
0
}
3531
3532
0
void IFuncAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
3533
0
  switch (SpellingListIndex) {
3534
0
  default:
3535
0
    llvm_unreachable("Unknown attribute spelling!");
3536
0
    break;
3537
0
  case 0 : {
3538
0
    OS << " __attribute__((ifunc(\"" << getResolver() << "\")))";
3539
0
    break;
3540
0
  }
3541
0
  case 1 : {
3542
0
    OS << " [[gnu::ifunc(\"" << getResolver() << "\")]]";
3543
0
    break;
3544
0
  }
3545
0
}
3546
0
}
3547
3548
0
const char *IFuncAttr::getSpelling() const {
3549
0
  switch (SpellingListIndex) {
3550
0
  default:
3551
0
    llvm_unreachable("Unknown attribute spelling!");
3552
0
    return "(No spelling)";
3553
0
  case 0:
3554
0
    return "ifunc";
3555
0
  case 1:
3556
0
    return "ifunc";
3557
0
  }
3558
0
}
3559
3560
0
InitPriorityAttr *InitPriorityAttr::clone(ASTContext &C) const {
3561
0
  auto *A = new (C) InitPriorityAttr(getLocation(), C, priority, getSpellingListIndex());
3562
0
  A->Inherited = Inherited;
3563
0
  A->IsPackExpansion = IsPackExpansion;
3564
0
  A->Implicit = Implicit;
3565
0
  return A;
3566
0
}
3567
3568
0
void InitPriorityAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
3569
0
  switch (SpellingListIndex) {
3570
0
  default:
3571
0
    llvm_unreachable("Unknown attribute spelling!");
3572
0
    break;
3573
0
  case 0 : {
3574
0
    OS << " __attribute__((init_priority(" << getPriority() << ")))";
3575
0
    break;
3576
0
  }
3577
0
  case 1 : {
3578
0
    OS << " [[gnu::init_priority(" << getPriority() << ")]]";
3579
0
    break;
3580
0
  }
3581
0
}
3582
0
}
3583
3584
0
const char *InitPriorityAttr::getSpelling() const {
3585
0
  switch (SpellingListIndex) {
3586
0
  default:
3587
0
    llvm_unreachable("Unknown attribute spelling!");
3588
0
    return "(No spelling)";
3589
0
  case 0:
3590
0
    return "init_priority";
3591
0
  case 1:
3592
0
    return "init_priority";
3593
0
  }
3594
0
}
3595
3596
2
InitSegAttr *InitSegAttr::clone(ASTContext &C) const {
3597
2
  auto *A = new (C) InitSegAttr(getLocation(), C, getSection(), getSpellingListIndex());
3598
2
  A->Inherited = Inherited;
3599
2
  A->IsPackExpansion = IsPackExpansion;
3600
2
  A->Implicit = Implicit;
3601
2
  return A;
3602
2
}
3603
3604
1
void InitSegAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
3605
1
  switch (SpellingListIndex) {
3606
1
  default:
3607
0
    llvm_unreachable("Unknown attribute spelling!");
3608
1
    
break0
;
3609
1
  case 0 : {
3610
1
    OS << "#pragma init_seg";
3611
1
    printPrettyPragma(OS, Policy);
3612
1
    OS << "\n";    break;
3613
1
  }
3614
1
}
3615
1
}
3616
3617
0
const char *InitSegAttr::getSpelling() const {
3618
0
  switch (SpellingListIndex) {
3619
0
  default:
3620
0
    llvm_unreachable("Unknown attribute spelling!");
3621
0
    return "(No spelling)";
3622
0
  case 0:
3623
0
    return "init_seg";
3624
0
  }
3625
0
}
3626
3627
0
IntelOclBiccAttr *IntelOclBiccAttr::clone(ASTContext &C) const {
3628
0
  auto *A = new (C) IntelOclBiccAttr(getLocation(), C, getSpellingListIndex());
3629
0
  A->Inherited = Inherited;
3630
0
  A->IsPackExpansion = IsPackExpansion;
3631
0
  A->Implicit = Implicit;
3632
0
  return A;
3633
0
}
3634
3635
0
void IntelOclBiccAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
3636
0
  switch (SpellingListIndex) {
3637
0
  default:
3638
0
    llvm_unreachable("Unknown attribute spelling!");
3639
0
    break;
3640
0
  case 0 : {
3641
0
    OS << " __attribute__((intel_ocl_bicc))";
3642
0
    break;
3643
0
  }
3644
0
  case 1 : {
3645
0
    OS << " [[clang::intel_ocl_bicc]]";
3646
0
    break;
3647
0
  }
3648
0
}
3649
0
}
3650
3651
0
const char *IntelOclBiccAttr::getSpelling() const {
3652
0
  switch (SpellingListIndex) {
3653
0
  default:
3654
0
    llvm_unreachable("Unknown attribute spelling!");
3655
0
    return "(No spelling)";
3656
0
  case 0:
3657
0
    return "intel_ocl_bicc";
3658
0
  case 1:
3659
0
    return "intel_ocl_bicc";
3660
0
  }
3661
0
}
3662
3663
0
InternalLinkageAttr *InternalLinkageAttr::clone(ASTContext &C) const {
3664
0
  auto *A = new (C) InternalLinkageAttr(getLocation(), C, getSpellingListIndex());
3665
0
  A->Inherited = Inherited;
3666
0
  A->IsPackExpansion = IsPackExpansion;
3667
0
  A->Implicit = Implicit;
3668
0
  return A;
3669
0
}
3670
3671
0
void InternalLinkageAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
3672
0
  switch (SpellingListIndex) {
3673
0
  default:
3674
0
    llvm_unreachable("Unknown attribute spelling!");
3675
0
    break;
3676
0
  case 0 : {
3677
0
    OS << " __attribute__((internal_linkage))";
3678
0
    break;
3679
0
  }
3680
0
  case 1 : {
3681
0
    OS << " [[clang::internal_linkage]]";
3682
0
    break;
3683
0
  }
3684
0
  case 2 : {
3685
0
    OS << " [[clang::internal_linkage]]";
3686
0
    break;
3687
0
  }
3688
0
}
3689
0
}
3690
3691
10
const char *InternalLinkageAttr::getSpelling() const {
3692
10
  switch (SpellingListIndex) {
3693
10
  default:
3694
0
    llvm_unreachable("Unknown attribute spelling!");
3695
10
    
return "(No spelling)"0
;
3696
10
  case 0:
3697
9
    return "internal_linkage";
3698
10
  case 1:
3699
1
    return "internal_linkage";
3700
10
  case 2:
3701
0
    return "internal_linkage";
3702
10
  }
3703
10
}
3704
3705
0
LTOVisibilityPublicAttr *LTOVisibilityPublicAttr::clone(ASTContext &C) const {
3706
0
  auto *A = new (C) LTOVisibilityPublicAttr(getLocation(), C, getSpellingListIndex());
3707
0
  A->Inherited = Inherited;
3708
0
  A->IsPackExpansion = IsPackExpansion;
3709
0
  A->Implicit = Implicit;
3710
0
  return A;
3711
0
}
3712
3713
0
void LTOVisibilityPublicAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
3714
0
  switch (SpellingListIndex) {
3715
0
  default:
3716
0
    llvm_unreachable("Unknown attribute spelling!");
3717
0
    break;
3718
0
  case 0 : {
3719
0
    OS << " __attribute__((lto_visibility_public))";
3720
0
    break;
3721
0
  }
3722
0
  case 1 : {
3723
0
    OS << " [[clang::lto_visibility_public]]";
3724
0
    break;
3725
0
  }
3726
0
  case 2 : {
3727
0
    OS << " [[clang::lto_visibility_public]]";
3728
0
    break;
3729
0
  }
3730
0
}
3731
0
}
3732
3733
0
const char *LTOVisibilityPublicAttr::getSpelling() const {
3734
0
  switch (SpellingListIndex) {
3735
0
  default:
3736
0
    llvm_unreachable("Unknown attribute spelling!");
3737
0
    return "(No spelling)";
3738
0
  case 0:
3739
0
    return "lto_visibility_public";
3740
0
  case 1:
3741
0
    return "lto_visibility_public";
3742
0
  case 2:
3743
0
    return "lto_visibility_public";
3744
0
  }
3745
0
}
3746
3747
0
LayoutVersionAttr *LayoutVersionAttr::clone(ASTContext &C) const {
3748
0
  auto *A = new (C) LayoutVersionAttr(getLocation(), C, version, getSpellingListIndex());
3749
0
  A->Inherited = Inherited;
3750
0
  A->IsPackExpansion = IsPackExpansion;
3751
0
  A->Implicit = Implicit;
3752
0
  return A;
3753
0
}
3754
3755
0
void LayoutVersionAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
3756
0
  switch (SpellingListIndex) {
3757
0
  default:
3758
0
    llvm_unreachable("Unknown attribute spelling!");
3759
0
    break;
3760
0
  case 0 : {
3761
0
    OS << " __declspec(layout_version(" << getVersion() << "))";
3762
0
    break;
3763
0
  }
3764
0
}
3765
0
}
3766
3767
0
const char *LayoutVersionAttr::getSpelling() const {
3768
0
  switch (SpellingListIndex) {
3769
0
  default:
3770
0
    llvm_unreachable("Unknown attribute spelling!");
3771
0
    return "(No spelling)";
3772
0
  case 0:
3773
0
    return "layout_version";
3774
0
  }
3775
0
}
3776
3777
3
LockReturnedAttr *LockReturnedAttr::clone(ASTContext &C) const {
3778
3
  auto *A = new (C) LockReturnedAttr(getLocation(), C, arg, getSpellingListIndex());
3779
3
  A->Inherited = Inherited;
3780
3
  A->IsPackExpansion = IsPackExpansion;
3781
3
  A->Implicit = Implicit;
3782
3
  return A;
3783
3
}
3784
3785
0
void LockReturnedAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
3786
0
  switch (SpellingListIndex) {
3787
0
  default:
3788
0
    llvm_unreachable("Unknown attribute spelling!");
3789
0
    break;
3790
0
  case 0 : {
3791
0
    OS << " __attribute__((lock_returned(" << getArg() << ")))";
3792
0
    break;
3793
0
  }
3794
0
}
3795
0
}
3796
3797
0
const char *LockReturnedAttr::getSpelling() const {
3798
0
  switch (SpellingListIndex) {
3799
0
  default:
3800
0
    llvm_unreachable("Unknown attribute spelling!");
3801
0
    return "(No spelling)";
3802
0
  case 0:
3803
0
    return "lock_returned";
3804
0
  }
3805
0
}
3806
3807
19
LocksExcludedAttr *LocksExcludedAttr::clone(ASTContext &C) const {
3808
19
  auto *A = new (C) LocksExcludedAttr(getLocation(), C, args_, args_Size, getSpellingListIndex());
3809
19
  A->Inherited = Inherited;
3810
19
  A->IsPackExpansion = IsPackExpansion;
3811
19
  A->Implicit = Implicit;
3812
19
  return A;
3813
19
}
3814
3815
0
void LocksExcludedAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
3816
0
  switch (SpellingListIndex) {
3817
0
  default:
3818
0
    llvm_unreachable("Unknown attribute spelling!");
3819
0
    break;
3820
0
  case 0 : {
3821
0
    OS << " __attribute__((locks_excluded(";
3822
0
  bool isFirst = true;
3823
0
  for (const auto &Val : args()) {
3824
0
    if (isFirst) isFirst = false;
3825
0
    else OS << ", ";
3826
0
    OS << Val;
3827
0
  }
3828
0
  OS << ")))";
3829
0
    break;
3830
0
  }
3831
0
}
3832
0
}
3833
3834
0
const char *LocksExcludedAttr::getSpelling() const {
3835
0
  switch (SpellingListIndex) {
3836
0
  default:
3837
0
    llvm_unreachable("Unknown attribute spelling!");
3838
0
    return "(No spelling)";
3839
0
  case 0:
3840
0
    return "locks_excluded";
3841
0
  }
3842
0
}
3843
3844
2
LoopHintAttr *LoopHintAttr::clone(ASTContext &C) const {
3845
2
  auto *A = new (C) LoopHintAttr(getLocation(), C, option, state, value, getSpellingListIndex());
3846
2
  A->Inherited = Inherited;
3847
2
  A->IsPackExpansion = IsPackExpansion;
3848
2
  A->Implicit = Implicit;
3849
2
  return A;
3850
2
}
3851
3852
42
void LoopHintAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
3853
42
  switch (SpellingListIndex) {
3854
42
  default:
3855
0
    llvm_unreachable("Unknown attribute spelling!");
3856
42
    
break0
;
3857
42
  case 0 : {
3858
39
    OS << "#pragma clang loop";
3859
39
    printPrettyPragma(OS, Policy);
3860
39
    OS << "\n";    break;
3861
42
  }
3862
42
  case 1 : {
3863
2
    OS << "#pragma unroll";
3864
2
    printPrettyPragma(OS, Policy);
3865
2
    OS << "\n";    break;
3866
42
  }
3867
42
  case 2 : {
3868
1
    OS << "#pragma nounroll";
3869
1
    printPrettyPragma(OS, Policy);
3870
1
    OS << "\n";    break;
3871
42
  }
3872
42
}
3873
42
}
3874
3875
1
const char *LoopHintAttr::getSpelling() const {
3876
1
  switch (SpellingListIndex) {
3877
1
  default:
3878
0
    llvm_unreachable("Unknown attribute spelling!");
3879
1
    
return "(No spelling)"0
;
3880
1
  case 0:
3881
0
    return "loop";
3882
1
  case 1:
3883
1
    return "unroll";
3884
1
  case 2:
3885
0
    return "nounroll";
3886
1
  }
3887
1
}
3888
3889
0
MSABIAttr *MSABIAttr::clone(ASTContext &C) const {
3890
0
  auto *A = new (C) MSABIAttr(getLocation(), C, getSpellingListIndex());
3891
0
  A->Inherited = Inherited;
3892
0
  A->IsPackExpansion = IsPackExpansion;
3893
0
  A->Implicit = Implicit;
3894
0
  return A;
3895
0
}
3896
3897
0
void MSABIAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
3898
0
  switch (SpellingListIndex) {
3899
0
  default:
3900
0
    llvm_unreachable("Unknown attribute spelling!");
3901
0
    break;
3902
0
  case 0 : {
3903
0
    OS << " __attribute__((ms_abi))";
3904
0
    break;
3905
0
  }
3906
0
  case 1 : {
3907
0
    OS << " [[gnu::ms_abi]]";
3908
0
    break;
3909
0
  }
3910
0
}
3911
0
}
3912
3913
0
const char *MSABIAttr::getSpelling() const {
3914
0
  switch (SpellingListIndex) {
3915
0
  default:
3916
0
    llvm_unreachable("Unknown attribute spelling!");
3917
0
    return "(No spelling)";
3918
0
  case 0:
3919
0
    return "ms_abi";
3920
0
  case 1:
3921
0
    return "ms_abi";
3922
0
  }
3923
0
}
3924
3925
0
MSInheritanceAttr *MSInheritanceAttr::clone(ASTContext &C) const {
3926
0
  auto *A = new (C) MSInheritanceAttr(getLocation(), C, bestCase, getSpellingListIndex());
3927
0
  A->Inherited = Inherited;
3928
0
  A->IsPackExpansion = IsPackExpansion;
3929
0
  A->Implicit = Implicit;
3930
0
  return A;
3931
0
}
3932
3933
3
void MSInheritanceAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
3934
3
  switch (SpellingListIndex) {
3935
3
  default:
3936
0
    llvm_unreachable("Unknown attribute spelling!");
3937
3
    
break0
;
3938
3
  case 0 : {
3939
1
    OS << " __single_inheritance";
3940
1
    break;
3941
3
  }
3942
3
  case 1 : {
3943
1
    OS << " __multiple_inheritance";
3944
1
    break;
3945
3
  }
3946
3
  case 2 : {
3947
1
    OS << " __virtual_inheritance";
3948
1
    break;
3949
3
  }
3950
3
  case 3 : {
3951
0
    OS << " __unspecified_inheritance";
3952
0
    break;
3953
3
  }
3954
3
}
3955
3
}
3956
3957
0
const char *MSInheritanceAttr::getSpelling() const {
3958
0
  switch (SpellingListIndex) {
3959
0
  default:
3960
0
    llvm_unreachable("Unknown attribute spelling!");
3961
0
    return "(No spelling)";
3962
0
  case 0:
3963
0
    return "__single_inheritance";
3964
0
  case 1:
3965
0
    return "__multiple_inheritance";
3966
0
  case 2:
3967
0
    return "__virtual_inheritance";
3968
0
  case 3:
3969
0
    return "__unspecified_inheritance";
3970
0
  }
3971
0
}
3972
3973
0
MSNoVTableAttr *MSNoVTableAttr::clone(ASTContext &C) const {
3974
0
  auto *A = new (C) MSNoVTableAttr(getLocation(), C, getSpellingListIndex());
3975
0
  A->Inherited = Inherited;
3976
0
  A->IsPackExpansion = IsPackExpansion;
3977
0
  A->Implicit = Implicit;
3978
0
  return A;
3979
0
}
3980
3981
0
void MSNoVTableAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
3982
0
  switch (SpellingListIndex) {
3983
0
  default:
3984
0
    llvm_unreachable("Unknown attribute spelling!");
3985
0
    break;
3986
0
  case 0 : {
3987
0
    OS << " __declspec(novtable)";
3988
0
    break;
3989
0
  }
3990
0
}
3991
0
}
3992
3993
0
const char *MSNoVTableAttr::getSpelling() const {
3994
0
  switch (SpellingListIndex) {
3995
0
  default:
3996
0
    llvm_unreachable("Unknown attribute spelling!");
3997
0
    return "(No spelling)";
3998
0
  case 0:
3999
0
    return "novtable";
4000
0
  }
4001
0
}
4002
4003
0
MSP430InterruptAttr *MSP430InterruptAttr::clone(ASTContext &C) const {
4004
0
  auto *A = new (C) MSP430InterruptAttr(getLocation(), C, number, getSpellingListIndex());
4005
0
  A->Inherited = Inherited;
4006
0
  A->IsPackExpansion = IsPackExpansion;
4007
0
  A->Implicit = Implicit;
4008
0
  return A;
4009
0
}
4010
4011
0
void MSP430InterruptAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
4012
0
  switch (SpellingListIndex) {
4013
0
  default:
4014
0
    llvm_unreachable("Unknown attribute spelling!");
4015
0
    break;
4016
0
  case 0 : {
4017
0
    OS << " __attribute__((interrupt(" << getNumber() << ")))";
4018
0
    break;
4019
0
  }
4020
0
  case 1 : {
4021
0
    OS << " [[gnu::interrupt(" << getNumber() << ")]]";
4022
0
    break;
4023
0
  }
4024
0
}
4025
0
}
4026
4027
0
const char *MSP430InterruptAttr::getSpelling() const {
4028
0
  switch (SpellingListIndex) {
4029
0
  default:
4030
0
    llvm_unreachable("Unknown attribute spelling!");
4031
0
    return "(No spelling)";
4032
0
  case 0:
4033
0
    return "interrupt";
4034
0
  case 1:
4035
0
    return "interrupt";
4036
0
  }
4037
0
}
4038
4039
1
MSStructAttr *MSStructAttr::clone(ASTContext &C) const {
4040
1
  auto *A = new (C) MSStructAttr(getLocation(), C, getSpellingListIndex());
4041
1
  A->Inherited = Inherited;
4042
1
  A->IsPackExpansion = IsPackExpansion;
4043
1
  A->Implicit = Implicit;
4044
1
  return A;
4045
1
}
4046
4047
0
void MSStructAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
4048
0
  switch (SpellingListIndex) {
4049
0
  default:
4050
0
    llvm_unreachable("Unknown attribute spelling!");
4051
0
    break;
4052
0
  case 0 : {
4053
0
    OS << " __attribute__((ms_struct))";
4054
0
    break;
4055
0
  }
4056
0
  case 1 : {
4057
0
    OS << " [[gnu::ms_struct]]";
4058
0
    break;
4059
0
  }
4060
0
}
4061
0
}
4062
4063
0
const char *MSStructAttr::getSpelling() const {
4064
0
  switch (SpellingListIndex) {
4065
0
  default:
4066
0
    llvm_unreachable("Unknown attribute spelling!");
4067
0
    return "(No spelling)";
4068
0
  case 0:
4069
0
    return "ms_struct";
4070
0
  case 1:
4071
0
    return "ms_struct";
4072
0
  }
4073
0
}
4074
4075
2
MSVtorDispAttr *MSVtorDispAttr::clone(ASTContext &C) const {
4076
2
  auto *A = new (C) MSVtorDispAttr(getLocation(), C, vdm, getSpellingListIndex());
4077
2
  A->Inherited = Inherited;
4078
2
  A->IsPackExpansion = IsPackExpansion;
4079
2
  A->Implicit = Implicit;
4080
2
  return A;
4081
2
}
4082
4083
0
void MSVtorDispAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
4084
0
}
4085
4086
0
const char *MSVtorDispAttr::getSpelling() const {
4087
0
  return "(No spelling)";
4088
0
}
4089
4090
1
MaxFieldAlignmentAttr *MaxFieldAlignmentAttr::clone(ASTContext &C) const {
4091
1
  auto *A = new (C) MaxFieldAlignmentAttr(getLocation(), C, alignment, getSpellingListIndex());
4092
1
  A->Inherited = Inherited;
4093
1
  A->IsPackExpansion = IsPackExpansion;
4094
1
  A->Implicit = Implicit;
4095
1
  return A;
4096
1
}
4097
4098
0
void MaxFieldAlignmentAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
4099
0
}
4100
4101
0
const char *MaxFieldAlignmentAttr::getSpelling() const {
4102
0
  return "(No spelling)";
4103
0
}
4104
4105
14
MayAliasAttr *MayAliasAttr::clone(ASTContext &C) const {
4106
14
  auto *A = new (C) MayAliasAttr(getLocation(), C, getSpellingListIndex());
4107
14
  A->Inherited = Inherited;
4108
14
  A->IsPackExpansion = IsPackExpansion;
4109
14
  A->Implicit = Implicit;
4110
14
  return A;
4111
14
}
4112
4113
16
void MayAliasAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
4114
16
  switch (SpellingListIndex) {
4115
16
  default:
4116
0
    llvm_unreachable("Unknown attribute spelling!");
4117
16
    
break0
;
4118
16
  case 0 : {
4119
16
    OS << " __attribute__((may_alias))";
4120
16
    break;
4121
16
  }
4122
16
  case 1 : {
4123
0
    OS << " [[gnu::may_alias]]";
4124
0
    break;
4125
16
  }
4126
16
}
4127
16
}
4128
4129
0
const char *MayAliasAttr::getSpelling() const {
4130
0
  switch (SpellingListIndex) {
4131
0
  default:
4132
0
    llvm_unreachable("Unknown attribute spelling!");
4133
0
    return "(No spelling)";
4134
0
  case 0:
4135
0
    return "may_alias";
4136
0
  case 1:
4137
0
    return "may_alias";
4138
0
  }
4139
0
}
4140
4141
0
MicroMipsAttr *MicroMipsAttr::clone(ASTContext &C) const {
4142
0
  auto *A = new (C) MicroMipsAttr(getLocation(), C, getSpellingListIndex());
4143
0
  A->Inherited = Inherited;
4144
0
  A->IsPackExpansion = IsPackExpansion;
4145
0
  A->Implicit = Implicit;
4146
0
  return A;
4147
0
}
4148
4149
0
void MicroMipsAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
4150
0
  switch (SpellingListIndex) {
4151
0
  default:
4152
0
    llvm_unreachable("Unknown attribute spelling!");
4153
0
    break;
4154
0
  case 0 : {
4155
0
    OS << " __attribute__((micromips))";
4156
0
    break;
4157
0
  }
4158
0
  case 1 : {
4159
0
    OS << " [[gnu::micromips]]";
4160
0
    break;
4161
0
  }
4162
0
}
4163
0
}
4164
4165
1
const char *MicroMipsAttr::getSpelling() const {
4166
1
  switch (SpellingListIndex) {
4167
1
  default:
4168
0
    llvm_unreachable("Unknown attribute spelling!");
4169
1
    
return "(No spelling)"0
;
4170
1
  case 0:
4171
1
    return "micromips";
4172
1
  case 1:
4173
0
    return "micromips";
4174
1
  }
4175
1
}
4176
4177
12
MinSizeAttr *MinSizeAttr::clone(ASTContext &C) const {
4178
12
  auto *A = new (C) MinSizeAttr(getLocation(), C, getSpellingListIndex());
4179
12
  A->Inherited = Inherited;
4180
12
  A->IsPackExpansion = IsPackExpansion;
4181
12
  A->Implicit = Implicit;
4182
12
  return A;
4183
12
}
4184
4185
0
void MinSizeAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
4186
0
  switch (SpellingListIndex) {
4187
0
  default:
4188
0
    llvm_unreachable("Unknown attribute spelling!");
4189
0
    break;
4190
0
  case 0 : {
4191
0
    OS << " __attribute__((minsize))";
4192
0
    break;
4193
0
  }
4194
0
  case 1 : {
4195
0
    OS << " [[clang::minsize]]";
4196
0
    break;
4197
0
  }
4198
0
  case 2 : {
4199
0
    OS << " [[clang::minsize]]";
4200
0
    break;
4201
0
  }
4202
0
}
4203
0
}
4204
4205
3
const char *MinSizeAttr::getSpelling() const {
4206
3
  switch (SpellingListIndex) {
4207
3
  default:
4208
0
    llvm_unreachable("Unknown attribute spelling!");
4209
3
    
return "(No spelling)"0
;
4210
3
  case 0:
4211
3
    return "minsize";
4212
3
  case 1:
4213
0
    return "minsize";
4214
3
  case 2:
4215
0
    return "minsize";
4216
3
  }
4217
3
}
4218
4219
0
MinVectorWidthAttr *MinVectorWidthAttr::clone(ASTContext &C) const {
4220
0
  auto *A = new (C) MinVectorWidthAttr(getLocation(), C, vectorWidth, getSpellingListIndex());
4221
0
  A->Inherited = Inherited;
4222
0
  A->IsPackExpansion = IsPackExpansion;
4223
0
  A->Implicit = Implicit;
4224
0
  return A;
4225
0
}
4226
4227
0
void MinVectorWidthAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
4228
0
  switch (SpellingListIndex) {
4229
0
  default:
4230
0
    llvm_unreachable("Unknown attribute spelling!");
4231
0
    break;
4232
0
  case 0 : {
4233
0
    OS << " __attribute__((min_vector_width(" << getVectorWidth() << ")))";
4234
0
    break;
4235
0
  }
4236
0
  case 1 : {
4237
0
    OS << " [[clang::min_vector_width(" << getVectorWidth() << ")]]";
4238
0
    break;
4239
0
  }
4240
0
  case 2 : {
4241
0
    OS << " [[clang::min_vector_width(" << getVectorWidth() << ")]]";
4242
0
    break;
4243
0
  }
4244
0
}
4245
0
}
4246
4247
0
const char *MinVectorWidthAttr::getSpelling() const {
4248
0
  switch (SpellingListIndex) {
4249
0
  default:
4250
0
    llvm_unreachable("Unknown attribute spelling!");
4251
0
    return "(No spelling)";
4252
0
  case 0:
4253
0
    return "min_vector_width";
4254
0
  case 1:
4255
0
    return "min_vector_width";
4256
0
  case 2:
4257
0
    return "min_vector_width";
4258
0
  }
4259
0
}
4260
4261
1
Mips16Attr *Mips16Attr::clone(ASTContext &C) const {
4262
1
  auto *A = new (C) Mips16Attr(getLocation(), C, getSpellingListIndex());
4263
1
  A->Inherited = Inherited;
4264
1
  A->IsPackExpansion = IsPackExpansion;
4265
1
  A->Implicit = Implicit;
4266
1
  return A;
4267
1
}
4268
4269
0
void Mips16Attr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
4270
0
  switch (SpellingListIndex) {
4271
0
  default:
4272
0
    llvm_unreachable("Unknown attribute spelling!");
4273
0
    break;
4274
0
  case 0 : {
4275
0
    OS << " __attribute__((mips16))";
4276
0
    break;
4277
0
  }
4278
0
  case 1 : {
4279
0
    OS << " [[gnu::mips16]]";
4280
0
    break;
4281
0
  }
4282
0
}
4283
0
}
4284
4285
4
const char *Mips16Attr::getSpelling() const {
4286
4
  switch (SpellingListIndex) {
4287
4
  default:
4288
0
    llvm_unreachable("Unknown attribute spelling!");
4289
4
    
return "(No spelling)"0
;
4290
4
  case 0:
4291
4
    return "mips16";
4292
4
  case 1:
4293
0
    return "mips16";
4294
4
  }
4295
4
}
4296
4297
0
MipsInterruptAttr *MipsInterruptAttr::clone(ASTContext &C) const {
4298
0
  auto *A = new (C) MipsInterruptAttr(getLocation(), C, interrupt, getSpellingListIndex());
4299
0
  A->Inherited = Inherited;
4300
0
  A->IsPackExpansion = IsPackExpansion;
4301
0
  A->Implicit = Implicit;
4302
0
  return A;
4303
0
}
4304
4305
0
void MipsInterruptAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
4306
0
  switch (SpellingListIndex) {
4307
0
  default:
4308
0
    llvm_unreachable("Unknown attribute spelling!");
4309
0
    break;
4310
0
  case 0 : {
4311
0
    OS << " __attribute__((interrupt(\"" << MipsInterruptAttr::ConvertInterruptTypeToStr(getInterrupt()) << "\")))";
4312
0
    break;
4313
0
  }
4314
0
  case 1 : {
4315
0
    OS << " [[gnu::interrupt(\"" << MipsInterruptAttr::ConvertInterruptTypeToStr(getInterrupt()) << "\")]]";
4316
0
    break;
4317
0
  }
4318
0
}
4319
0
}
4320
4321
2
const char *MipsInterruptAttr::getSpelling() const {
4322
2
  switch (SpellingListIndex) {
4323
2
  default:
4324
0
    llvm_unreachable("Unknown attribute spelling!");
4325
2
    
return "(No spelling)"0
;
4326
2
  case 0:
4327
2
    return "interrupt";
4328
2
  case 1:
4329
0
    return "interrupt";
4330
2
  }
4331
2
}
4332
4333
0
MipsLongCallAttr *MipsLongCallAttr::clone(ASTContext &C) const {
4334
0
  auto *A = new (C) MipsLongCallAttr(getLocation(), C, getSpellingListIndex());
4335
0
  A->Inherited = Inherited;
4336
0
  A->IsPackExpansion = IsPackExpansion;
4337
0
  A->Implicit = Implicit;
4338
0
  return A;
4339
0
}
4340
4341
0
void MipsLongCallAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
4342
0
  switch (SpellingListIndex) {
4343
0
  default:
4344
0
    llvm_unreachable("Unknown attribute spelling!");
4345
0
    break;
4346
0
  case 0 : {
4347
0
    OS << " __attribute__((long_call))";
4348
0
    break;
4349
0
  }
4350
0
  case 1 : {
4351
0
    OS << " [[gnu::long_call]]";
4352
0
    break;
4353
0
  }
4354
0
  case 2 : {
4355
0
    OS << " __attribute__((far))";
4356
0
    break;
4357
0
  }
4358
0
  case 3 : {
4359
0
    OS << " [[gnu::far]]";
4360
0
    break;
4361
0
  }
4362
0
}
4363
0
}
4364
4365
2
const char *MipsLongCallAttr::getSpelling() const {
4366
2
  switch (SpellingListIndex) {
4367
2
  default:
4368
0
    llvm_unreachable("Unknown attribute spelling!");
4369
2
    
return "(No spelling)"0
;
4370
2
  case 0:
4371
2
    return "long_call";
4372
2
  case 1:
4373
0
    return "long_call";
4374
2
  case 2:
4375
0
    return "far";
4376
2
  case 3:
4377
0
    return "far";
4378
2
  }
4379
2
}
4380
4381
0
MipsShortCallAttr *MipsShortCallAttr::clone(ASTContext &C) const {
4382
0
  auto *A = new (C) MipsShortCallAttr(getLocation(), C, getSpellingListIndex());
4383
0
  A->Inherited = Inherited;
4384
0
  A->IsPackExpansion = IsPackExpansion;
4385
0
  A->Implicit = Implicit;
4386
0
  return A;
4387
0
}
4388
4389
0
void MipsShortCallAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
4390
0
  switch (SpellingListIndex) {
4391
0
  default:
4392
0
    llvm_unreachable("Unknown attribute spelling!");
4393
0
    break;
4394
0
  case 0 : {
4395
0
    OS << " __attribute__((short_call))";
4396
0
    break;
4397
0
  }
4398
0
  case 1 : {
4399
0
    OS << " [[gnu::short_call]]";
4400
0
    break;
4401
0
  }
4402
0
  case 2 : {
4403
0
    OS << " __attribute__((near))";
4404
0
    break;
4405
0
  }
4406
0
  case 3 : {
4407
0
    OS << " [[gnu::near]]";
4408
0
    break;
4409
0
  }
4410
0
}
4411
0
}
4412
4413
2
const char *MipsShortCallAttr::getSpelling() const {
4414
2
  switch (SpellingListIndex) {
4415
2
  default:
4416
0
    llvm_unreachable("Unknown attribute spelling!");
4417
2
    
return "(No spelling)"0
;
4418
2
  case 0:
4419
0
    return "short_call";
4420
2
  case 1:
4421
0
    return "short_call";
4422
2
  case 2:
4423
2
    return "near";
4424
2
  case 3:
4425
0
    return "near";
4426
2
  }
4427
2
}
4428
4429
0
ModeAttr *ModeAttr::clone(ASTContext &C) const {
4430
0
  auto *A = new (C) ModeAttr(getLocation(), C, mode, getSpellingListIndex());
4431
0
  A->Inherited = Inherited;
4432
0
  A->IsPackExpansion = IsPackExpansion;
4433
0
  A->Implicit = Implicit;
4434
0
  return A;
4435
0
}
4436
4437
3
void ModeAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
4438
3
  switch (SpellingListIndex) {
4439
3
  default:
4440
0
    llvm_unreachable("Unknown attribute spelling!");
4441
3
    
break0
;
4442
3
  case 0 : {
4443
2
    OS << " __attribute__((mode(" << (getMode() ? getMode()->getName() : 
""0
) << ")))";
4444
2
    break;
4445
3
  }
4446
3
  case 1 : {
4447
1
    OS << " [[gnu::mode(" << (getMode() ? getMode()->getName() : 
""0
) << ")]]";
4448
1
    break;
4449
3
  }
4450
3
}
4451
3
}
4452
4453
0
const char *ModeAttr::getSpelling() const {
4454
0
  switch (SpellingListIndex) {
4455
0
  default:
4456
0
    llvm_unreachable("Unknown attribute spelling!");
4457
0
    return "(No spelling)";
4458
0
  case 0:
4459
0
    return "mode";
4460
0
  case 1:
4461
0
    return "mode";
4462
0
  }
4463
0
}
4464
4465
6
NSConsumedAttr *NSConsumedAttr::clone(ASTContext &C) const {
4466
6
  auto *A = new (C) NSConsumedAttr(getLocation(), C, getSpellingListIndex());
4467
6
  A->Inherited = Inherited;
4468
6
  A->IsPackExpansion = IsPackExpansion;
4469
6
  A->Implicit = Implicit;
4470
6
  return A;
4471
6
}
4472
4473
0
void NSConsumedAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
4474
0
  switch (SpellingListIndex) {
4475
0
  default:
4476
0
    llvm_unreachable("Unknown attribute spelling!");
4477
0
    break;
4478
0
  case 0 : {
4479
0
    OS << " __attribute__((ns_consumed))";
4480
0
    break;
4481
0
  }
4482
0
  case 1 : {
4483
0
    OS << " [[clang::ns_consumed]]";
4484
0
    break;
4485
0
  }
4486
0
  case 2 : {
4487
0
    OS << " [[clang::ns_consumed]]";
4488
0
    break;
4489
0
  }
4490
0
}
4491
0
}
4492
4493
0
const char *NSConsumedAttr::getSpelling() const {
4494
0
  switch (SpellingListIndex) {
4495
0
  default:
4496
0
    llvm_unreachable("Unknown attribute spelling!");
4497
0
    return "(No spelling)";
4498
0
  case 0:
4499
0
    return "ns_consumed";
4500
0
  case 1:
4501
0
    return "ns_consumed";
4502
0
  case 2:
4503
0
    return "ns_consumed";
4504
0
  }
4505
0
}
4506
4507
137
NSConsumesSelfAttr *NSConsumesSelfAttr::clone(ASTContext &C) const {
4508
137
  auto *A = new (C) NSConsumesSelfAttr(getLocation(), C, getSpellingListIndex());
4509
137
  A->Inherited = Inherited;
4510
137
  A->IsPackExpansion = IsPackExpansion;
4511
137
  A->Implicit = Implicit;
4512
137
  return A;
4513
137
}
4514
4515
0
void NSConsumesSelfAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
4516
0
  switch (SpellingListIndex) {
4517
0
  default:
4518
0
    llvm_unreachable("Unknown attribute spelling!");
4519
0
    break;
4520
0
  case 0 : {
4521
0
    OS << " __attribute__((ns_consumes_self))";
4522
0
    break;
4523
0
  }
4524
0
  case 1 : {
4525
0
    OS << " [[clang::ns_consumes_self]]";
4526
0
    break;
4527
0
  }
4528
0
  case 2 : {
4529
0
    OS << " [[clang::ns_consumes_self]]";
4530
0
    break;
4531
0
  }
4532
0
}
4533
0
}
4534
4535
0
const char *NSConsumesSelfAttr::getSpelling() const {
4536
0
  switch (SpellingListIndex) {
4537
0
  default:
4538
0
    llvm_unreachable("Unknown attribute spelling!");
4539
0
    return "(No spelling)";
4540
0
  case 0:
4541
0
    return "ns_consumes_self";
4542
0
  case 1:
4543
0
    return "ns_consumes_self";
4544
0
  case 2:
4545
0
    return "ns_consumes_self";
4546
0
  }
4547
0
}
4548
4549
0
NSReturnsAutoreleasedAttr *NSReturnsAutoreleasedAttr::clone(ASTContext &C) const {
4550
0
  auto *A = new (C) NSReturnsAutoreleasedAttr(getLocation(), C, getSpellingListIndex());
4551
0
  A->Inherited = Inherited;
4552
0
  A->IsPackExpansion = IsPackExpansion;
4553
0
  A->Implicit = Implicit;
4554
0
  return A;
4555
0
}
4556
4557
0
void NSReturnsAutoreleasedAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
4558
0
  switch (SpellingListIndex) {
4559
0
  default:
4560
0
    llvm_unreachable("Unknown attribute spelling!");
4561
0
    break;
4562
0
  case 0 : {
4563
0
    OS << " __attribute__((ns_returns_autoreleased))";
4564
0
    break;
4565
0
  }
4566
0
  case 1 : {
4567
0
    OS << " [[clang::ns_returns_autoreleased]]";
4568
0
    break;
4569
0
  }
4570
0
  case 2 : {
4571
0
    OS << " [[clang::ns_returns_autoreleased]]";
4572
0
    break;
4573
0
  }
4574
0
}
4575
0
}
4576
4577
0
const char *NSReturnsAutoreleasedAttr::getSpelling() const {
4578
0
  switch (SpellingListIndex) {
4579
0
  default:
4580
0
    llvm_unreachable("Unknown attribute spelling!");
4581
0
    return "(No spelling)";
4582
0
  case 0:
4583
0
    return "ns_returns_autoreleased";
4584
0
  case 1:
4585
0
    return "ns_returns_autoreleased";
4586
0
  case 2:
4587
0
    return "ns_returns_autoreleased";
4588
0
  }
4589
0
}
4590
4591
8
NSReturnsNotRetainedAttr *NSReturnsNotRetainedAttr::clone(ASTContext &C) const {
4592
8
  auto *A = new (C) NSReturnsNotRetainedAttr(getLocation(), C, getSpellingListIndex());
4593
8
  A->Inherited = Inherited;
4594
8
  A->IsPackExpansion = IsPackExpansion;
4595
8
  A->Implicit = Implicit;
4596
8
  return A;
4597
8
}
4598
4599
0
void NSReturnsNotRetainedAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
4600
0
  switch (SpellingListIndex) {
4601
0
  default:
4602
0
    llvm_unreachable("Unknown attribute spelling!");
4603
0
    break;
4604
0
  case 0 : {
4605
0
    OS << " __attribute__((ns_returns_not_retained))";
4606
0
    break;
4607
0
  }
4608
0
  case 1 : {
4609
0
    OS << " [[clang::ns_returns_not_retained]]";
4610
0
    break;
4611
0
  }
4612
0
  case 2 : {
4613
0
    OS << " [[clang::ns_returns_not_retained]]";
4614
0
    break;
4615
0
  }
4616
0
}
4617
0
}
4618
4619
0
const char *NSReturnsNotRetainedAttr::getSpelling() const {
4620
0
  switch (SpellingListIndex) {
4621
0
  default:
4622
0
    llvm_unreachable("Unknown attribute spelling!");
4623
0
    return "(No spelling)";
4624
0
  case 0:
4625
0
    return "ns_returns_not_retained";
4626
0
  case 1:
4627
0
    return "ns_returns_not_retained";
4628
0
  case 2:
4629
0
    return "ns_returns_not_retained";
4630
0
  }
4631
0
}
4632
4633
175
NSReturnsRetainedAttr *NSReturnsRetainedAttr::clone(ASTContext &C) const {
4634
175
  auto *A = new (C) NSReturnsRetainedAttr(getLocation(), C, getSpellingListIndex());
4635
175
  A->Inherited = Inherited;
4636
175
  A->IsPackExpansion = IsPackExpansion;
4637
175
  A->Implicit = Implicit;
4638
175
  return A;
4639
175
}
4640
4641
0
void NSReturnsRetainedAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
4642
0
  switch (SpellingListIndex) {
4643
0
  default:
4644
0
    llvm_unreachable("Unknown attribute spelling!");
4645
0
    break;
4646
0
  case 0 : {
4647
0
    OS << " __attribute__((ns_returns_retained))";
4648
0
    break;
4649
0
  }
4650
0
  case 1 : {
4651
0
    OS << " [[clang::ns_returns_retained]]";
4652
0
    break;
4653
0
  }
4654
0
  case 2 : {
4655
0
    OS << " [[clang::ns_returns_retained]]";
4656
0
    break;
4657
0
  }
4658
0
}
4659
0
}
4660
4661
0
const char *NSReturnsRetainedAttr::getSpelling() const {
4662
0
  switch (SpellingListIndex) {
4663
0
  default:
4664
0
    llvm_unreachable("Unknown attribute spelling!");
4665
0
    return "(No spelling)";
4666
0
  case 0:
4667
0
    return "ns_returns_retained";
4668
0
  case 1:
4669
0
    return "ns_returns_retained";
4670
0
  case 2:
4671
0
    return "ns_returns_retained";
4672
0
  }
4673
0
}
4674
4675
1
NakedAttr *NakedAttr::clone(ASTContext &C) const {
4676
1
  auto *A = new (C) NakedAttr(getLocation(), C, getSpellingListIndex());
4677
1
  A->Inherited = Inherited;
4678
1
  A->IsPackExpansion = IsPackExpansion;
4679
1
  A->Implicit = Implicit;
4680
1
  return A;
4681
1
}
4682
4683
0
void NakedAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
4684
0
  switch (SpellingListIndex) {
4685
0
  default:
4686
0
    llvm_unreachable("Unknown attribute spelling!");
4687
0
    break;
4688
0
  case 0 : {
4689
0
    OS << " __attribute__((naked))";
4690
0
    break;
4691
0
  }
4692
0
  case 1 : {
4693
0
    OS << " [[gnu::naked]]";
4694
0
    break;
4695
0
  }
4696
0
  case 2 : {
4697
0
    OS << " __declspec(naked)";
4698
0
    break;
4699
0
  }
4700
0
}
4701
0
}
4702
4703
1
const char *NakedAttr::getSpelling() const {
4704
1
  switch (SpellingListIndex) {
4705
1
  default:
4706
0
    llvm_unreachable("Unknown attribute spelling!");
4707
1
    
return "(No spelling)"0
;
4708
1
  case 0:
4709
1
    return "naked";
4710
1
  case 1:
4711
0
    return "naked";
4712
1
  case 2:
4713
0
    return "naked";
4714
1
  }
4715
1
}
4716
4717
0
NoAliasAttr *NoAliasAttr::clone(ASTContext &C) const {
4718
0
  auto *A = new (C) NoAliasAttr(getLocation(), C, getSpellingListIndex());
4719
0
  A->Inherited = Inherited;
4720
0
  A->IsPackExpansion = IsPackExpansion;
4721
0
  A->Implicit = Implicit;
4722
0
  return A;
4723
0
}
4724
4725
0
void NoAliasAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
4726
0
  switch (SpellingListIndex) {
4727
0
  default:
4728
0
    llvm_unreachable("Unknown attribute spelling!");
4729
0
    break;
4730
0
  case 0 : {
4731
0
    OS << " __declspec(noalias)";
4732
0
    break;
4733
0
  }
4734
0
}
4735
0
}
4736
4737
0
const char *NoAliasAttr::getSpelling() const {
4738
0
  switch (SpellingListIndex) {
4739
0
  default:
4740
0
    llvm_unreachable("Unknown attribute spelling!");
4741
0
    return "(No spelling)";
4742
0
  case 0:
4743
0
    return "noalias";
4744
0
  }
4745
0
}
4746
4747
0
NoCommonAttr *NoCommonAttr::clone(ASTContext &C) const {
4748
0
  auto *A = new (C) NoCommonAttr(getLocation(), C, getSpellingListIndex());
4749
0
  A->Inherited = Inherited;
4750
0
  A->IsPackExpansion = IsPackExpansion;
4751
0
  A->Implicit = Implicit;
4752
0
  return A;
4753
0
}
4754
4755
0
void NoCommonAttr::printPretty(raw_ostream &OS, const PrintingPolicy &Policy) const {
4756
0
  switch (SpellingListIndex) {
4757
0
  default:
4758
0
    llvm_unreachable("Unknown attribute spelling!");
4759
0
    break;
4760
0
  case 0 : {
4761
0
    OS << " __attribute__((nocommon))";
4762
0
    break;
4763
0
  }
4764
0
  case 1 : {
4765
0
    OS << " [[gnu::nocommon]]";
4766
0
    break;
4767
0
  }
4768
0
}
4769
0
}
4770
4771
0
const char *NoCommonAttr::getSpelling() const {
4772
0
  switch (SpellingListIndex) {
4773
0
  default:
4774
0
    llvm_unreachable("Unknown attribute spelling!");
4775
0
    return "(No spelling)";
4776
0
  case 0:
4777
0
    return "nocommon";
4778
0
  case 1:
4779
0
    return "nocommon";
4780
0
  }
4781
0
}
4782
4783
4
NoDebugAttr *NoDebugAttr::clone(ASTContext &C) const {
4784
4
  auto *A = new (C) NoDebugAttr(getLocation(), C, getSpellingListIndex());
4785
4
  A->Inherited = Inherited;
4786
4
  A->IsPackExpansion = IsPackExpansion;
4787
4
  A->Implicit = Implicit;
4788
4
  return A;
4789
4
}
4790
4791
0
void NoDebugAttr::printPretty(raw_ostream &