Coverage Report

Created: 2018-11-16 02:38

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