Coverage Report

Created: 2019-02-15 18:59

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