Coverage Report

Created: 2018-09-19 20:53

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