Subversion Repositories QNX 8.QNX8 LLVM/Clang compiler suite

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
14 pmbaty 1
/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
2
|*                                                                            *|
3
|* Template instantiation code for attributes                                 *|
4
|*                                                                            *|
5
|* Automatically generated file, do not edit!                                 *|
6
|*                                                                            *|
7
\*===----------------------------------------------------------------------===*/
8
 
9
namespace clang {
10
namespace sema {
11
 
12
Attr *instantiateTemplateAttribute(const Attr *At, ASTContext &C, Sema &S,
13
        const MultiLevelTemplateArgumentList &TemplateArgs) {
14
  switch (At->getKind()) {
15
    case attr::AArch64SVEPcs: {
16
      const auto *A = cast<AArch64SVEPcsAttr>(At);
17
      return A->clone(C);
18
    }
19
    case attr::AArch64VectorPcs: {
20
      const auto *A = cast<AArch64VectorPcsAttr>(At);
21
      return A->clone(C);
22
    }
23
    case attr::AMDGPUFlatWorkGroupSize: {
24
      const auto *A = cast<AMDGPUFlatWorkGroupSizeAttr>(At);
25
      return A->clone(C);
26
    }
27
    case attr::AMDGPUKernelCall: {
28
      const auto *A = cast<AMDGPUKernelCallAttr>(At);
29
      return A->clone(C);
30
    }
31
    case attr::AMDGPUNumSGPR: {
32
      const auto *A = cast<AMDGPUNumSGPRAttr>(At);
33
      return A->clone(C);
34
    }
35
    case attr::AMDGPUNumVGPR: {
36
      const auto *A = cast<AMDGPUNumVGPRAttr>(At);
37
      return A->clone(C);
38
    }
39
    case attr::AMDGPUWavesPerEU: {
40
      const auto *A = cast<AMDGPUWavesPerEUAttr>(At);
41
      return A->clone(C);
42
    }
43
    case attr::ARMInterrupt: {
44
      const auto *A = cast<ARMInterruptAttr>(At);
45
      return A->clone(C);
46
    }
47
    case attr::AVRInterrupt: {
48
      const auto *A = cast<AVRInterruptAttr>(At);
49
      return A->clone(C);
50
    }
51
    case attr::AVRSignal: {
52
      const auto *A = cast<AVRSignalAttr>(At);
53
      return A->clone(C);
54
    }
55
    case attr::AbiTag: {
56
      const auto *A = cast<AbiTagAttr>(At);
57
      return A->clone(C);
58
    }
59
    case attr::AcquireCapability: {
60
      const auto *A = cast<AcquireCapabilityAttr>(At);
61
      auto *tempInstArgs = new (C, 16) Expr *[A->args_size()];
62
      {
63
        EnterExpressionEvaluationContext Unevaluated(S, Sema::ExpressionEvaluationContext::Unevaluated);
64
        Expr * *TI = tempInstArgs;
65
        Expr * *I = A->args_begin();
66
        Expr * *E = A->args_end();
67
        for (; I != E; ++I, ++TI) {
68
          ExprResult Result = S.SubstExpr(*I, TemplateArgs);
69
          if (Result.isInvalid())
70
            return nullptr;
71
          *TI = Result.get();
72
        }
73
      }
74
      return new (C) AcquireCapabilityAttr(C, *A, tempInstArgs, A->args_size());
75
    }
76
    case attr::AcquireHandle: {
77
      const auto *A = cast<AcquireHandleAttr>(At);
78
      return A->clone(C);
79
    }
80
    case attr::AcquiredAfter: {
81
      const auto *A = cast<AcquiredAfterAttr>(At);
82
      auto *tempInstArgs = new (C, 16) Expr *[A->args_size()];
83
      {
84
        EnterExpressionEvaluationContext Unevaluated(S, Sema::ExpressionEvaluationContext::Unevaluated);
85
        Expr * *TI = tempInstArgs;
86
        Expr * *I = A->args_begin();
87
        Expr * *E = A->args_end();
88
        for (; I != E; ++I, ++TI) {
89
          ExprResult Result = S.SubstExpr(*I, TemplateArgs);
90
          if (Result.isInvalid())
91
            return nullptr;
92
          *TI = Result.get();
93
        }
94
      }
95
      return new (C) AcquiredAfterAttr(C, *A, tempInstArgs, A->args_size());
96
    }
97
    case attr::AcquiredBefore: {
98
      const auto *A = cast<AcquiredBeforeAttr>(At);
99
      auto *tempInstArgs = new (C, 16) Expr *[A->args_size()];
100
      {
101
        EnterExpressionEvaluationContext Unevaluated(S, Sema::ExpressionEvaluationContext::Unevaluated);
102
        Expr * *TI = tempInstArgs;
103
        Expr * *I = A->args_begin();
104
        Expr * *E = A->args_end();
105
        for (; I != E; ++I, ++TI) {
106
          ExprResult Result = S.SubstExpr(*I, TemplateArgs);
107
          if (Result.isInvalid())
108
            return nullptr;
109
          *TI = Result.get();
110
        }
111
      }
112
      return new (C) AcquiredBeforeAttr(C, *A, tempInstArgs, A->args_size());
113
    }
114
    case attr::AddressSpace: {
115
      const auto *A = cast<AddressSpaceAttr>(At);
116
      return A->clone(C);
117
    }
118
    case attr::Alias: {
119
      const auto *A = cast<AliasAttr>(At);
120
      return A->clone(C);
121
    }
122
    case attr::AlignMac68k: {
123
      const auto *A = cast<AlignMac68kAttr>(At);
124
      return A->clone(C);
125
    }
126
    case attr::AlignNatural: {
127
      const auto *A = cast<AlignNaturalAttr>(At);
128
      return A->clone(C);
129
    }
130
    case attr::AlignValue: {
131
      const auto *A = cast<AlignValueAttr>(At);
132
      return A->clone(C);
133
    }
134
    case attr::Aligned: {
135
      const auto *A = cast<AlignedAttr>(At);
136
      return A->clone(C);
137
    }
138
    case attr::AllocAlign: {
139
      const auto *A = cast<AllocAlignAttr>(At);
140
      return A->clone(C);
141
    }
142
    case attr::AllocSize: {
143
      const auto *A = cast<AllocSizeAttr>(At);
144
      return new (C) AllocSizeAttr(C, *A, A->getElemSizeParam(), A->getNumElemsParam());
145
    }
146
    case attr::AlwaysDestroy: {
147
      const auto *A = cast<AlwaysDestroyAttr>(At);
148
      return A->clone(C);
149
    }
150
    case attr::AlwaysInline: {
151
      const auto *A = cast<AlwaysInlineAttr>(At);
152
      return A->clone(C);
153
    }
154
    case attr::AnalyzerNoReturn: {
155
      const auto *A = cast<AnalyzerNoReturnAttr>(At);
156
      return A->clone(C);
157
    }
158
    case attr::Annotate: {
159
      const auto *A = cast<AnnotateAttr>(At);
160
      return A->clone(C);
161
    }
162
    case attr::AnnotateType: {
163
      const auto *A = cast<AnnotateTypeAttr>(At);
164
      return A->clone(C);
165
    }
166
    case attr::AnyX86Interrupt: {
167
      const auto *A = cast<AnyX86InterruptAttr>(At);
168
      return A->clone(C);
169
    }
170
    case attr::AnyX86NoCallerSavedRegisters: {
171
      const auto *A = cast<AnyX86NoCallerSavedRegistersAttr>(At);
172
      return A->clone(C);
173
    }
174
    case attr::AnyX86NoCfCheck: {
175
      const auto *A = cast<AnyX86NoCfCheckAttr>(At);
176
      return A->clone(C);
177
    }
178
    case attr::ArcWeakrefUnavailable: {
179
      const auto *A = cast<ArcWeakrefUnavailableAttr>(At);
180
      return A->clone(C);
181
    }
182
    case attr::ArgumentWithTypeTag: {
183
      const auto *A = cast<ArgumentWithTypeTagAttr>(At);
184
      return A->clone(C);
185
    }
186
    case attr::ArmBuiltinAlias: {
187
      const auto *A = cast<ArmBuiltinAliasAttr>(At);
188
      return A->clone(C);
189
    }
190
    case attr::ArmMveStrictPolymorphism: {
191
      const auto *A = cast<ArmMveStrictPolymorphismAttr>(At);
192
      return A->clone(C);
193
    }
194
    case attr::Artificial: {
195
      const auto *A = cast<ArtificialAttr>(At);
196
      return A->clone(C);
197
    }
198
    case attr::AsmLabel: {
199
      const auto *A = cast<AsmLabelAttr>(At);
200
      return A->clone(C);
201
    }
202
    case attr::AssertCapability: {
203
      const auto *A = cast<AssertCapabilityAttr>(At);
204
      auto *tempInstArgs = new (C, 16) Expr *[A->args_size()];
205
      {
206
        EnterExpressionEvaluationContext Unevaluated(S, Sema::ExpressionEvaluationContext::Unevaluated);
207
        Expr * *TI = tempInstArgs;
208
        Expr * *I = A->args_begin();
209
        Expr * *E = A->args_end();
210
        for (; I != E; ++I, ++TI) {
211
          ExprResult Result = S.SubstExpr(*I, TemplateArgs);
212
          if (Result.isInvalid())
213
            return nullptr;
214
          *TI = Result.get();
215
        }
216
      }
217
      return new (C) AssertCapabilityAttr(C, *A, tempInstArgs, A->args_size());
218
    }
219
    case attr::AssertExclusiveLock: {
220
      const auto *A = cast<AssertExclusiveLockAttr>(At);
221
      auto *tempInstArgs = new (C, 16) Expr *[A->args_size()];
222
      {
223
        EnterExpressionEvaluationContext Unevaluated(S, Sema::ExpressionEvaluationContext::Unevaluated);
224
        Expr * *TI = tempInstArgs;
225
        Expr * *I = A->args_begin();
226
        Expr * *E = A->args_end();
227
        for (; I != E; ++I, ++TI) {
228
          ExprResult Result = S.SubstExpr(*I, TemplateArgs);
229
          if (Result.isInvalid())
230
            return nullptr;
231
          *TI = Result.get();
232
        }
233
      }
234
      return new (C) AssertExclusiveLockAttr(C, *A, tempInstArgs, A->args_size());
235
    }
236
    case attr::AssertSharedLock: {
237
      const auto *A = cast<AssertSharedLockAttr>(At);
238
      auto *tempInstArgs = new (C, 16) Expr *[A->args_size()];
239
      {
240
        EnterExpressionEvaluationContext Unevaluated(S, Sema::ExpressionEvaluationContext::Unevaluated);
241
        Expr * *TI = tempInstArgs;
242
        Expr * *I = A->args_begin();
243
        Expr * *E = A->args_end();
244
        for (; I != E; ++I, ++TI) {
245
          ExprResult Result = S.SubstExpr(*I, TemplateArgs);
246
          if (Result.isInvalid())
247
            return nullptr;
248
          *TI = Result.get();
249
        }
250
      }
251
      return new (C) AssertSharedLockAttr(C, *A, tempInstArgs, A->args_size());
252
    }
253
    case attr::AssumeAligned: {
254
      const auto *A = cast<AssumeAlignedAttr>(At);
255
      return A->clone(C);
256
    }
257
    case attr::Assumption: {
258
      const auto *A = cast<AssumptionAttr>(At);
259
      return A->clone(C);
260
    }
261
    case attr::Availability: {
262
      const auto *A = cast<AvailabilityAttr>(At);
263
      return A->clone(C);
264
    }
265
    case attr::BPFPreserveAccessIndex: {
266
      const auto *A = cast<BPFPreserveAccessIndexAttr>(At);
267
      return A->clone(C);
268
    }
269
    case attr::BTFDeclTag: {
270
      const auto *A = cast<BTFDeclTagAttr>(At);
271
      return A->clone(C);
272
    }
273
    case attr::BTFTypeTag: {
274
      const auto *A = cast<BTFTypeTagAttr>(At);
275
      return A->clone(C);
276
    }
277
    case attr::Blocks: {
278
      const auto *A = cast<BlocksAttr>(At);
279
      return A->clone(C);
280
    }
281
    case attr::Builtin: {
282
      const auto *A = cast<BuiltinAttr>(At);
283
      return A->clone(C);
284
    }
285
    case attr::BuiltinAlias: {
286
      const auto *A = cast<BuiltinAliasAttr>(At);
287
      return A->clone(C);
288
    }
289
    case attr::C11NoReturn: {
290
      const auto *A = cast<C11NoReturnAttr>(At);
291
      return A->clone(C);
292
    }
293
    case attr::CDecl: {
294
      const auto *A = cast<CDeclAttr>(At);
295
      return A->clone(C);
296
    }
297
    case attr::CFAuditedTransfer: {
298
      const auto *A = cast<CFAuditedTransferAttr>(At);
299
      return A->clone(C);
300
    }
301
    case attr::CFConsumed: {
302
      const auto *A = cast<CFConsumedAttr>(At);
303
      return A->clone(C);
304
    }
305
    case attr::CFGuard: {
306
      const auto *A = cast<CFGuardAttr>(At);
307
      return A->clone(C);
308
    }
309
    case attr::CFICanonicalJumpTable: {
310
      const auto *A = cast<CFICanonicalJumpTableAttr>(At);
311
      return A->clone(C);
312
    }
313
    case attr::CFReturnsNotRetained: {
314
      const auto *A = cast<CFReturnsNotRetainedAttr>(At);
315
      return A->clone(C);
316
    }
317
    case attr::CFReturnsRetained: {
318
      const auto *A = cast<CFReturnsRetainedAttr>(At);
319
      return A->clone(C);
320
    }
321
    case attr::CFUnknownTransfer: {
322
      const auto *A = cast<CFUnknownTransferAttr>(At);
323
      return A->clone(C);
324
    }
325
    case attr::CPUDispatch: {
326
      const auto *A = cast<CPUDispatchAttr>(At);
327
      return A->clone(C);
328
    }
329
    case attr::CPUSpecific: {
330
      const auto *A = cast<CPUSpecificAttr>(At);
331
      return A->clone(C);
332
    }
333
    case attr::CUDAConstant: {
334
      const auto *A = cast<CUDAConstantAttr>(At);
335
      return A->clone(C);
336
    }
337
    case attr::CUDADevice: {
338
      const auto *A = cast<CUDADeviceAttr>(At);
339
      return A->clone(C);
340
    }
341
    case attr::CUDADeviceBuiltinSurfaceType: {
342
      const auto *A = cast<CUDADeviceBuiltinSurfaceTypeAttr>(At);
343
      return A->clone(C);
344
    }
345
    case attr::CUDADeviceBuiltinTextureType: {
346
      const auto *A = cast<CUDADeviceBuiltinTextureTypeAttr>(At);
347
      return A->clone(C);
348
    }
349
    case attr::CUDAGlobal: {
350
      const auto *A = cast<CUDAGlobalAttr>(At);
351
      return A->clone(C);
352
    }
353
    case attr::CUDAHost: {
354
      const auto *A = cast<CUDAHostAttr>(At);
355
      return A->clone(C);
356
    }
357
    case attr::CUDAInvalidTarget: {
358
      const auto *A = cast<CUDAInvalidTargetAttr>(At);
359
      return A->clone(C);
360
    }
361
    case attr::CUDALaunchBounds: {
362
      const auto *A = cast<CUDALaunchBoundsAttr>(At);
363
      return A->clone(C);
364
    }
365
    case attr::CUDAShared: {
366
      const auto *A = cast<CUDASharedAttr>(At);
367
      return A->clone(C);
368
    }
369
    case attr::CXX11NoReturn: {
370
      const auto *A = cast<CXX11NoReturnAttr>(At);
371
      return A->clone(C);
372
    }
373
    case attr::CallableWhen: {
374
      const auto *A = cast<CallableWhenAttr>(At);
375
      return A->clone(C);
376
    }
377
    case attr::Callback: {
378
      const auto *A = cast<CallbackAttr>(At);
379
      return A->clone(C);
380
    }
381
    case attr::CalledOnce: {
382
      const auto *A = cast<CalledOnceAttr>(At);
383
      return A->clone(C);
384
    }
385
    case attr::Capability: {
386
      const auto *A = cast<CapabilityAttr>(At);
387
      return A->clone(C);
388
    }
389
    case attr::CapturedRecord: {
390
      const auto *A = cast<CapturedRecordAttr>(At);
391
      return A->clone(C);
392
    }
393
    case attr::CarriesDependency: {
394
      const auto *A = cast<CarriesDependencyAttr>(At);
395
      return A->clone(C);
396
    }
397
    case attr::Cleanup: {
398
      const auto *A = cast<CleanupAttr>(At);
399
      return A->clone(C);
400
    }
401
    case attr::CmseNSCall: {
402
      const auto *A = cast<CmseNSCallAttr>(At);
403
      return A->clone(C);
404
    }
405
    case attr::CmseNSEntry: {
406
      const auto *A = cast<CmseNSEntryAttr>(At);
407
      return A->clone(C);
408
    }
409
    case attr::CodeSeg: {
410
      const auto *A = cast<CodeSegAttr>(At);
411
      return A->clone(C);
412
    }
413
    case attr::Cold: {
414
      const auto *A = cast<ColdAttr>(At);
415
      return A->clone(C);
416
    }
417
    case attr::Common: {
418
      const auto *A = cast<CommonAttr>(At);
419
      return A->clone(C);
420
    }
421
    case attr::Const: {
422
      const auto *A = cast<ConstAttr>(At);
423
      return A->clone(C);
424
    }
425
    case attr::ConstInit: {
426
      const auto *A = cast<ConstInitAttr>(At);
427
      return A->clone(C);
428
    }
429
    case attr::Constructor: {
430
      const auto *A = cast<ConstructorAttr>(At);
431
      return A->clone(C);
432
    }
433
    case attr::Consumable: {
434
      const auto *A = cast<ConsumableAttr>(At);
435
      return A->clone(C);
436
    }
437
    case attr::ConsumableAutoCast: {
438
      const auto *A = cast<ConsumableAutoCastAttr>(At);
439
      return A->clone(C);
440
    }
441
    case attr::ConsumableSetOnRead: {
442
      const auto *A = cast<ConsumableSetOnReadAttr>(At);
443
      return A->clone(C);
444
    }
445
    case attr::Convergent: {
446
      const auto *A = cast<ConvergentAttr>(At);
447
      return A->clone(C);
448
    }
449
    case attr::DLLExport: {
450
      const auto *A = cast<DLLExportAttr>(At);
451
      return A->clone(C);
452
    }
453
    case attr::DLLExportStaticLocal: {
454
      const auto *A = cast<DLLExportStaticLocalAttr>(At);
455
      return A->clone(C);
456
    }
457
    case attr::DLLImport: {
458
      const auto *A = cast<DLLImportAttr>(At);
459
      return A->clone(C);
460
    }
461
    case attr::DLLImportStaticLocal: {
462
      const auto *A = cast<DLLImportStaticLocalAttr>(At);
463
      return A->clone(C);
464
    }
465
    case attr::Deprecated: {
466
      const auto *A = cast<DeprecatedAttr>(At);
467
      return A->clone(C);
468
    }
469
    case attr::Destructor: {
470
      const auto *A = cast<DestructorAttr>(At);
471
      return A->clone(C);
472
    }
473
    case attr::DiagnoseAsBuiltin: {
474
      const auto *A = cast<DiagnoseAsBuiltinAttr>(At);
475
      return A->clone(C);
476
    }
477
    case attr::DiagnoseIf: {
478
      const auto *A = cast<DiagnoseIfAttr>(At);
479
      Expr * tempInstCond;
480
      {
481
        EnterExpressionEvaluationContext Unevaluated(S, Sema::ExpressionEvaluationContext::Unevaluated);
482
        ExprResult Result = S.SubstExpr(A->getCond(), TemplateArgs);
483
        if (Result.isInvalid())
484
          return nullptr;
485
        tempInstCond = Result.get();
486
      }
487
      return new (C) DiagnoseIfAttr(C, *A, tempInstCond, A->getMessage(), A->getDiagnosticType(), A->getArgDependent(), A->getParent());
488
    }
489
    case attr::DisableSanitizerInstrumentation: {
490
      const auto *A = cast<DisableSanitizerInstrumentationAttr>(At);
491
      return A->clone(C);
492
    }
493
    case attr::DisableTailCalls: {
494
      const auto *A = cast<DisableTailCallsAttr>(At);
495
      return A->clone(C);
496
    }
497
    case attr::EmptyBases: {
498
      const auto *A = cast<EmptyBasesAttr>(At);
499
      return A->clone(C);
500
    }
501
    case attr::EnableIf: {
502
      const auto *A = cast<EnableIfAttr>(At);
503
      Expr * tempInstCond;
504
      {
505
        EnterExpressionEvaluationContext Unevaluated(S, Sema::ExpressionEvaluationContext::Unevaluated);
506
        ExprResult Result = S.SubstExpr(A->getCond(), TemplateArgs);
507
        if (Result.isInvalid())
508
          return nullptr;
509
        tempInstCond = Result.get();
510
      }
511
      return new (C) EnableIfAttr(C, *A, tempInstCond, A->getMessage());
512
    }
513
    case attr::EnforceTCB: {
514
      const auto *A = cast<EnforceTCBAttr>(At);
515
      return A->clone(C);
516
    }
517
    case attr::EnforceTCBLeaf: {
518
      const auto *A = cast<EnforceTCBLeafAttr>(At);
519
      return A->clone(C);
520
    }
521
    case attr::EnumExtensibility: {
522
      const auto *A = cast<EnumExtensibilityAttr>(At);
523
      return A->clone(C);
524
    }
525
    case attr::Error: {
526
      const auto *A = cast<ErrorAttr>(At);
527
      return A->clone(C);
528
    }
529
    case attr::ExcludeFromExplicitInstantiation: {
530
      const auto *A = cast<ExcludeFromExplicitInstantiationAttr>(At);
531
      return A->clone(C);
532
    }
533
    case attr::ExclusiveTrylockFunction: {
534
      const auto *A = cast<ExclusiveTrylockFunctionAttr>(At);
535
      Expr * tempInstSuccessValue;
536
      {
537
        EnterExpressionEvaluationContext Unevaluated(S, Sema::ExpressionEvaluationContext::Unevaluated);
538
        ExprResult Result = S.SubstExpr(A->getSuccessValue(), TemplateArgs);
539
        if (Result.isInvalid())
540
          return nullptr;
541
        tempInstSuccessValue = Result.get();
542
      }
543
      auto *tempInstArgs = new (C, 16) Expr *[A->args_size()];
544
      {
545
        EnterExpressionEvaluationContext Unevaluated(S, Sema::ExpressionEvaluationContext::Unevaluated);
546
        Expr * *TI = tempInstArgs;
547
        Expr * *I = A->args_begin();
548
        Expr * *E = A->args_end();
549
        for (; I != E; ++I, ++TI) {
550
          ExprResult Result = S.SubstExpr(*I, TemplateArgs);
551
          if (Result.isInvalid())
552
            return nullptr;
553
          *TI = Result.get();
554
        }
555
      }
556
      return new (C) ExclusiveTrylockFunctionAttr(C, *A, tempInstSuccessValue, tempInstArgs, A->args_size());
557
    }
558
    case attr::ExternalSourceSymbol: {
559
      const auto *A = cast<ExternalSourceSymbolAttr>(At);
560
      return A->clone(C);
561
    }
562
    case attr::FallThrough: {
563
      const auto *A = cast<FallThroughAttr>(At);
564
      return A->clone(C);
565
    }
566
    case attr::FastCall: {
567
      const auto *A = cast<FastCallAttr>(At);
568
      return A->clone(C);
569
    }
570
    case attr::Final: {
571
      const auto *A = cast<FinalAttr>(At);
572
      return A->clone(C);
573
    }
574
    case attr::FlagEnum: {
575
      const auto *A = cast<FlagEnumAttr>(At);
576
      return A->clone(C);
577
    }
578
    case attr::Flatten: {
579
      const auto *A = cast<FlattenAttr>(At);
580
      return A->clone(C);
581
    }
582
    case attr::Format: {
583
      const auto *A = cast<FormatAttr>(At);
584
      return A->clone(C);
585
    }
586
    case attr::FormatArg: {
587
      const auto *A = cast<FormatArgAttr>(At);
588
      return A->clone(C);
589
    }
590
    case attr::FunctionReturnThunks: {
591
      const auto *A = cast<FunctionReturnThunksAttr>(At);
592
      return A->clone(C);
593
    }
594
    case attr::GNUInline: {
595
      const auto *A = cast<GNUInlineAttr>(At);
596
      return A->clone(C);
597
    }
598
    case attr::GuardedBy: {
599
      const auto *A = cast<GuardedByAttr>(At);
600
      Expr * tempInstArg;
601
      {
602
        EnterExpressionEvaluationContext Unevaluated(S, Sema::ExpressionEvaluationContext::Unevaluated);
603
        ExprResult Result = S.SubstExpr(A->getArg(), TemplateArgs);
604
        if (Result.isInvalid())
605
          return nullptr;
606
        tempInstArg = Result.get();
607
      }
608
      return new (C) GuardedByAttr(C, *A, tempInstArg);
609
    }
610
    case attr::GuardedVar: {
611
      const auto *A = cast<GuardedVarAttr>(At);
612
      return A->clone(C);
613
    }
614
    case attr::HIPManaged: {
615
      const auto *A = cast<HIPManagedAttr>(At);
616
      return A->clone(C);
617
    }
618
    case attr::HLSLGroupSharedAddressSpace: {
619
      const auto *A = cast<HLSLGroupSharedAddressSpaceAttr>(At);
620
      return A->clone(C);
621
    }
622
    case attr::HLSLNumThreads: {
623
      const auto *A = cast<HLSLNumThreadsAttr>(At);
624
      return A->clone(C);
625
    }
626
    case attr::HLSLResource: {
627
      const auto *A = cast<HLSLResourceAttr>(At);
628
      return A->clone(C);
629
    }
630
    case attr::HLSLResourceBinding: {
631
      const auto *A = cast<HLSLResourceBindingAttr>(At);
632
      return A->clone(C);
633
    }
634
    case attr::HLSLSV_DispatchThreadID: {
635
      const auto *A = cast<HLSLSV_DispatchThreadIDAttr>(At);
636
      return A->clone(C);
637
    }
638
    case attr::HLSLSV_GroupIndex: {
639
      const auto *A = cast<HLSLSV_GroupIndexAttr>(At);
640
      return A->clone(C);
641
    }
642
    case attr::HLSLShader: {
643
      const auto *A = cast<HLSLShaderAttr>(At);
644
      return A->clone(C);
645
    }
646
    case attr::Hot: {
647
      const auto *A = cast<HotAttr>(At);
648
      return A->clone(C);
649
    }
650
    case attr::IBAction: {
651
      const auto *A = cast<IBActionAttr>(At);
652
      return A->clone(C);
653
    }
654
    case attr::IBOutlet: {
655
      const auto *A = cast<IBOutletAttr>(At);
656
      return A->clone(C);
657
    }
658
    case attr::IBOutletCollection: {
659
      const auto *A = cast<IBOutletCollectionAttr>(At);
660
      return A->clone(C);
661
    }
662
    case attr::IFunc: {
663
      const auto *A = cast<IFuncAttr>(At);
664
      return A->clone(C);
665
    }
666
    case attr::InitPriority: {
667
      const auto *A = cast<InitPriorityAttr>(At);
668
      return A->clone(C);
669
    }
670
    case attr::InitSeg: {
671
      const auto *A = cast<InitSegAttr>(At);
672
      return A->clone(C);
673
    }
674
    case attr::IntelOclBicc: {
675
      const auto *A = cast<IntelOclBiccAttr>(At);
676
      return A->clone(C);
677
    }
678
    case attr::InternalLinkage: {
679
      const auto *A = cast<InternalLinkageAttr>(At);
680
      return A->clone(C);
681
    }
682
    case attr::LTOVisibilityPublic: {
683
      const auto *A = cast<LTOVisibilityPublicAttr>(At);
684
      return A->clone(C);
685
    }
686
    case attr::LayoutVersion: {
687
      const auto *A = cast<LayoutVersionAttr>(At);
688
      return A->clone(C);
689
    }
690
    case attr::Leaf: {
691
      const auto *A = cast<LeafAttr>(At);
692
      return A->clone(C);
693
    }
694
    case attr::LifetimeBound: {
695
      const auto *A = cast<LifetimeBoundAttr>(At);
696
      return A->clone(C);
697
    }
698
    case attr::Likely: {
699
      const auto *A = cast<LikelyAttr>(At);
700
      return A->clone(C);
701
    }
702
    case attr::LoaderUninitialized: {
703
      const auto *A = cast<LoaderUninitializedAttr>(At);
704
      return A->clone(C);
705
    }
706
    case attr::LockReturned: {
707
      const auto *A = cast<LockReturnedAttr>(At);
708
      Expr * tempInstArg;
709
      {
710
        EnterExpressionEvaluationContext Unevaluated(S, Sema::ExpressionEvaluationContext::Unevaluated);
711
        ExprResult Result = S.SubstExpr(A->getArg(), TemplateArgs);
712
        if (Result.isInvalid())
713
          return nullptr;
714
        tempInstArg = Result.get();
715
      }
716
      return new (C) LockReturnedAttr(C, *A, tempInstArg);
717
    }
718
    case attr::LocksExcluded: {
719
      const auto *A = cast<LocksExcludedAttr>(At);
720
      auto *tempInstArgs = new (C, 16) Expr *[A->args_size()];
721
      {
722
        EnterExpressionEvaluationContext Unevaluated(S, Sema::ExpressionEvaluationContext::Unevaluated);
723
        Expr * *TI = tempInstArgs;
724
        Expr * *I = A->args_begin();
725
        Expr * *E = A->args_end();
726
        for (; I != E; ++I, ++TI) {
727
          ExprResult Result = S.SubstExpr(*I, TemplateArgs);
728
          if (Result.isInvalid())
729
            return nullptr;
730
          *TI = Result.get();
731
        }
732
      }
733
      return new (C) LocksExcludedAttr(C, *A, tempInstArgs, A->args_size());
734
    }
735
    case attr::LoopHint: {
736
      const auto *A = cast<LoopHintAttr>(At);
737
      return A->clone(C);
738
    }
739
    case attr::M68kInterrupt: {
740
      const auto *A = cast<M68kInterruptAttr>(At);
741
      return A->clone(C);
742
    }
743
    case attr::MIGServerRoutine: {
744
      const auto *A = cast<MIGServerRoutineAttr>(At);
745
      return A->clone(C);
746
    }
747
    case attr::MSABI: {
748
      const auto *A = cast<MSABIAttr>(At);
749
      return A->clone(C);
750
    }
751
    case attr::MSAllocator: {
752
      const auto *A = cast<MSAllocatorAttr>(At);
753
      return A->clone(C);
754
    }
755
    case attr::MSInheritance: {
756
      const auto *A = cast<MSInheritanceAttr>(At);
757
      return A->clone(C);
758
    }
759
    case attr::MSNoVTable: {
760
      const auto *A = cast<MSNoVTableAttr>(At);
761
      return A->clone(C);
762
    }
763
    case attr::MSP430Interrupt: {
764
      const auto *A = cast<MSP430InterruptAttr>(At);
765
      return A->clone(C);
766
    }
767
    case attr::MSStruct: {
768
      const auto *A = cast<MSStructAttr>(At);
769
      return A->clone(C);
770
    }
771
    case attr::MSVtorDisp: {
772
      const auto *A = cast<MSVtorDispAttr>(At);
773
      return A->clone(C);
774
    }
775
    case attr::MaxFieldAlignment: {
776
      const auto *A = cast<MaxFieldAlignmentAttr>(At);
777
      return A->clone(C);
778
    }
779
    case attr::MayAlias: {
780
      const auto *A = cast<MayAliasAttr>(At);
781
      return A->clone(C);
782
    }
783
    case attr::MaybeUndef: {
784
      const auto *A = cast<MaybeUndefAttr>(At);
785
      return A->clone(C);
786
    }
787
    case attr::MicroMips: {
788
      const auto *A = cast<MicroMipsAttr>(At);
789
      return A->clone(C);
790
    }
791
    case attr::MinSize: {
792
      const auto *A = cast<MinSizeAttr>(At);
793
      return A->clone(C);
794
    }
795
    case attr::MinVectorWidth: {
796
      const auto *A = cast<MinVectorWidthAttr>(At);
797
      return A->clone(C);
798
    }
799
    case attr::Mips16: {
800
      const auto *A = cast<Mips16Attr>(At);
801
      return A->clone(C);
802
    }
803
    case attr::MipsInterrupt: {
804
      const auto *A = cast<MipsInterruptAttr>(At);
805
      return A->clone(C);
806
    }
807
    case attr::MipsLongCall: {
808
      const auto *A = cast<MipsLongCallAttr>(At);
809
      return A->clone(C);
810
    }
811
    case attr::MipsShortCall: {
812
      const auto *A = cast<MipsShortCallAttr>(At);
813
      return A->clone(C);
814
    }
815
    case attr::Mode: {
816
      const auto *A = cast<ModeAttr>(At);
817
      return A->clone(C);
818
    }
819
    case attr::MustTail: {
820
      const auto *A = cast<MustTailAttr>(At);
821
      return A->clone(C);
822
    }
823
    case attr::NSConsumed: {
824
      const auto *A = cast<NSConsumedAttr>(At);
825
      return A->clone(C);
826
    }
827
    case attr::NSConsumesSelf: {
828
      const auto *A = cast<NSConsumesSelfAttr>(At);
829
      return A->clone(C);
830
    }
831
    case attr::NSErrorDomain: {
832
      const auto *A = cast<NSErrorDomainAttr>(At);
833
      return A->clone(C);
834
    }
835
    case attr::NSReturnsAutoreleased: {
836
      const auto *A = cast<NSReturnsAutoreleasedAttr>(At);
837
      return A->clone(C);
838
    }
839
    case attr::NSReturnsNotRetained: {
840
      const auto *A = cast<NSReturnsNotRetainedAttr>(At);
841
      return A->clone(C);
842
    }
843
    case attr::NSReturnsRetained: {
844
      const auto *A = cast<NSReturnsRetainedAttr>(At);
845
      return A->clone(C);
846
    }
847
    case attr::Naked: {
848
      const auto *A = cast<NakedAttr>(At);
849
      return A->clone(C);
850
    }
851
    case attr::NoAlias: {
852
      const auto *A = cast<NoAliasAttr>(At);
853
      return A->clone(C);
854
    }
855
    case attr::NoBuiltin: {
856
      const auto *A = cast<NoBuiltinAttr>(At);
857
      return A->clone(C);
858
    }
859
    case attr::NoCommon: {
860
      const auto *A = cast<NoCommonAttr>(At);
861
      return A->clone(C);
862
    }
863
    case attr::NoDebug: {
864
      const auto *A = cast<NoDebugAttr>(At);
865
      return A->clone(C);
866
    }
867
    case attr::NoDeref: {
868
      const auto *A = cast<NoDerefAttr>(At);
869
      return A->clone(C);
870
    }
871
    case attr::NoDestroy: {
872
      const auto *A = cast<NoDestroyAttr>(At);
873
      return A->clone(C);
874
    }
875
    case attr::NoDuplicate: {
876
      const auto *A = cast<NoDuplicateAttr>(At);
877
      return A->clone(C);
878
    }
879
    case attr::NoEscape: {
880
      const auto *A = cast<NoEscapeAttr>(At);
881
      return A->clone(C);
882
    }
883
    case attr::NoInline: {
884
      const auto *A = cast<NoInlineAttr>(At);
885
      return A->clone(C);
886
    }
887
    case attr::NoInstrumentFunction: {
888
      const auto *A = cast<NoInstrumentFunctionAttr>(At);
889
      return A->clone(C);
890
    }
891
    case attr::NoMerge: {
892
      const auto *A = cast<NoMergeAttr>(At);
893
      return A->clone(C);
894
    }
895
    case attr::NoMicroMips: {
896
      const auto *A = cast<NoMicroMipsAttr>(At);
897
      return A->clone(C);
898
    }
899
    case attr::NoMips16: {
900
      const auto *A = cast<NoMips16Attr>(At);
901
      return A->clone(C);
902
    }
903
    case attr::NoProfileFunction: {
904
      const auto *A = cast<NoProfileFunctionAttr>(At);
905
      return A->clone(C);
906
    }
907
    case attr::NoRandomizeLayout: {
908
      const auto *A = cast<NoRandomizeLayoutAttr>(At);
909
      return A->clone(C);
910
    }
911
    case attr::NoReturn: {
912
      const auto *A = cast<NoReturnAttr>(At);
913
      return A->clone(C);
914
    }
915
    case attr::NoSanitize: {
916
      const auto *A = cast<NoSanitizeAttr>(At);
917
      return A->clone(C);
918
    }
919
    case attr::NoSpeculativeLoadHardening: {
920
      const auto *A = cast<NoSpeculativeLoadHardeningAttr>(At);
921
      return A->clone(C);
922
    }
923
    case attr::NoSplitStack: {
924
      const auto *A = cast<NoSplitStackAttr>(At);
925
      return A->clone(C);
926
    }
927
    case attr::NoStackProtector: {
928
      const auto *A = cast<NoStackProtectorAttr>(At);
929
      return A->clone(C);
930
    }
931
    case attr::NoThreadSafetyAnalysis: {
932
      const auto *A = cast<NoThreadSafetyAnalysisAttr>(At);
933
      return A->clone(C);
934
    }
935
    case attr::NoThrow: {
936
      const auto *A = cast<NoThrowAttr>(At);
937
      return A->clone(C);
938
    }
939
    case attr::NoUniqueAddress: {
940
      const auto *A = cast<NoUniqueAddressAttr>(At);
941
      return A->clone(C);
942
    }
943
    case attr::NoUwtable: {
944
      const auto *A = cast<NoUwtableAttr>(At);
945
      return A->clone(C);
946
    }
947
    case attr::NonNull: {
948
      const auto *A = cast<NonNullAttr>(At);
949
      return A->clone(C);
950
    }
951
    case attr::NotTailCalled: {
952
      const auto *A = cast<NotTailCalledAttr>(At);
953
      return A->clone(C);
954
    }
955
    case attr::OMPAllocateDecl: {
956
      const auto *A = cast<OMPAllocateDeclAttr>(At);
957
      return A->clone(C);
958
    }
959
    case attr::OMPCaptureKind: {
960
      const auto *A = cast<OMPCaptureKindAttr>(At);
961
      return A->clone(C);
962
    }
963
    case attr::OMPCaptureNoInit: {
964
      const auto *A = cast<OMPCaptureNoInitAttr>(At);
965
      return A->clone(C);
966
    }
967
    case attr::OMPDeclareSimdDecl: {
968
      const auto *A = cast<OMPDeclareSimdDeclAttr>(At);
969
      return A->clone(C);
970
    }
971
    case attr::OMPDeclareTargetDecl: {
972
      const auto *A = cast<OMPDeclareTargetDeclAttr>(At);
973
      return A->clone(C);
974
    }
975
    case attr::OMPDeclareVariant: {
976
      const auto *A = cast<OMPDeclareVariantAttr>(At);
977
      return A->clone(C);
978
    }
979
    case attr::OMPReferencedVar: {
980
      const auto *A = cast<OMPReferencedVarAttr>(At);
981
      return A->clone(C);
982
    }
983
    case attr::OMPThreadPrivateDecl: {
984
      const auto *A = cast<OMPThreadPrivateDeclAttr>(At);
985
      return A->clone(C);
986
    }
987
    case attr::OSConsumed: {
988
      const auto *A = cast<OSConsumedAttr>(At);
989
      return A->clone(C);
990
    }
991
    case attr::OSConsumesThis: {
992
      const auto *A = cast<OSConsumesThisAttr>(At);
993
      return A->clone(C);
994
    }
995
    case attr::OSReturnsNotRetained: {
996
      const auto *A = cast<OSReturnsNotRetainedAttr>(At);
997
      return A->clone(C);
998
    }
999
    case attr::OSReturnsRetained: {
1000
      const auto *A = cast<OSReturnsRetainedAttr>(At);
1001
      return A->clone(C);
1002
    }
1003
    case attr::OSReturnsRetainedOnNonZero: {
1004
      const auto *A = cast<OSReturnsRetainedOnNonZeroAttr>(At);
1005
      return A->clone(C);
1006
    }
1007
    case attr::OSReturnsRetainedOnZero: {
1008
      const auto *A = cast<OSReturnsRetainedOnZeroAttr>(At);
1009
      return A->clone(C);
1010
    }
1011
    case attr::ObjCBoxable: {
1012
      const auto *A = cast<ObjCBoxableAttr>(At);
1013
      return A->clone(C);
1014
    }
1015
    case attr::ObjCBridge: {
1016
      const auto *A = cast<ObjCBridgeAttr>(At);
1017
      return A->clone(C);
1018
    }
1019
    case attr::ObjCBridgeMutable: {
1020
      const auto *A = cast<ObjCBridgeMutableAttr>(At);
1021
      return A->clone(C);
1022
    }
1023
    case attr::ObjCBridgeRelated: {
1024
      const auto *A = cast<ObjCBridgeRelatedAttr>(At);
1025
      return A->clone(C);
1026
    }
1027
    case attr::ObjCClassStub: {
1028
      const auto *A = cast<ObjCClassStubAttr>(At);
1029
      return A->clone(C);
1030
    }
1031
    case attr::ObjCDesignatedInitializer: {
1032
      const auto *A = cast<ObjCDesignatedInitializerAttr>(At);
1033
      return A->clone(C);
1034
    }
1035
    case attr::ObjCDirect: {
1036
      const auto *A = cast<ObjCDirectAttr>(At);
1037
      return A->clone(C);
1038
    }
1039
    case attr::ObjCDirectMembers: {
1040
      const auto *A = cast<ObjCDirectMembersAttr>(At);
1041
      return A->clone(C);
1042
    }
1043
    case attr::ObjCException: {
1044
      const auto *A = cast<ObjCExceptionAttr>(At);
1045
      return A->clone(C);
1046
    }
1047
    case attr::ObjCExplicitProtocolImpl: {
1048
      const auto *A = cast<ObjCExplicitProtocolImplAttr>(At);
1049
      return A->clone(C);
1050
    }
1051
    case attr::ObjCExternallyRetained: {
1052
      const auto *A = cast<ObjCExternallyRetainedAttr>(At);
1053
      return A->clone(C);
1054
    }
1055
    case attr::ObjCGC: {
1056
      const auto *A = cast<ObjCGCAttr>(At);
1057
      return A->clone(C);
1058
    }
1059
    case attr::ObjCIndependentClass: {
1060
      const auto *A = cast<ObjCIndependentClassAttr>(At);
1061
      return A->clone(C);
1062
    }
1063
    case attr::ObjCInertUnsafeUnretained: {
1064
      const auto *A = cast<ObjCInertUnsafeUnretainedAttr>(At);
1065
      return A->clone(C);
1066
    }
1067
    case attr::ObjCKindOf: {
1068
      const auto *A = cast<ObjCKindOfAttr>(At);
1069
      return A->clone(C);
1070
    }
1071
    case attr::ObjCMethodFamily: {
1072
      const auto *A = cast<ObjCMethodFamilyAttr>(At);
1073
      return A->clone(C);
1074
    }
1075
    case attr::ObjCNSObject: {
1076
      const auto *A = cast<ObjCNSObjectAttr>(At);
1077
      return A->clone(C);
1078
    }
1079
    case attr::ObjCNonLazyClass: {
1080
      const auto *A = cast<ObjCNonLazyClassAttr>(At);
1081
      return A->clone(C);
1082
    }
1083
    case attr::ObjCNonRuntimeProtocol: {
1084
      const auto *A = cast<ObjCNonRuntimeProtocolAttr>(At);
1085
      return A->clone(C);
1086
    }
1087
    case attr::ObjCOwnership: {
1088
      const auto *A = cast<ObjCOwnershipAttr>(At);
1089
      return A->clone(C);
1090
    }
1091
    case attr::ObjCPreciseLifetime: {
1092
      const auto *A = cast<ObjCPreciseLifetimeAttr>(At);
1093
      return A->clone(C);
1094
    }
1095
    case attr::ObjCRequiresPropertyDefs: {
1096
      const auto *A = cast<ObjCRequiresPropertyDefsAttr>(At);
1097
      return A->clone(C);
1098
    }
1099
    case attr::ObjCRequiresSuper: {
1100
      const auto *A = cast<ObjCRequiresSuperAttr>(At);
1101
      return A->clone(C);
1102
    }
1103
    case attr::ObjCReturnsInnerPointer: {
1104
      const auto *A = cast<ObjCReturnsInnerPointerAttr>(At);
1105
      return A->clone(C);
1106
    }
1107
    case attr::ObjCRootClass: {
1108
      const auto *A = cast<ObjCRootClassAttr>(At);
1109
      return A->clone(C);
1110
    }
1111
    case attr::ObjCRuntimeName: {
1112
      const auto *A = cast<ObjCRuntimeNameAttr>(At);
1113
      return A->clone(C);
1114
    }
1115
    case attr::ObjCRuntimeVisible: {
1116
      const auto *A = cast<ObjCRuntimeVisibleAttr>(At);
1117
      return A->clone(C);
1118
    }
1119
    case attr::ObjCSubclassingRestricted: {
1120
      const auto *A = cast<ObjCSubclassingRestrictedAttr>(At);
1121
      return A->clone(C);
1122
    }
1123
    case attr::OpenCLAccess: {
1124
      const auto *A = cast<OpenCLAccessAttr>(At);
1125
      return A->clone(C);
1126
    }
1127
    case attr::OpenCLConstantAddressSpace: {
1128
      const auto *A = cast<OpenCLConstantAddressSpaceAttr>(At);
1129
      return A->clone(C);
1130
    }
1131
    case attr::OpenCLGenericAddressSpace: {
1132
      const auto *A = cast<OpenCLGenericAddressSpaceAttr>(At);
1133
      return A->clone(C);
1134
    }
1135
    case attr::OpenCLGlobalAddressSpace: {
1136
      const auto *A = cast<OpenCLGlobalAddressSpaceAttr>(At);
1137
      return A->clone(C);
1138
    }
1139
    case attr::OpenCLGlobalDeviceAddressSpace: {
1140
      const auto *A = cast<OpenCLGlobalDeviceAddressSpaceAttr>(At);
1141
      return A->clone(C);
1142
    }
1143
    case attr::OpenCLGlobalHostAddressSpace: {
1144
      const auto *A = cast<OpenCLGlobalHostAddressSpaceAttr>(At);
1145
      return A->clone(C);
1146
    }
1147
    case attr::OpenCLIntelReqdSubGroupSize: {
1148
      const auto *A = cast<OpenCLIntelReqdSubGroupSizeAttr>(At);
1149
      return A->clone(C);
1150
    }
1151
    case attr::OpenCLKernel: {
1152
      const auto *A = cast<OpenCLKernelAttr>(At);
1153
      return A->clone(C);
1154
    }
1155
    case attr::OpenCLLocalAddressSpace: {
1156
      const auto *A = cast<OpenCLLocalAddressSpaceAttr>(At);
1157
      return A->clone(C);
1158
    }
1159
    case attr::OpenCLPrivateAddressSpace: {
1160
      const auto *A = cast<OpenCLPrivateAddressSpaceAttr>(At);
1161
      return A->clone(C);
1162
    }
1163
    case attr::OpenCLUnrollHint: {
1164
      const auto *A = cast<OpenCLUnrollHintAttr>(At);
1165
      return A->clone(C);
1166
    }
1167
    case attr::OptimizeNone: {
1168
      const auto *A = cast<OptimizeNoneAttr>(At);
1169
      return A->clone(C);
1170
    }
1171
    case attr::Overloadable: {
1172
      const auto *A = cast<OverloadableAttr>(At);
1173
      return A->clone(C);
1174
    }
1175
    case attr::Override: {
1176
      const auto *A = cast<OverrideAttr>(At);
1177
      return A->clone(C);
1178
    }
1179
    case attr::Owner: {
1180
      const auto *A = cast<OwnerAttr>(At);
1181
      return A->clone(C);
1182
    }
1183
    case attr::Ownership: {
1184
      const auto *A = cast<OwnershipAttr>(At);
1185
      return A->clone(C);
1186
    }
1187
    case attr::Packed: {
1188
      const auto *A = cast<PackedAttr>(At);
1189
      return A->clone(C);
1190
    }
1191
    case attr::ParamTypestate: {
1192
      const auto *A = cast<ParamTypestateAttr>(At);
1193
      return A->clone(C);
1194
    }
1195
    case attr::Pascal: {
1196
      const auto *A = cast<PascalAttr>(At);
1197
      return A->clone(C);
1198
    }
1199
    case attr::PassObjectSize: {
1200
      const auto *A = cast<PassObjectSizeAttr>(At);
1201
      return A->clone(C);
1202
    }
1203
    case attr::PatchableFunctionEntry: {
1204
      const auto *A = cast<PatchableFunctionEntryAttr>(At);
1205
      return A->clone(C);
1206
    }
1207
    case attr::Pcs: {
1208
      const auto *A = cast<PcsAttr>(At);
1209
      return A->clone(C);
1210
    }
1211
    case attr::Pointer: {
1212
      const auto *A = cast<PointerAttr>(At);
1213
      return A->clone(C);
1214
    }
1215
    case attr::PragmaClangBSSSection: {
1216
      const auto *A = cast<PragmaClangBSSSectionAttr>(At);
1217
      return A->clone(C);
1218
    }
1219
    case attr::PragmaClangDataSection: {
1220
      const auto *A = cast<PragmaClangDataSectionAttr>(At);
1221
      return A->clone(C);
1222
    }
1223
    case attr::PragmaClangRelroSection: {
1224
      const auto *A = cast<PragmaClangRelroSectionAttr>(At);
1225
      return A->clone(C);
1226
    }
1227
    case attr::PragmaClangRodataSection: {
1228
      const auto *A = cast<PragmaClangRodataSectionAttr>(At);
1229
      return A->clone(C);
1230
    }
1231
    case attr::PragmaClangTextSection: {
1232
      const auto *A = cast<PragmaClangTextSectionAttr>(At);
1233
      return A->clone(C);
1234
    }
1235
    case attr::PreferredName: {
1236
      const auto *A = cast<PreferredNameAttr>(At);
1237
      TypeSourceInfo * tempInstTypedefType =
1238
        S.SubstType(A->getTypedefTypeLoc(), TemplateArgs, A->getLoc(), A->getAttrName());
1239
      if (!tempInstTypedefType)
1240
        return nullptr;
1241
      return new (C) PreferredNameAttr(C, *A, tempInstTypedefType);
1242
    }
1243
    case attr::PreserveAll: {
1244
      const auto *A = cast<PreserveAllAttr>(At);
1245
      return A->clone(C);
1246
    }
1247
    case attr::PreserveMost: {
1248
      const auto *A = cast<PreserveMostAttr>(At);
1249
      return A->clone(C);
1250
    }
1251
    case attr::PtGuardedBy: {
1252
      const auto *A = cast<PtGuardedByAttr>(At);
1253
      Expr * tempInstArg;
1254
      {
1255
        EnterExpressionEvaluationContext Unevaluated(S, Sema::ExpressionEvaluationContext::Unevaluated);
1256
        ExprResult Result = S.SubstExpr(A->getArg(), TemplateArgs);
1257
        if (Result.isInvalid())
1258
          return nullptr;
1259
        tempInstArg = Result.get();
1260
      }
1261
      return new (C) PtGuardedByAttr(C, *A, tempInstArg);
1262
    }
1263
    case attr::PtGuardedVar: {
1264
      const auto *A = cast<PtGuardedVarAttr>(At);
1265
      return A->clone(C);
1266
    }
1267
    case attr::Ptr32: {
1268
      const auto *A = cast<Ptr32Attr>(At);
1269
      return A->clone(C);
1270
    }
1271
    case attr::Ptr64: {
1272
      const auto *A = cast<Ptr64Attr>(At);
1273
      return A->clone(C);
1274
    }
1275
    case attr::Pure: {
1276
      const auto *A = cast<PureAttr>(At);
1277
      return A->clone(C);
1278
    }
1279
    case attr::RISCVInterrupt: {
1280
      const auto *A = cast<RISCVInterruptAttr>(At);
1281
      return A->clone(C);
1282
    }
1283
    case attr::RandomizeLayout: {
1284
      const auto *A = cast<RandomizeLayoutAttr>(At);
1285
      return A->clone(C);
1286
    }
1287
    case attr::ReadOnlyPlacement: {
1288
      const auto *A = cast<ReadOnlyPlacementAttr>(At);
1289
      return A->clone(C);
1290
    }
1291
    case attr::RegCall: {
1292
      const auto *A = cast<RegCallAttr>(At);
1293
      return A->clone(C);
1294
    }
1295
    case attr::Reinitializes: {
1296
      const auto *A = cast<ReinitializesAttr>(At);
1297
      return A->clone(C);
1298
    }
1299
    case attr::ReleaseCapability: {
1300
      const auto *A = cast<ReleaseCapabilityAttr>(At);
1301
      auto *tempInstArgs = new (C, 16) Expr *[A->args_size()];
1302
      {
1303
        EnterExpressionEvaluationContext Unevaluated(S, Sema::ExpressionEvaluationContext::Unevaluated);
1304
        Expr * *TI = tempInstArgs;
1305
        Expr * *I = A->args_begin();
1306
        Expr * *E = A->args_end();
1307
        for (; I != E; ++I, ++TI) {
1308
          ExprResult Result = S.SubstExpr(*I, TemplateArgs);
1309
          if (Result.isInvalid())
1310
            return nullptr;
1311
          *TI = Result.get();
1312
        }
1313
      }
1314
      return new (C) ReleaseCapabilityAttr(C, *A, tempInstArgs, A->args_size());
1315
    }
1316
    case attr::ReleaseHandle: {
1317
      const auto *A = cast<ReleaseHandleAttr>(At);
1318
      return A->clone(C);
1319
    }
1320
    case attr::RenderScriptKernel: {
1321
      const auto *A = cast<RenderScriptKernelAttr>(At);
1322
      return A->clone(C);
1323
    }
1324
    case attr::ReqdWorkGroupSize: {
1325
      const auto *A = cast<ReqdWorkGroupSizeAttr>(At);
1326
      return A->clone(C);
1327
    }
1328
    case attr::RequiresCapability: {
1329
      const auto *A = cast<RequiresCapabilityAttr>(At);
1330
      auto *tempInstArgs = new (C, 16) Expr *[A->args_size()];
1331
      {
1332
        EnterExpressionEvaluationContext Unevaluated(S, Sema::ExpressionEvaluationContext::Unevaluated);
1333
        Expr * *TI = tempInstArgs;
1334
        Expr * *I = A->args_begin();
1335
        Expr * *E = A->args_end();
1336
        for (; I != E; ++I, ++TI) {
1337
          ExprResult Result = S.SubstExpr(*I, TemplateArgs);
1338
          if (Result.isInvalid())
1339
            return nullptr;
1340
          *TI = Result.get();
1341
        }
1342
      }
1343
      return new (C) RequiresCapabilityAttr(C, *A, tempInstArgs, A->args_size());
1344
    }
1345
    case attr::Restrict: {
1346
      const auto *A = cast<RestrictAttr>(At);
1347
      return A->clone(C);
1348
    }
1349
    case attr::Retain: {
1350
      const auto *A = cast<RetainAttr>(At);
1351
      return A->clone(C);
1352
    }
1353
    case attr::ReturnTypestate: {
1354
      const auto *A = cast<ReturnTypestateAttr>(At);
1355
      return A->clone(C);
1356
    }
1357
    case attr::ReturnsNonNull: {
1358
      const auto *A = cast<ReturnsNonNullAttr>(At);
1359
      return A->clone(C);
1360
    }
1361
    case attr::ReturnsTwice: {
1362
      const auto *A = cast<ReturnsTwiceAttr>(At);
1363
      return A->clone(C);
1364
    }
1365
    case attr::SPtr: {
1366
      const auto *A = cast<SPtrAttr>(At);
1367
      return A->clone(C);
1368
    }
1369
    case attr::SYCLKernel: {
1370
      const auto *A = cast<SYCLKernelAttr>(At);
1371
      return A->clone(C);
1372
    }
1373
    case attr::SYCLSpecialClass: {
1374
      const auto *A = cast<SYCLSpecialClassAttr>(At);
1375
      return A->clone(C);
1376
    }
1377
    case attr::ScopedLockable: {
1378
      const auto *A = cast<ScopedLockableAttr>(At);
1379
      return A->clone(C);
1380
    }
1381
    case attr::Section: {
1382
      const auto *A = cast<SectionAttr>(At);
1383
      return A->clone(C);
1384
    }
1385
    case attr::SelectAny: {
1386
      const auto *A = cast<SelectAnyAttr>(At);
1387
      return A->clone(C);
1388
    }
1389
    case attr::Sentinel: {
1390
      const auto *A = cast<SentinelAttr>(At);
1391
      return A->clone(C);
1392
    }
1393
    case attr::SetTypestate: {
1394
      const auto *A = cast<SetTypestateAttr>(At);
1395
      return A->clone(C);
1396
    }
1397
    case attr::SharedTrylockFunction: {
1398
      const auto *A = cast<SharedTrylockFunctionAttr>(At);
1399
      Expr * tempInstSuccessValue;
1400
      {
1401
        EnterExpressionEvaluationContext Unevaluated(S, Sema::ExpressionEvaluationContext::Unevaluated);
1402
        ExprResult Result = S.SubstExpr(A->getSuccessValue(), TemplateArgs);
1403
        if (Result.isInvalid())
1404
          return nullptr;
1405
        tempInstSuccessValue = Result.get();
1406
      }
1407
      auto *tempInstArgs = new (C, 16) Expr *[A->args_size()];
1408
      {
1409
        EnterExpressionEvaluationContext Unevaluated(S, Sema::ExpressionEvaluationContext::Unevaluated);
1410
        Expr * *TI = tempInstArgs;
1411
        Expr * *I = A->args_begin();
1412
        Expr * *E = A->args_end();
1413
        for (; I != E; ++I, ++TI) {
1414
          ExprResult Result = S.SubstExpr(*I, TemplateArgs);
1415
          if (Result.isInvalid())
1416
            return nullptr;
1417
          *TI = Result.get();
1418
        }
1419
      }
1420
      return new (C) SharedTrylockFunctionAttr(C, *A, tempInstSuccessValue, tempInstArgs, A->args_size());
1421
    }
1422
    case attr::SpeculativeLoadHardening: {
1423
      const auto *A = cast<SpeculativeLoadHardeningAttr>(At);
1424
      return A->clone(C);
1425
    }
1426
    case attr::StandaloneDebug: {
1427
      const auto *A = cast<StandaloneDebugAttr>(At);
1428
      return A->clone(C);
1429
    }
1430
    case attr::StdCall: {
1431
      const auto *A = cast<StdCallAttr>(At);
1432
      return A->clone(C);
1433
    }
1434
    case attr::StrictFP: {
1435
      const auto *A = cast<StrictFPAttr>(At);
1436
      return A->clone(C);
1437
    }
1438
    case attr::StrictGuardStackCheck: {
1439
      const auto *A = cast<StrictGuardStackCheckAttr>(At);
1440
      return A->clone(C);
1441
    }
1442
    case attr::Suppress: {
1443
      const auto *A = cast<SuppressAttr>(At);
1444
      return A->clone(C);
1445
    }
1446
    case attr::SwiftAsync: {
1447
      const auto *A = cast<SwiftAsyncAttr>(At);
1448
      return A->clone(C);
1449
    }
1450
    case attr::SwiftAsyncCall: {
1451
      const auto *A = cast<SwiftAsyncCallAttr>(At);
1452
      return A->clone(C);
1453
    }
1454
    case attr::SwiftAsyncContext: {
1455
      const auto *A = cast<SwiftAsyncContextAttr>(At);
1456
      return A->clone(C);
1457
    }
1458
    case attr::SwiftAsyncError: {
1459
      const auto *A = cast<SwiftAsyncErrorAttr>(At);
1460
      return A->clone(C);
1461
    }
1462
    case attr::SwiftAsyncName: {
1463
      const auto *A = cast<SwiftAsyncNameAttr>(At);
1464
      return A->clone(C);
1465
    }
1466
    case attr::SwiftAttr: {
1467
      const auto *A = cast<SwiftAttrAttr>(At);
1468
      return A->clone(C);
1469
    }
1470
    case attr::SwiftBridge: {
1471
      const auto *A = cast<SwiftBridgeAttr>(At);
1472
      return A->clone(C);
1473
    }
1474
    case attr::SwiftBridgedTypedef: {
1475
      const auto *A = cast<SwiftBridgedTypedefAttr>(At);
1476
      return A->clone(C);
1477
    }
1478
    case attr::SwiftCall: {
1479
      const auto *A = cast<SwiftCallAttr>(At);
1480
      return A->clone(C);
1481
    }
1482
    case attr::SwiftContext: {
1483
      const auto *A = cast<SwiftContextAttr>(At);
1484
      return A->clone(C);
1485
    }
1486
    case attr::SwiftError: {
1487
      const auto *A = cast<SwiftErrorAttr>(At);
1488
      return A->clone(C);
1489
    }
1490
    case attr::SwiftErrorResult: {
1491
      const auto *A = cast<SwiftErrorResultAttr>(At);
1492
      return A->clone(C);
1493
    }
1494
    case attr::SwiftIndirectResult: {
1495
      const auto *A = cast<SwiftIndirectResultAttr>(At);
1496
      return A->clone(C);
1497
    }
1498
    case attr::SwiftName: {
1499
      const auto *A = cast<SwiftNameAttr>(At);
1500
      return A->clone(C);
1501
    }
1502
    case attr::SwiftNewType: {
1503
      const auto *A = cast<SwiftNewTypeAttr>(At);
1504
      return A->clone(C);
1505
    }
1506
    case attr::SwiftObjCMembers: {
1507
      const auto *A = cast<SwiftObjCMembersAttr>(At);
1508
      return A->clone(C);
1509
    }
1510
    case attr::SwiftPrivate: {
1511
      const auto *A = cast<SwiftPrivateAttr>(At);
1512
      return A->clone(C);
1513
    }
1514
    case attr::SysVABI: {
1515
      const auto *A = cast<SysVABIAttr>(At);
1516
      return A->clone(C);
1517
    }
1518
    case attr::TLSModel: {
1519
      const auto *A = cast<TLSModelAttr>(At);
1520
      return A->clone(C);
1521
    }
1522
    case attr::Target: {
1523
      const auto *A = cast<TargetAttr>(At);
1524
      return A->clone(C);
1525
    }
1526
    case attr::TargetClones: {
1527
      const auto *A = cast<TargetClonesAttr>(At);
1528
      return A->clone(C);
1529
    }
1530
    case attr::TargetVersion: {
1531
      const auto *A = cast<TargetVersionAttr>(At);
1532
      return A->clone(C);
1533
    }
1534
    case attr::TestTypestate: {
1535
      const auto *A = cast<TestTypestateAttr>(At);
1536
      return A->clone(C);
1537
    }
1538
    case attr::ThisCall: {
1539
      const auto *A = cast<ThisCallAttr>(At);
1540
      return A->clone(C);
1541
    }
1542
    case attr::Thread: {
1543
      const auto *A = cast<ThreadAttr>(At);
1544
      return A->clone(C);
1545
    }
1546
    case attr::TransparentUnion: {
1547
      const auto *A = cast<TransparentUnionAttr>(At);
1548
      return A->clone(C);
1549
    }
1550
    case attr::TrivialABI: {
1551
      const auto *A = cast<TrivialABIAttr>(At);
1552
      return A->clone(C);
1553
    }
1554
    case attr::TryAcquireCapability: {
1555
      const auto *A = cast<TryAcquireCapabilityAttr>(At);
1556
      Expr * tempInstSuccessValue;
1557
      {
1558
        EnterExpressionEvaluationContext Unevaluated(S, Sema::ExpressionEvaluationContext::Unevaluated);
1559
        ExprResult Result = S.SubstExpr(A->getSuccessValue(), TemplateArgs);
1560
        if (Result.isInvalid())
1561
          return nullptr;
1562
        tempInstSuccessValue = Result.get();
1563
      }
1564
      auto *tempInstArgs = new (C, 16) Expr *[A->args_size()];
1565
      {
1566
        EnterExpressionEvaluationContext Unevaluated(S, Sema::ExpressionEvaluationContext::Unevaluated);
1567
        Expr * *TI = tempInstArgs;
1568
        Expr * *I = A->args_begin();
1569
        Expr * *E = A->args_end();
1570
        for (; I != E; ++I, ++TI) {
1571
          ExprResult Result = S.SubstExpr(*I, TemplateArgs);
1572
          if (Result.isInvalid())
1573
            return nullptr;
1574
          *TI = Result.get();
1575
        }
1576
      }
1577
      return new (C) TryAcquireCapabilityAttr(C, *A, tempInstSuccessValue, tempInstArgs, A->args_size());
1578
    }
1579
    case attr::TypeNonNull: {
1580
      const auto *A = cast<TypeNonNullAttr>(At);
1581
      return A->clone(C);
1582
    }
1583
    case attr::TypeNullUnspecified: {
1584
      const auto *A = cast<TypeNullUnspecifiedAttr>(At);
1585
      return A->clone(C);
1586
    }
1587
    case attr::TypeNullable: {
1588
      const auto *A = cast<TypeNullableAttr>(At);
1589
      return A->clone(C);
1590
    }
1591
    case attr::TypeNullableResult: {
1592
      const auto *A = cast<TypeNullableResultAttr>(At);
1593
      return A->clone(C);
1594
    }
1595
    case attr::TypeTagForDatatype: {
1596
      const auto *A = cast<TypeTagForDatatypeAttr>(At);
1597
      return A->clone(C);
1598
    }
1599
    case attr::TypeVisibility: {
1600
      return nullptr;
1601
    }
1602
    case attr::UPtr: {
1603
      const auto *A = cast<UPtrAttr>(At);
1604
      return A->clone(C);
1605
    }
1606
    case attr::Unavailable: {
1607
      const auto *A = cast<UnavailableAttr>(At);
1608
      return A->clone(C);
1609
    }
1610
    case attr::Uninitialized: {
1611
      const auto *A = cast<UninitializedAttr>(At);
1612
      return A->clone(C);
1613
    }
1614
    case attr::Unlikely: {
1615
      const auto *A = cast<UnlikelyAttr>(At);
1616
      return A->clone(C);
1617
    }
1618
    case attr::Unused: {
1619
      const auto *A = cast<UnusedAttr>(At);
1620
      return A->clone(C);
1621
    }
1622
    case attr::UseHandle: {
1623
      const auto *A = cast<UseHandleAttr>(At);
1624
      return A->clone(C);
1625
    }
1626
    case attr::Used: {
1627
      const auto *A = cast<UsedAttr>(At);
1628
      return A->clone(C);
1629
    }
1630
    case attr::UsingIfExists: {
1631
      const auto *A = cast<UsingIfExistsAttr>(At);
1632
      return A->clone(C);
1633
    }
1634
    case attr::Uuid: {
1635
      const auto *A = cast<UuidAttr>(At);
1636
      return A->clone(C);
1637
    }
1638
    case attr::VecReturn: {
1639
      const auto *A = cast<VecReturnAttr>(At);
1640
      return A->clone(C);
1641
    }
1642
    case attr::VecTypeHint: {
1643
      const auto *A = cast<VecTypeHintAttr>(At);
1644
      return A->clone(C);
1645
    }
1646
    case attr::VectorCall: {
1647
      const auto *A = cast<VectorCallAttr>(At);
1648
      return A->clone(C);
1649
    }
1650
    case attr::Visibility: {
1651
      return nullptr;
1652
    }
1653
    case attr::WarnUnused: {
1654
      const auto *A = cast<WarnUnusedAttr>(At);
1655
      return A->clone(C);
1656
    }
1657
    case attr::WarnUnusedResult: {
1658
      const auto *A = cast<WarnUnusedResultAttr>(At);
1659
      return A->clone(C);
1660
    }
1661
    case attr::Weak: {
1662
      const auto *A = cast<WeakAttr>(At);
1663
      return A->clone(C);
1664
    }
1665
    case attr::WeakImport: {
1666
      const auto *A = cast<WeakImportAttr>(At);
1667
      return A->clone(C);
1668
    }
1669
    case attr::WeakRef: {
1670
      const auto *A = cast<WeakRefAttr>(At);
1671
      return A->clone(C);
1672
    }
1673
    case attr::WebAssemblyExportName: {
1674
      const auto *A = cast<WebAssemblyExportNameAttr>(At);
1675
      return A->clone(C);
1676
    }
1677
    case attr::WebAssemblyImportModule: {
1678
      const auto *A = cast<WebAssemblyImportModuleAttr>(At);
1679
      return A->clone(C);
1680
    }
1681
    case attr::WebAssemblyImportName: {
1682
      const auto *A = cast<WebAssemblyImportNameAttr>(At);
1683
      return A->clone(C);
1684
    }
1685
    case attr::WorkGroupSizeHint: {
1686
      const auto *A = cast<WorkGroupSizeHintAttr>(At);
1687
      return A->clone(C);
1688
    }
1689
    case attr::X86ForceAlignArgPointer: {
1690
      const auto *A = cast<X86ForceAlignArgPointerAttr>(At);
1691
      return A->clone(C);
1692
    }
1693
    case attr::XRayInstrument: {
1694
      const auto *A = cast<XRayInstrumentAttr>(At);
1695
      return A->clone(C);
1696
    }
1697
    case attr::XRayLogArgs: {
1698
      const auto *A = cast<XRayLogArgsAttr>(At);
1699
      return A->clone(C);
1700
    }
1701
    case attr::ZeroCallUsedRegs: {
1702
      const auto *A = cast<ZeroCallUsedRegsAttr>(At);
1703
      return A->clone(C);
1704
    }
1705
  } // end switch
1706
  llvm_unreachable("Unknown attribute!");
1707
  return nullptr;
1708
}
1709
 
1710
Attr *instantiateTemplateAttributeForDecl(const Attr *At,
1711
 ASTContext &C, Sema &S,
1712
        const MultiLevelTemplateArgumentList &TemplateArgs) {
1713
  switch (At->getKind()) {
1714
    case attr::AArch64SVEPcs: {
1715
      return nullptr;
1716
    }
1717
    case attr::AArch64VectorPcs: {
1718
      return nullptr;
1719
    }
1720
    case attr::AMDGPUFlatWorkGroupSize: {
1721
      return nullptr;
1722
    }
1723
    case attr::AMDGPUKernelCall: {
1724
      return nullptr;
1725
    }
1726
    case attr::AMDGPUNumSGPR: {
1727
      return nullptr;
1728
    }
1729
    case attr::AMDGPUNumVGPR: {
1730
      return nullptr;
1731
    }
1732
    case attr::AMDGPUWavesPerEU: {
1733
      return nullptr;
1734
    }
1735
    case attr::ARMInterrupt: {
1736
      return nullptr;
1737
    }
1738
    case attr::AVRInterrupt: {
1739
      return nullptr;
1740
    }
1741
    case attr::AVRSignal: {
1742
      return nullptr;
1743
    }
1744
    case attr::AbiTag: {
1745
      const auto *A = cast<AbiTagAttr>(At);
1746
      return A->clone(C);
1747
    }
1748
    case attr::AcquireCapability: {
1749
      return nullptr;
1750
    }
1751
    case attr::AcquireHandle: {
1752
      return nullptr;
1753
    }
1754
    case attr::AcquiredAfter: {
1755
      return nullptr;
1756
    }
1757
    case attr::AcquiredBefore: {
1758
      return nullptr;
1759
    }
1760
    case attr::AddressSpace: {
1761
      return nullptr;
1762
    }
1763
    case attr::Alias: {
1764
      return nullptr;
1765
    }
1766
    case attr::AlignMac68k: {
1767
      return nullptr;
1768
    }
1769
    case attr::AlignNatural: {
1770
      return nullptr;
1771
    }
1772
    case attr::AlignValue: {
1773
      return nullptr;
1774
    }
1775
    case attr::Aligned: {
1776
      return nullptr;
1777
    }
1778
    case attr::AllocAlign: {
1779
      return nullptr;
1780
    }
1781
    case attr::AllocSize: {
1782
      return nullptr;
1783
    }
1784
    case attr::AlwaysDestroy: {
1785
      return nullptr;
1786
    }
1787
    case attr::AlwaysInline: {
1788
      return nullptr;
1789
    }
1790
    case attr::AnalyzerNoReturn: {
1791
      return nullptr;
1792
    }
1793
    case attr::Annotate: {
1794
      return nullptr;
1795
    }
1796
    case attr::AnnotateType: {
1797
      return nullptr;
1798
    }
1799
    case attr::AnyX86Interrupt: {
1800
      return nullptr;
1801
    }
1802
    case attr::AnyX86NoCallerSavedRegisters: {
1803
      return nullptr;
1804
    }
1805
    case attr::AnyX86NoCfCheck: {
1806
      return nullptr;
1807
    }
1808
    case attr::ArcWeakrefUnavailable: {
1809
      return nullptr;
1810
    }
1811
    case attr::ArgumentWithTypeTag: {
1812
      return nullptr;
1813
    }
1814
    case attr::ArmBuiltinAlias: {
1815
      return nullptr;
1816
    }
1817
    case attr::ArmMveStrictPolymorphism: {
1818
      return nullptr;
1819
    }
1820
    case attr::Artificial: {
1821
      return nullptr;
1822
    }
1823
    case attr::AsmLabel: {
1824
      return nullptr;
1825
    }
1826
    case attr::AssertCapability: {
1827
      return nullptr;
1828
    }
1829
    case attr::AssertExclusiveLock: {
1830
      return nullptr;
1831
    }
1832
    case attr::AssertSharedLock: {
1833
      return nullptr;
1834
    }
1835
    case attr::AssumeAligned: {
1836
      return nullptr;
1837
    }
1838
    case attr::Assumption: {
1839
      return nullptr;
1840
    }
1841
    case attr::Availability: {
1842
      return nullptr;
1843
    }
1844
    case attr::BPFPreserveAccessIndex: {
1845
      return nullptr;
1846
    }
1847
    case attr::BTFDeclTag: {
1848
      return nullptr;
1849
    }
1850
    case attr::BTFTypeTag: {
1851
      return nullptr;
1852
    }
1853
    case attr::Blocks: {
1854
      return nullptr;
1855
    }
1856
    case attr::Builtin: {
1857
      return nullptr;
1858
    }
1859
    case attr::BuiltinAlias: {
1860
      return nullptr;
1861
    }
1862
    case attr::C11NoReturn: {
1863
      return nullptr;
1864
    }
1865
    case attr::CDecl: {
1866
      return nullptr;
1867
    }
1868
    case attr::CFAuditedTransfer: {
1869
      return nullptr;
1870
    }
1871
    case attr::CFConsumed: {
1872
      return nullptr;
1873
    }
1874
    case attr::CFGuard: {
1875
      return nullptr;
1876
    }
1877
    case attr::CFICanonicalJumpTable: {
1878
      return nullptr;
1879
    }
1880
    case attr::CFReturnsNotRetained: {
1881
      return nullptr;
1882
    }
1883
    case attr::CFReturnsRetained: {
1884
      return nullptr;
1885
    }
1886
    case attr::CFUnknownTransfer: {
1887
      return nullptr;
1888
    }
1889
    case attr::CPUDispatch: {
1890
      return nullptr;
1891
    }
1892
    case attr::CPUSpecific: {
1893
      return nullptr;
1894
    }
1895
    case attr::CUDAConstant: {
1896
      return nullptr;
1897
    }
1898
    case attr::CUDADevice: {
1899
      return nullptr;
1900
    }
1901
    case attr::CUDADeviceBuiltinSurfaceType: {
1902
      const auto *A = cast<CUDADeviceBuiltinSurfaceTypeAttr>(At);
1903
      return A->clone(C);
1904
    }
1905
    case attr::CUDADeviceBuiltinTextureType: {
1906
      const auto *A = cast<CUDADeviceBuiltinTextureTypeAttr>(At);
1907
      return A->clone(C);
1908
    }
1909
    case attr::CUDAGlobal: {
1910
      return nullptr;
1911
    }
1912
    case attr::CUDAHost: {
1913
      return nullptr;
1914
    }
1915
    case attr::CUDAInvalidTarget: {
1916
      return nullptr;
1917
    }
1918
    case attr::CUDALaunchBounds: {
1919
      return nullptr;
1920
    }
1921
    case attr::CUDAShared: {
1922
      return nullptr;
1923
    }
1924
    case attr::CXX11NoReturn: {
1925
      return nullptr;
1926
    }
1927
    case attr::CallableWhen: {
1928
      return nullptr;
1929
    }
1930
    case attr::Callback: {
1931
      return nullptr;
1932
    }
1933
    case attr::CalledOnce: {
1934
      return nullptr;
1935
    }
1936
    case attr::Capability: {
1937
      return nullptr;
1938
    }
1939
    case attr::CapturedRecord: {
1940
      return nullptr;
1941
    }
1942
    case attr::CarriesDependency: {
1943
      return nullptr;
1944
    }
1945
    case attr::Cleanup: {
1946
      return nullptr;
1947
    }
1948
    case attr::CmseNSCall: {
1949
      return nullptr;
1950
    }
1951
    case attr::CmseNSEntry: {
1952
      return nullptr;
1953
    }
1954
    case attr::CodeSeg: {
1955
      return nullptr;
1956
    }
1957
    case attr::Cold: {
1958
      return nullptr;
1959
    }
1960
    case attr::Common: {
1961
      return nullptr;
1962
    }
1963
    case attr::Const: {
1964
      return nullptr;
1965
    }
1966
    case attr::ConstInit: {
1967
      return nullptr;
1968
    }
1969
    case attr::Constructor: {
1970
      return nullptr;
1971
    }
1972
    case attr::Consumable: {
1973
      return nullptr;
1974
    }
1975
    case attr::ConsumableAutoCast: {
1976
      return nullptr;
1977
    }
1978
    case attr::ConsumableSetOnRead: {
1979
      return nullptr;
1980
    }
1981
    case attr::Convergent: {
1982
      return nullptr;
1983
    }
1984
    case attr::DLLExport: {
1985
      return nullptr;
1986
    }
1987
    case attr::DLLExportStaticLocal: {
1988
      return nullptr;
1989
    }
1990
    case attr::DLLImport: {
1991
      return nullptr;
1992
    }
1993
    case attr::DLLImportStaticLocal: {
1994
      return nullptr;
1995
    }
1996
    case attr::Deprecated: {
1997
      const auto *A = cast<DeprecatedAttr>(At);
1998
      return A->clone(C);
1999
    }
2000
    case attr::Destructor: {
2001
      return nullptr;
2002
    }
2003
    case attr::DiagnoseAsBuiltin: {
2004
      return nullptr;
2005
    }
2006
    case attr::DiagnoseIf: {
2007
      return nullptr;
2008
    }
2009
    case attr::DisableSanitizerInstrumentation: {
2010
      return nullptr;
2011
    }
2012
    case attr::DisableTailCalls: {
2013
      return nullptr;
2014
    }
2015
    case attr::EmptyBases: {
2016
      return nullptr;
2017
    }
2018
    case attr::EnableIf: {
2019
      return nullptr;
2020
    }
2021
    case attr::EnforceTCB: {
2022
      return nullptr;
2023
    }
2024
    case attr::EnforceTCBLeaf: {
2025
      return nullptr;
2026
    }
2027
    case attr::EnumExtensibility: {
2028
      return nullptr;
2029
    }
2030
    case attr::Error: {
2031
      return nullptr;
2032
    }
2033
    case attr::ExcludeFromExplicitInstantiation: {
2034
      const auto *A = cast<ExcludeFromExplicitInstantiationAttr>(At);
2035
      return A->clone(C);
2036
    }
2037
    case attr::ExclusiveTrylockFunction: {
2038
      return nullptr;
2039
    }
2040
    case attr::ExternalSourceSymbol: {
2041
      return nullptr;
2042
    }
2043
    case attr::FallThrough: {
2044
      return nullptr;
2045
    }
2046
    case attr::FastCall: {
2047
      return nullptr;
2048
    }
2049
    case attr::Final: {
2050
      return nullptr;
2051
    }
2052
    case attr::FlagEnum: {
2053
      return nullptr;
2054
    }
2055
    case attr::Flatten: {
2056
      return nullptr;
2057
    }
2058
    case attr::Format: {
2059
      return nullptr;
2060
    }
2061
    case attr::FormatArg: {
2062
      return nullptr;
2063
    }
2064
    case attr::FunctionReturnThunks: {
2065
      return nullptr;
2066
    }
2067
    case attr::GNUInline: {
2068
      return nullptr;
2069
    }
2070
    case attr::GuardedBy: {
2071
      return nullptr;
2072
    }
2073
    case attr::GuardedVar: {
2074
      return nullptr;
2075
    }
2076
    case attr::HIPManaged: {
2077
      return nullptr;
2078
    }
2079
    case attr::HLSLGroupSharedAddressSpace: {
2080
      return nullptr;
2081
    }
2082
    case attr::HLSLNumThreads: {
2083
      return nullptr;
2084
    }
2085
    case attr::HLSLResource: {
2086
      return nullptr;
2087
    }
2088
    case attr::HLSLResourceBinding: {
2089
      return nullptr;
2090
    }
2091
    case attr::HLSLSV_DispatchThreadID: {
2092
      return nullptr;
2093
    }
2094
    case attr::HLSLSV_GroupIndex: {
2095
      return nullptr;
2096
    }
2097
    case attr::HLSLShader: {
2098
      return nullptr;
2099
    }
2100
    case attr::Hot: {
2101
      return nullptr;
2102
    }
2103
    case attr::IBAction: {
2104
      return nullptr;
2105
    }
2106
    case attr::IBOutlet: {
2107
      return nullptr;
2108
    }
2109
    case attr::IBOutletCollection: {
2110
      return nullptr;
2111
    }
2112
    case attr::IFunc: {
2113
      return nullptr;
2114
    }
2115
    case attr::InitPriority: {
2116
      return nullptr;
2117
    }
2118
    case attr::InitSeg: {
2119
      return nullptr;
2120
    }
2121
    case attr::IntelOclBicc: {
2122
      return nullptr;
2123
    }
2124
    case attr::InternalLinkage: {
2125
      return nullptr;
2126
    }
2127
    case attr::LTOVisibilityPublic: {
2128
      return nullptr;
2129
    }
2130
    case attr::LayoutVersion: {
2131
      return nullptr;
2132
    }
2133
    case attr::Leaf: {
2134
      return nullptr;
2135
    }
2136
    case attr::LifetimeBound: {
2137
      return nullptr;
2138
    }
2139
    case attr::Likely: {
2140
      return nullptr;
2141
    }
2142
    case attr::LoaderUninitialized: {
2143
      return nullptr;
2144
    }
2145
    case attr::LockReturned: {
2146
      return nullptr;
2147
    }
2148
    case attr::LocksExcluded: {
2149
      return nullptr;
2150
    }
2151
    case attr::LoopHint: {
2152
      return nullptr;
2153
    }
2154
    case attr::M68kInterrupt: {
2155
      return nullptr;
2156
    }
2157
    case attr::MIGServerRoutine: {
2158
      return nullptr;
2159
    }
2160
    case attr::MSABI: {
2161
      return nullptr;
2162
    }
2163
    case attr::MSAllocator: {
2164
      return nullptr;
2165
    }
2166
    case attr::MSInheritance: {
2167
      return nullptr;
2168
    }
2169
    case attr::MSNoVTable: {
2170
      return nullptr;
2171
    }
2172
    case attr::MSP430Interrupt: {
2173
      return nullptr;
2174
    }
2175
    case attr::MSStruct: {
2176
      return nullptr;
2177
    }
2178
    case attr::MSVtorDisp: {
2179
      return nullptr;
2180
    }
2181
    case attr::MaxFieldAlignment: {
2182
      return nullptr;
2183
    }
2184
    case attr::MayAlias: {
2185
      return nullptr;
2186
    }
2187
    case attr::MaybeUndef: {
2188
      return nullptr;
2189
    }
2190
    case attr::MicroMips: {
2191
      return nullptr;
2192
    }
2193
    case attr::MinSize: {
2194
      return nullptr;
2195
    }
2196
    case attr::MinVectorWidth: {
2197
      return nullptr;
2198
    }
2199
    case attr::Mips16: {
2200
      return nullptr;
2201
    }
2202
    case attr::MipsInterrupt: {
2203
      return nullptr;
2204
    }
2205
    case attr::MipsLongCall: {
2206
      return nullptr;
2207
    }
2208
    case attr::MipsShortCall: {
2209
      return nullptr;
2210
    }
2211
    case attr::Mode: {
2212
      return nullptr;
2213
    }
2214
    case attr::MustTail: {
2215
      return nullptr;
2216
    }
2217
    case attr::NSConsumed: {
2218
      return nullptr;
2219
    }
2220
    case attr::NSConsumesSelf: {
2221
      return nullptr;
2222
    }
2223
    case attr::NSErrorDomain: {
2224
      return nullptr;
2225
    }
2226
    case attr::NSReturnsAutoreleased: {
2227
      return nullptr;
2228
    }
2229
    case attr::NSReturnsNotRetained: {
2230
      return nullptr;
2231
    }
2232
    case attr::NSReturnsRetained: {
2233
      return nullptr;
2234
    }
2235
    case attr::Naked: {
2236
      return nullptr;
2237
    }
2238
    case attr::NoAlias: {
2239
      return nullptr;
2240
    }
2241
    case attr::NoBuiltin: {
2242
      return nullptr;
2243
    }
2244
    case attr::NoCommon: {
2245
      return nullptr;
2246
    }
2247
    case attr::NoDebug: {
2248
      return nullptr;
2249
    }
2250
    case attr::NoDeref: {
2251
      return nullptr;
2252
    }
2253
    case attr::NoDestroy: {
2254
      return nullptr;
2255
    }
2256
    case attr::NoDuplicate: {
2257
      return nullptr;
2258
    }
2259
    case attr::NoEscape: {
2260
      return nullptr;
2261
    }
2262
    case attr::NoInline: {
2263
      return nullptr;
2264
    }
2265
    case attr::NoInstrumentFunction: {
2266
      return nullptr;
2267
    }
2268
    case attr::NoMerge: {
2269
      return nullptr;
2270
    }
2271
    case attr::NoMicroMips: {
2272
      return nullptr;
2273
    }
2274
    case attr::NoMips16: {
2275
      return nullptr;
2276
    }
2277
    case attr::NoProfileFunction: {
2278
      return nullptr;
2279
    }
2280
    case attr::NoRandomizeLayout: {
2281
      return nullptr;
2282
    }
2283
    case attr::NoReturn: {
2284
      return nullptr;
2285
    }
2286
    case attr::NoSanitize: {
2287
      return nullptr;
2288
    }
2289
    case attr::NoSpeculativeLoadHardening: {
2290
      return nullptr;
2291
    }
2292
    case attr::NoSplitStack: {
2293
      return nullptr;
2294
    }
2295
    case attr::NoStackProtector: {
2296
      return nullptr;
2297
    }
2298
    case attr::NoThreadSafetyAnalysis: {
2299
      return nullptr;
2300
    }
2301
    case attr::NoThrow: {
2302
      return nullptr;
2303
    }
2304
    case attr::NoUniqueAddress: {
2305
      return nullptr;
2306
    }
2307
    case attr::NoUwtable: {
2308
      return nullptr;
2309
    }
2310
    case attr::NonNull: {
2311
      return nullptr;
2312
    }
2313
    case attr::NotTailCalled: {
2314
      return nullptr;
2315
    }
2316
    case attr::OMPAllocateDecl: {
2317
      return nullptr;
2318
    }
2319
    case attr::OMPCaptureKind: {
2320
      return nullptr;
2321
    }
2322
    case attr::OMPCaptureNoInit: {
2323
      return nullptr;
2324
    }
2325
    case attr::OMPDeclareSimdDecl: {
2326
      return nullptr;
2327
    }
2328
    case attr::OMPDeclareTargetDecl: {
2329
      return nullptr;
2330
    }
2331
    case attr::OMPDeclareVariant: {
2332
      return nullptr;
2333
    }
2334
    case attr::OMPReferencedVar: {
2335
      return nullptr;
2336
    }
2337
    case attr::OMPThreadPrivateDecl: {
2338
      return nullptr;
2339
    }
2340
    case attr::OSConsumed: {
2341
      return nullptr;
2342
    }
2343
    case attr::OSConsumesThis: {
2344
      return nullptr;
2345
    }
2346
    case attr::OSReturnsNotRetained: {
2347
      return nullptr;
2348
    }
2349
    case attr::OSReturnsRetained: {
2350
      return nullptr;
2351
    }
2352
    case attr::OSReturnsRetainedOnNonZero: {
2353
      return nullptr;
2354
    }
2355
    case attr::OSReturnsRetainedOnZero: {
2356
      return nullptr;
2357
    }
2358
    case attr::ObjCBoxable: {
2359
      return nullptr;
2360
    }
2361
    case attr::ObjCBridge: {
2362
      return nullptr;
2363
    }
2364
    case attr::ObjCBridgeMutable: {
2365
      return nullptr;
2366
    }
2367
    case attr::ObjCBridgeRelated: {
2368
      return nullptr;
2369
    }
2370
    case attr::ObjCClassStub: {
2371
      return nullptr;
2372
    }
2373
    case attr::ObjCDesignatedInitializer: {
2374
      return nullptr;
2375
    }
2376
    case attr::ObjCDirect: {
2377
      return nullptr;
2378
    }
2379
    case attr::ObjCDirectMembers: {
2380
      return nullptr;
2381
    }
2382
    case attr::ObjCException: {
2383
      return nullptr;
2384
    }
2385
    case attr::ObjCExplicitProtocolImpl: {
2386
      return nullptr;
2387
    }
2388
    case attr::ObjCExternallyRetained: {
2389
      return nullptr;
2390
    }
2391
    case attr::ObjCGC: {
2392
      return nullptr;
2393
    }
2394
    case attr::ObjCIndependentClass: {
2395
      return nullptr;
2396
    }
2397
    case attr::ObjCInertUnsafeUnretained: {
2398
      return nullptr;
2399
    }
2400
    case attr::ObjCKindOf: {
2401
      return nullptr;
2402
    }
2403
    case attr::ObjCMethodFamily: {
2404
      return nullptr;
2405
    }
2406
    case attr::ObjCNSObject: {
2407
      return nullptr;
2408
    }
2409
    case attr::ObjCNonLazyClass: {
2410
      return nullptr;
2411
    }
2412
    case attr::ObjCNonRuntimeProtocol: {
2413
      return nullptr;
2414
    }
2415
    case attr::ObjCOwnership: {
2416
      return nullptr;
2417
    }
2418
    case attr::ObjCPreciseLifetime: {
2419
      return nullptr;
2420
    }
2421
    case attr::ObjCRequiresPropertyDefs: {
2422
      return nullptr;
2423
    }
2424
    case attr::ObjCRequiresSuper: {
2425
      return nullptr;
2426
    }
2427
    case attr::ObjCReturnsInnerPointer: {
2428
      return nullptr;
2429
    }
2430
    case attr::ObjCRootClass: {
2431
      return nullptr;
2432
    }
2433
    case attr::ObjCRuntimeName: {
2434
      return nullptr;
2435
    }
2436
    case attr::ObjCRuntimeVisible: {
2437
      return nullptr;
2438
    }
2439
    case attr::ObjCSubclassingRestricted: {
2440
      return nullptr;
2441
    }
2442
    case attr::OpenCLAccess: {
2443
      return nullptr;
2444
    }
2445
    case attr::OpenCLConstantAddressSpace: {
2446
      return nullptr;
2447
    }
2448
    case attr::OpenCLGenericAddressSpace: {
2449
      return nullptr;
2450
    }
2451
    case attr::OpenCLGlobalAddressSpace: {
2452
      return nullptr;
2453
    }
2454
    case attr::OpenCLGlobalDeviceAddressSpace: {
2455
      return nullptr;
2456
    }
2457
    case attr::OpenCLGlobalHostAddressSpace: {
2458
      return nullptr;
2459
    }
2460
    case attr::OpenCLIntelReqdSubGroupSize: {
2461
      return nullptr;
2462
    }
2463
    case attr::OpenCLKernel: {
2464
      return nullptr;
2465
    }
2466
    case attr::OpenCLLocalAddressSpace: {
2467
      return nullptr;
2468
    }
2469
    case attr::OpenCLPrivateAddressSpace: {
2470
      return nullptr;
2471
    }
2472
    case attr::OpenCLUnrollHint: {
2473
      return nullptr;
2474
    }
2475
    case attr::OptimizeNone: {
2476
      return nullptr;
2477
    }
2478
    case attr::Overloadable: {
2479
      return nullptr;
2480
    }
2481
    case attr::Override: {
2482
      return nullptr;
2483
    }
2484
    case attr::Owner: {
2485
      return nullptr;
2486
    }
2487
    case attr::Ownership: {
2488
      return nullptr;
2489
    }
2490
    case attr::Packed: {
2491
      return nullptr;
2492
    }
2493
    case attr::ParamTypestate: {
2494
      return nullptr;
2495
    }
2496
    case attr::Pascal: {
2497
      return nullptr;
2498
    }
2499
    case attr::PassObjectSize: {
2500
      return nullptr;
2501
    }
2502
    case attr::PatchableFunctionEntry: {
2503
      return nullptr;
2504
    }
2505
    case attr::Pcs: {
2506
      return nullptr;
2507
    }
2508
    case attr::Pointer: {
2509
      return nullptr;
2510
    }
2511
    case attr::PragmaClangBSSSection: {
2512
      return nullptr;
2513
    }
2514
    case attr::PragmaClangDataSection: {
2515
      return nullptr;
2516
    }
2517
    case attr::PragmaClangRelroSection: {
2518
      return nullptr;
2519
    }
2520
    case attr::PragmaClangRodataSection: {
2521
      return nullptr;
2522
    }
2523
    case attr::PragmaClangTextSection: {
2524
      return nullptr;
2525
    }
2526
    case attr::PreferredName: {
2527
      const auto *A = cast<PreferredNameAttr>(At);
2528
      TypeSourceInfo * tempInstTypedefType =
2529
        S.SubstType(A->getTypedefTypeLoc(), TemplateArgs, A->getLoc(), A->getAttrName());
2530
      if (!tempInstTypedefType)
2531
        return nullptr;
2532
      return new (C) PreferredNameAttr(C, *A, tempInstTypedefType);
2533
    }
2534
    case attr::PreserveAll: {
2535
      return nullptr;
2536
    }
2537
    case attr::PreserveMost: {
2538
      return nullptr;
2539
    }
2540
    case attr::PtGuardedBy: {
2541
      return nullptr;
2542
    }
2543
    case attr::PtGuardedVar: {
2544
      return nullptr;
2545
    }
2546
    case attr::Ptr32: {
2547
      return nullptr;
2548
    }
2549
    case attr::Ptr64: {
2550
      return nullptr;
2551
    }
2552
    case attr::Pure: {
2553
      return nullptr;
2554
    }
2555
    case attr::RISCVInterrupt: {
2556
      return nullptr;
2557
    }
2558
    case attr::RandomizeLayout: {
2559
      return nullptr;
2560
    }
2561
    case attr::ReadOnlyPlacement: {
2562
      return nullptr;
2563
    }
2564
    case attr::RegCall: {
2565
      return nullptr;
2566
    }
2567
    case attr::Reinitializes: {
2568
      return nullptr;
2569
    }
2570
    case attr::ReleaseCapability: {
2571
      return nullptr;
2572
    }
2573
    case attr::ReleaseHandle: {
2574
      return nullptr;
2575
    }
2576
    case attr::RenderScriptKernel: {
2577
      return nullptr;
2578
    }
2579
    case attr::ReqdWorkGroupSize: {
2580
      return nullptr;
2581
    }
2582
    case attr::RequiresCapability: {
2583
      return nullptr;
2584
    }
2585
    case attr::Restrict: {
2586
      return nullptr;
2587
    }
2588
    case attr::Retain: {
2589
      return nullptr;
2590
    }
2591
    case attr::ReturnTypestate: {
2592
      return nullptr;
2593
    }
2594
    case attr::ReturnsNonNull: {
2595
      return nullptr;
2596
    }
2597
    case attr::ReturnsTwice: {
2598
      return nullptr;
2599
    }
2600
    case attr::SPtr: {
2601
      return nullptr;
2602
    }
2603
    case attr::SYCLKernel: {
2604
      return nullptr;
2605
    }
2606
    case attr::SYCLSpecialClass: {
2607
      return nullptr;
2608
    }
2609
    case attr::ScopedLockable: {
2610
      return nullptr;
2611
    }
2612
    case attr::Section: {
2613
      return nullptr;
2614
    }
2615
    case attr::SelectAny: {
2616
      return nullptr;
2617
    }
2618
    case attr::Sentinel: {
2619
      return nullptr;
2620
    }
2621
    case attr::SetTypestate: {
2622
      return nullptr;
2623
    }
2624
    case attr::SharedTrylockFunction: {
2625
      return nullptr;
2626
    }
2627
    case attr::SpeculativeLoadHardening: {
2628
      return nullptr;
2629
    }
2630
    case attr::StandaloneDebug: {
2631
      return nullptr;
2632
    }
2633
    case attr::StdCall: {
2634
      return nullptr;
2635
    }
2636
    case attr::StrictFP: {
2637
      return nullptr;
2638
    }
2639
    case attr::StrictGuardStackCheck: {
2640
      return nullptr;
2641
    }
2642
    case attr::Suppress: {
2643
      return nullptr;
2644
    }
2645
    case attr::SwiftAsync: {
2646
      return nullptr;
2647
    }
2648
    case attr::SwiftAsyncCall: {
2649
      return nullptr;
2650
    }
2651
    case attr::SwiftAsyncContext: {
2652
      return nullptr;
2653
    }
2654
    case attr::SwiftAsyncError: {
2655
      return nullptr;
2656
    }
2657
    case attr::SwiftAsyncName: {
2658
      return nullptr;
2659
    }
2660
    case attr::SwiftAttr: {
2661
      return nullptr;
2662
    }
2663
    case attr::SwiftBridge: {
2664
      return nullptr;
2665
    }
2666
    case attr::SwiftBridgedTypedef: {
2667
      return nullptr;
2668
    }
2669
    case attr::SwiftCall: {
2670
      return nullptr;
2671
    }
2672
    case attr::SwiftContext: {
2673
      return nullptr;
2674
    }
2675
    case attr::SwiftError: {
2676
      return nullptr;
2677
    }
2678
    case attr::SwiftErrorResult: {
2679
      return nullptr;
2680
    }
2681
    case attr::SwiftIndirectResult: {
2682
      return nullptr;
2683
    }
2684
    case attr::SwiftName: {
2685
      return nullptr;
2686
    }
2687
    case attr::SwiftNewType: {
2688
      return nullptr;
2689
    }
2690
    case attr::SwiftObjCMembers: {
2691
      return nullptr;
2692
    }
2693
    case attr::SwiftPrivate: {
2694
      return nullptr;
2695
    }
2696
    case attr::SysVABI: {
2697
      return nullptr;
2698
    }
2699
    case attr::TLSModel: {
2700
      return nullptr;
2701
    }
2702
    case attr::Target: {
2703
      return nullptr;
2704
    }
2705
    case attr::TargetClones: {
2706
      return nullptr;
2707
    }
2708
    case attr::TargetVersion: {
2709
      return nullptr;
2710
    }
2711
    case attr::TestTypestate: {
2712
      return nullptr;
2713
    }
2714
    case attr::ThisCall: {
2715
      return nullptr;
2716
    }
2717
    case attr::Thread: {
2718
      return nullptr;
2719
    }
2720
    case attr::TransparentUnion: {
2721
      return nullptr;
2722
    }
2723
    case attr::TrivialABI: {
2724
      return nullptr;
2725
    }
2726
    case attr::TryAcquireCapability: {
2727
      return nullptr;
2728
    }
2729
    case attr::TypeNonNull: {
2730
      return nullptr;
2731
    }
2732
    case attr::TypeNullUnspecified: {
2733
      return nullptr;
2734
    }
2735
    case attr::TypeNullable: {
2736
      return nullptr;
2737
    }
2738
    case attr::TypeNullableResult: {
2739
      return nullptr;
2740
    }
2741
    case attr::TypeTagForDatatype: {
2742
      return nullptr;
2743
    }
2744
    case attr::TypeVisibility: {
2745
      return nullptr;
2746
    }
2747
    case attr::UPtr: {
2748
      return nullptr;
2749
    }
2750
    case attr::Unavailable: {
2751
      return nullptr;
2752
    }
2753
    case attr::Uninitialized: {
2754
      return nullptr;
2755
    }
2756
    case attr::Unlikely: {
2757
      return nullptr;
2758
    }
2759
    case attr::Unused: {
2760
      return nullptr;
2761
    }
2762
    case attr::UseHandle: {
2763
      return nullptr;
2764
    }
2765
    case attr::Used: {
2766
      return nullptr;
2767
    }
2768
    case attr::UsingIfExists: {
2769
      return nullptr;
2770
    }
2771
    case attr::Uuid: {
2772
      return nullptr;
2773
    }
2774
    case attr::VecReturn: {
2775
      return nullptr;
2776
    }
2777
    case attr::VecTypeHint: {
2778
      return nullptr;
2779
    }
2780
    case attr::VectorCall: {
2781
      return nullptr;
2782
    }
2783
    case attr::Visibility: {
2784
      return nullptr;
2785
    }
2786
    case attr::WarnUnused: {
2787
      return nullptr;
2788
    }
2789
    case attr::WarnUnusedResult: {
2790
      return nullptr;
2791
    }
2792
    case attr::Weak: {
2793
      return nullptr;
2794
    }
2795
    case attr::WeakImport: {
2796
      return nullptr;
2797
    }
2798
    case attr::WeakRef: {
2799
      return nullptr;
2800
    }
2801
    case attr::WebAssemblyExportName: {
2802
      return nullptr;
2803
    }
2804
    case attr::WebAssemblyImportModule: {
2805
      return nullptr;
2806
    }
2807
    case attr::WebAssemblyImportName: {
2808
      return nullptr;
2809
    }
2810
    case attr::WorkGroupSizeHint: {
2811
      return nullptr;
2812
    }
2813
    case attr::X86ForceAlignArgPointer: {
2814
      return nullptr;
2815
    }
2816
    case attr::XRayInstrument: {
2817
      return nullptr;
2818
    }
2819
    case attr::XRayLogArgs: {
2820
      return nullptr;
2821
    }
2822
    case attr::ZeroCallUsedRegs: {
2823
      return nullptr;
2824
    }
2825
  } // end switch
2826
  llvm_unreachable("Unknown attribute!");
2827
  return nullptr;
2828
}
2829
 
2830
} // end namespace sema
2831
} // end namespace clang