clang: include/clang/AST/Decl.h Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13#ifndef LLVM_CLANG_AST_DECL_H
14#define LLVM_CLANG_AST_DECL_H
15
38#include "llvm/ADT/APSInt.h"
39#include "llvm/ADT/ArrayRef.h"
40#include "llvm/ADT/PointerIntPair.h"
41#include "llvm/ADT/PointerUnion.h"
42#include "llvm/ADT/StringRef.h"
43#include "llvm/ADT/iterator_range.h"
44#include "llvm/BinaryFormat/DXContainer.h"
45#include "llvm/Frontend/HLSL/HLSLRootSignature.h"
46#include "llvm/Support/Casting.h"
47#include "llvm/Support/Compiler.h"
48#include "llvm/Support/TrailingObjects.h"
49#include
50#include
51#include
52#include
53#include
54#include
55
57
84
85
86
90
92
96
98
99 bool isNull() const { return !operator bool(); }
100};
101
102
103class TranslationUnitDecl : public Decl,
107
110 }
111
114 }
115
118 }
119
121
122
123
125
126 explicit TranslationUnitDecl(ASTContext &ctx);
127
128 virtual void anchor();
129
130public:
133
140
142
145
147
148
152 return static_cast<DeclContext *>(const_cast<TranslationUnitDecl*>(D));
153 }
155 return static_cast<TranslationUnitDecl *>(const_cast<DeclContext*>(DC));
156 }
157
158
161};
162
163
164
165class PragmaCommentDecl final
166 : public Decl,
167 private llvm::TrailingObjects<PragmaCommentDecl, char> {
170 friend TrailingObjects;
171
173
176 : Decl(PragmaComment, TU, CommentLoc), CommentKind(CommentKind) {}
177
178 LLVM_DECLARE_VIRTUAL_ANCHOR_FUNCTION();
179
180public:
184 StringRef Arg);
186 unsigned ArgSize);
187
189
190 StringRef getArg() const { return getTrailingObjects(); }
191
192
195};
196
197
198
199class PragmaDetectMismatchDecl final
200 : public Decl,
201 private llvm::TrailingObjects<PragmaDetectMismatchDecl, char> {
204 friend TrailingObjects;
205
206 size_t ValueStart;
207
209 size_t ValueStart)
210 : Decl(PragmaDetectMismatch, TU, Loc), ValueStart(ValueStart) {}
211
212 LLVM_DECLARE_VIRTUAL_ANCHOR_FUNCTION();
213
214public:
218 StringRef Value);
221
222 StringRef getName() const { return getTrailingObjects(); }
223 StringRef getValue() const { return getTrailingObjects() + ValueStart; }
224
225
227 static bool classofKind(Kind K) { return K == PragmaDetectMismatch; }
228};
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
251
252 virtual void anchor();
253
254public:
257
258
262 return static_cast<DeclContext *>(const_cast<ExternCContextDecl*>(D));
263 }
265 return static_cast<ExternCContextDecl *>(const_cast<DeclContext*>(DC));
266 }
267};
268
269
270
271
272
273
275
276
277
279
280 virtual void anchor();
281
282private:
283 NamedDecl *getUnderlyingDeclImpl() LLVM_READONLY;
284
285protected:
287 : Decl(DK, DC, L), Name(N) {}
288
289public:
290
291
292
293
294
296
297
298
299
300
302 assert(Name.isIdentifier() && "Name is not a simple identifier");
304 }
305
306
307
308
309
310
311
312
313
314
315
316
318
319
320
322
323 void printName(raw_ostream &OS) const;
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
341
342
344
345
346
347
348
349
350
351
352
355
356
357
358
359
363
364
366
367
368
369
370
371
372
376
377
378
379
380
381
382
383
384
385
386
388 bool IsKnownNewer = true) const;
389
390
392
395
396
399
400
401
402
405
407 }
408
409
410
412
413
414
416
417
418
419
420
421
423
424
425
427
428
432
436
437
438
442
443
447
448
450
451
453
454
455
457
458
459
460
462 };
463
464
465
466 std::optional
468
469
470
472
473
474
475
476
477
478
482
484
485
486
488
489 if (this->getKind() != UsingShadow &&
490 this->getKind() != ConstructorUsingShadow &&
491 this->getKind() != ObjCCompatibleAlias &&
492 this->getKind() != NamespaceAlias)
493 return this;
494
495 return getUnderlyingDeclImpl();
496 }
500
507
509
511 static bool classofKind(Kind K) { return K >= firstNamed && K <= lastNamed; }
512};
513
518
519
520
521
522
523
526 StringRef MSAsmName;
527 bool MSAsmNameResolved = false;
528
529
530
531
533
536 : NamedDecl(Label, DC, IdentL, II), TheStmt(S), LocStart(StartL) {}
537
538 void anchor() override;
539
540public:
547
550
553
557
563
564
567};
568
569
570
571
572
574protected:
576
577public:
582
585 return K >= firstNamespaceBase && K <= lastNamespaceBase;
586 }
587};
588
589
593
594
596
597
599
600
601 NamespaceDecl *AnonymousNamespace = nullptr;
602
605 IdentifierInfo *Id, NamespaceDecl *PrevDecl, bool Nested);
606
608
612
613public:
616
620 bool Nested);
621
623
626
633
634
635
636
637
638
639
640
641
642
646
647
649
650
652
653
654
655
656
658
659
661
662
665 return false;
667
668
670 return std::distance(X.begin(), X.end()) ==
671 std::distance(Y.begin(), Y.end());
672 }
673
674
678
682
683
686
690
695
696
700 return static_cast<DeclContext *>(const_cast<NamespaceDecl*>(D));
701 }
703 return static_cast<NamespaceDecl *>(const_cast<DeclContext*>(DC));
704 }
705};
706
707class VarDecl;
708
709
710
711
714
715 void anchor() override;
716
717protected:
721
722public:
725
726
727
729
730
731
732
734
735
736
741
742
743
745
746
748 static bool classofKind(Kind K) { return K >= firstValue && K <= lastValue; }
749};
750
751
752
755
756
757
758
759
761
762
763
764
765
766
768
772
773
776};
777
778
779
781
782
783
787 };
788
789 llvm::PointerUnion<TypeSourceInfo *, ExtInfo *> DeclInfo;
790
791
792
794
795 bool hasExtInfo() const { return isa<ExtInfo *>(DeclInfo); }
796 ExtInfo *getExtInfo() { return cast<ExtInfo *>(DeclInfo); }
797 const ExtInfo *getExtInfo() const { return cast<ExtInfo *>(DeclInfo); }
798
799protected:
803 : ValueDecl(DK, DC, L, N, T), DeclInfo(TInfo), InnerLocStart(StartL) {}
804
805public:
808
810 return hasExtInfo() ? getExtInfo()->TInfo
812 }
813
815 if (hasExtInfo())
816 getExtInfo()->TInfo = TI;
817 else
818 DeclInfo = TI;
819 }
820
821
824
825
826
828
830
834
835
836
838 return hasExtInfo() ? getExtInfo()->QualifierLoc.getNestedNameSpecifier()
839 : std::nullopt;
840 }
841
842
843
844
846 return hasExtInfo() ? getExtInfo()->QualifierLoc
848 }
849
851
852
853
854
857 return hasExtInfo() ? getExtInfo()->TrailingRequiresClause : Null;
858 }
859
861
863 return hasExtInfo() ? getExtInfo()->NumTemplParamLists : 0;
864 }
865
868 return getExtInfo()->TemplParamLists[index];
869 }
870
873
876
877
880 return K >= firstDeclarator && K <= lastDeclarator;
881 }
882};
883
884
885
886
888
890
891
893
894
895
896
897
899
900
901
902
903
904
906
907
908
911
914
917
923};
924
925
927public:
928
930
932
933
935
936
938
939
941 };
942
943
945
947
948
950
951
953 };
954
955
956
957
959
960protected:
961
962
963
964
965
966
967
968 using InitType = llvm::PointerUnion<Stmt *, EvaluatedStmt *>;
969
970
971
973
974private:
978
979 class VarDeclBitfields {
982
984 unsigned SClass : 3;
986 unsigned TSCSpec : 2;
988 unsigned InitStyle : 2;
989
990
991
992 LLVM_PREFERRED_TYPE(bool)
993 unsigned ARCPseudoStrong : 1;
994 };
995 enum { NumVarDeclBits = 8 };
996
997protected:
999
1006
1008
1012
1013 LLVM_PREFERRED_TYPE(VarDeclBitfields)
1015
1016
1017
1018 LLVM_PREFERRED_TYPE(bool)
1019 unsigned HasInheritedDefaultArg : 1;
1020
1021
1022
1023
1024
1025 LLVM_PREFERRED_TYPE(DefaultArgKind)
1026 unsigned DefaultArgKind : 2;
1027
1028
1029 LLVM_PREFERRED_TYPE(bool)
1030 unsigned IsKNRPromoted : 1;
1031
1032
1033 LLVM_PREFERRED_TYPE(bool)
1034 unsigned IsObjCMethodParam : 1;
1035
1036
1037
1038
1039
1041
1042
1043
1045 };
1046
1051
1052 LLVM_PREFERRED_TYPE(VarDeclBitfields)
1054
1055
1056
1057
1058 LLVM_PREFERRED_TYPE(bool)
1059 unsigned IsThisDeclarationADemotedDefinition : 1;
1060
1061
1062
1063 LLVM_PREFERRED_TYPE(bool)
1064 unsigned ExceptionVar : 1;
1065
1066
1067
1068
1069 LLVM_PREFERRED_TYPE(bool)
1070 unsigned NRVOVariable : 1;
1071
1072
1073
1074 LLVM_PREFERRED_TYPE(bool)
1075 unsigned CXXForRangeDecl : 1;
1076
1077
1078 LLVM_PREFERRED_TYPE(bool)
1079 unsigned ObjCForDecl : 1;
1080
1081
1082 LLVM_PREFERRED_TYPE(bool)
1083 unsigned IsInline : 1;
1084
1085
1086 LLVM_PREFERRED_TYPE(bool)
1087 unsigned IsInlineSpecified : 1;
1088
1089
1090 LLVM_PREFERRED_TYPE(bool)
1091 unsigned IsConstexpr : 1;
1092
1093
1094
1095 LLVM_PREFERRED_TYPE(bool)
1096 unsigned IsInitCapture : 1;
1097
1098
1099
1100
1101 LLVM_PREFERRED_TYPE(bool)
1102 unsigned PreviousDeclInSameBlockScope : 1;
1103
1104
1105
1106 LLVM_PREFERRED_TYPE(ImplicitParamKind)
1107 unsigned ImplicitParamKind : 3;
1108
1109 LLVM_PREFERRED_TYPE(bool)
1110 unsigned EscapingByref : 1;
1111
1112 LLVM_PREFERRED_TYPE(bool)
1113 unsigned IsCXXCondDecl : 1;
1114
1115
1116
1117 LLVM_PREFERRED_TYPE(bool)
1118 unsigned IsCXXForRangeImplicitVar : 1;
1119 };
1120
1121 union {
1126 };
1127
1131
1133
1137
1141
1145
1146public:
1149
1156
1161
1163
1165
1166
1167
1172
1175 assert(VarDeclBits.TSCSpec == TSC && "truncation");
1176 }
1181
1182
1183
1186
1187
1188
1189
1191 return false;
1192
1194 }
1195
1196
1198 return false;
1199
1200
1201
1202
1204 }
1205
1206
1207
1214
1215
1216
1221
1222
1223
1224
1225
1227
1228
1233
1234
1236
1237
1239
1240
1241
1243
1244
1245
1247
1248
1249
1250
1251
1252
1254 if (getKind() != Decl::Var && getKind() != Decl::Decomposition)
1255 return false;
1257 return DC->getRedeclContext()->isFunctionOrMethod();
1258 return false;
1259 }
1260
1261
1265
1266
1268 if (getKind() != Decl::Var && getKind() != Decl::Decomposition)
1269 return false;
1272 }
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1287
1292
1294
1296
1297
1299
1300
1302 };
1303
1304
1305
1306
1311
1312
1317
1318
1319
1324
1325
1336
1337
1338
1340
1341
1344 if (K == ParmVar || K == ImplicitParam)
1345 return false;
1346
1348 return true;
1349
1351 return true;
1352
1353 return false;
1354 }
1355
1356
1357
1362
1363
1364
1366
1372
1373
1375
1377
1378
1379
1380
1385
1386
1387
1388
1389
1390
1392
1393
1394
1395
1396
1397
1398
1399
1401
1402
1403
1404
1406
1409
1410
1411
1412
1414
1415private:
1417 bool IsConstantInitialization) const;
1418
1419public:
1420
1421
1422
1424
1425
1426
1427
1428
1429
1430
1432
1433
1434
1435
1436
1437
1438
1440
1441
1442
1443
1445
1446
1447
1448
1451
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1469
1470
1474
1475
1480
1481
1482
1483
1484
1485
1491
1492
1493
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1519
1520
1521
1529
1530
1531
1535
1539
1540
1541
1542
1543
1544
1545
1546
1549
1550
1567
1568
1576
1577
1585
1586
1587
1597
1598
1599
1600
1602
1603
1604
1606
1610
1614
1619
1620
1621
1626
1629 "Cannot set IsCXXForRangeImplicitVar on ParmVarDecl");
1631 }
1632
1633
1635
1636
1637
1639
1640
1641
1642
1644
1645
1646
1647
1649
1650
1651
1652
1655
1656
1657
1658
1660
1661
1662
1663
1665
1666
1667
1670
1671
1672
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1688
1690
1691
1692
1693
1695
1696
1697
1699
1700
1701
1703
1704
1705
1706
1707
1708
1709
1711
1712
1713
1714
1715
1717
1718
1720 static bool classofKind(Kind K) { return K >= firstVar && K <= lastVar; }
1721};
1722
1723
1724
1725
1727
1729
1730
1732
1733
1735
1736
1738
1739
1741
1742
1744
1745
1747};
1748
1750 void anchor() override;
1751
1752public:
1753
1759
1761
1770
1778
1779
1783
1784
1786 static bool classofKind(Kind K) { return K == ImplicitParam; }
1787};
1788
1789
1791public:
1794
1795protected:
1799 : VarDecl(DK, C, DC, StartLoc, IdLoc, Id, T, TInfo, S) {
1800 assert(ParmVarDeclBits.HasInheritedDefaultArg == false);
1805 }
1806
1807public:
1812 Expr *DefArg);
1813
1815
1817
1820 setParameterIndex(parameterIndex);
1821 }
1822
1823 void setScopeInfo(unsigned scopeDepth, unsigned parameterIndex) {
1825
1827 assert(ParmVarDeclBits.ScopeDepthOrObjCQuals == scopeDepth
1828 && "truncation!");
1829
1830 setParameterIndex(parameterIndex);
1831 }
1832
1836
1837
1839
1844
1848
1849
1851 return getParameterIndex();
1852 }
1853
1862
1863
1864
1865
1866
1867
1868
1869
1870
1877
1879 return ExplicitObjectParameterIntroducerLoc.isValid();
1880 }
1881
1883 ExplicitObjectParameterIntroducerLoc = Loc;
1884 }
1885
1887 return ExplicitObjectParameterIntroducerLoc;
1888 }
1889
1894
1896
1897
1898
1905
1906
1907
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1922
1926
1927
1928
1929
1930
1934
1938
1942
1944
1945
1946
1947
1948
1950
1951
1953 static bool classofKind(Kind K) { return K == ParmVar; }
1954
1955private:
1957
1959 SourceLocation ExplicitObjectParameterIntroducerLoc;
1960
1961 void setParameterIndex(unsigned parameterIndex) {
1962 if (parameterIndex >= ParameterIndexSentinel) {
1963 setParameterIndexLarge(parameterIndex);
1964 return;
1965 }
1966
1968 assert(ParmVarDeclBits.ParameterIndex == parameterIndex && "truncation!");
1969 }
1970 unsigned getParameterIndex() const {
1972 return d == ParameterIndexSentinel ? getParameterIndexLarge() : d;
1973 }
1974
1975 void setParameterIndexLarge(unsigned parameterIndex);
1976 unsigned getParameterIndexLarge() const;
1977};
1978
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
2001
2002
2003public:
2004
2006
2008
2010
2011
2013
2014
2015
2017
2018
2020
2022
2023 };
2024
2025
2027 : llvm::TrailingObjects<DefaultedOrDeletedFunctionInfo, DeclAccessPair,
2028 StringLiteral *> {
2029 friend TrailingObjects;
2030 unsigned NumLookups;
2031 bool HasDeletedMessage;
2032
2033 size_t numTrailingObjects(OverloadToken) const {
2034 return NumLookups;
2035 }
2036
2037 public:
2041
2042
2043
2045 return getTrailingObjects(NumLookups);
2046 }
2047
2049 return HasDeletedMessage ? *getTrailingObjects<StringLiteral *>()
2050 : nullptr;
2051 }
2052
2054 };
2055
2056private:
2057
2058
2059
2061
2062
2063
2064 union {
2065
2067
2069 };
2070
2072
2073
2074
2075
2076
2077
2078
2079
2081
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2101 TemplateOrSpecialization;
2102
2103
2104
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128 void setFunctionTemplateSpecialization(
2134
2135
2136
2139
2141
2142
2143
2144
2145 bool isDeletedBit() const { return FunctionDeclBits.IsDeleted; }
2146
2147
2148 bool hasODRHash() const { return FunctionDeclBits.HasODRHash; }
2149
2150
2151 void setHasODRHash(bool B = true) { FunctionDeclBits.HasODRHash = B; }
2152
2153protected:
2155 const DeclarationNameInfo &NameInfo, QualType T,
2158 const AssociatedConstraint &TrailingRequiresClause);
2159
2161
2165
2169
2173
2174public:
2177
2180
2187
2199 TrailingRequiresClause);
2200 }
2201
2204 const DeclarationNameInfo &NameInfo, QualType T, TypeSourceInfo *TInfo,
2207 const AssociatedConstraint &TrailingRequiresClause);
2208
2210
2214
2217
2219
2221
2222
2225 if (FPT && FPT->isVariadic())
2228 }
2229
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2252
2257
2258
2259
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2274 bool CheckForPendingFriendDefinition = false) const;
2275
2280
2281
2286 return nullptr;
2287 }
2291
2292
2293
2294
2295
2296
2297
2299
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2319
2320
2321
2322
2324
2325
2330
2336
2339
2340
2342
2343
2347
2348
2350
2351
2352
2355
2356
2360
2361
2365
2372
2373
2374
2375
2376
2379
2382
2383
2384
2387
2388
2392
2393
2397
2401
2404 "Can't set default loc is function isn't explicitly defaulted");
2405 DefaultKWLoc = NewLoc;
2406 }
2407
2408
2409
2411 auto *DeclAsWritten = this;
2413 DeclAsWritten = Pattern;
2414 return !(DeclAsWritten->isDeleted() ||
2415 DeclAsWritten->getCanonicalDecl()->isDefaulted());
2416 }
2417
2424
2425
2426
2427
2431
2432
2433
2434
2438
2439
2440
2441
2442
2446
2447
2451
2452
2456
2457
2458
2462
2463
2464
2468
2469
2485
2489
2493
2495
2496
2497
2498
2500
2501
2502
2503
2504
2505
2506
2510
2511
2512
2516
2517
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2543
2547
2549
2550
2551
2552 bool isMain() const;
2553
2554
2555
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2596 bool *IsNothrow = nullptr) const {
2598 return false;
2600 AlignmentParam, IsNothrow);
2601 }
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2628 bool *IsNothrow = nullptr) const;
2629
2630
2632
2633
2636
2637
2639 1 + 1 + 1;
2640
2641
2643 1 + 1 + 1 +
2644 1;
2645
2646
2649
2651
2652
2654
2655
2656
2658
2659
2660
2662
2663
2664
2666
2667
2669
2670
2671
2673
2674
2675
2677
2678
2683
2684
2687
2688
2692
2693
2694
2698
2699
2700
2705
2706
2711
2712
2713
2715
2716
2717
2718
2720
2721
2722
2723
2725
2726
2728
2729
2730
2732
2733
2734
2736
2737
2738
2740
2741
2742
2744
2745
2746
2747
2748
2749
2750
2751 void
2754 ACs.emplace_back(AC);
2755 }
2756
2757
2763
2765
2770
2771 unsigned getBuiltinID(bool ConsiderWrapperFunctions = false) const;
2772
2773
2780
2781
2784
2791
2792
2793
2794
2796
2798 assert(i < getNumParams() && "Illegal param #");
2799 return ParamInfo[i];
2800 }
2802 assert(i < getNumParams() && "Illegal param #");
2803 return ParamInfo[i];
2804 }
2808
2809
2810
2811
2813
2814
2815
2816
2818
2820
2822
2826
2830
2831
2832
2833
2834
2835
2836
2838
2839
2840
2841
2842
2844
2848
2849
2850
2851
2853
2854
2855
2856
2857
2859
2860
2861
2867
2868
2875
2876
2877
2879
2880
2885
2886
2887
2891
2892
2896
2897
2898
2900
2901
2906
2907
2908
2910
2911
2912
2914
2915
2917
2918
2919
2920
2922
2924
2926
2928
2930
2931
2932
2936
2938
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2963
2964
2966
2967
2968
2969
2971
2972
2973
2976 setInstantiationOfMemberFunction(getASTContext(), FD, TSK);
2977 }
2978
2979
2980
2981
2983
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2999
3001
3002
3003
3005
3006
3007
3008
3010
3011
3012
3013
3015
3016
3017
3019
3020
3021
3022
3023
3024
3025
3026
3027
3030
3031
3032
3033
3034
3035
3037
3038
3039
3040
3041
3042
3044
3045
3046
3047
3048
3049
3050
3051
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3076 void *InsertPos,
3081 InsertPos, TSK, TemplateArgsAsWritten,
3082 PointOfInstantiation);
3083 }
3084
3085
3086
3090
3093
3094
3095
3097
3098
3099
3102
3103
3104
3107
3108
3109
3110
3111
3112
3113
3115
3116
3117
3119
3120
3121
3122
3123
3125
3126
3127
3129
3130
3131
3133
3135
3136
3137
3138 if (const auto *FPT =
3140 return FPT->getFunctionEffects();
3141 return {};
3142 }
3143
3144
3147 return K >= firstFunction && K <= lastFunction;
3148 }
3155
3157};
3158
3159
3161
3162
3163
3164
3165 enum InitStorageKind {
3166
3167
3168
3170
3171
3172
3174
3175
3176
3178
3179
3180
3181 ISK_CapturedVLAType,
3182 };
3183
3184 LLVM_PREFERRED_TYPE(bool)
3185 unsigned BitField : 1;
3186 LLVM_PREFERRED_TYPE(bool)
3187 unsigned Mutable : 1;
3188 LLVM_PREFERRED_TYPE(InitStorageKind)
3189 unsigned StorageKind : 2;
3190 mutable unsigned CachedFieldIndex : 28;
3191
3192
3193
3194 struct InitAndBitWidthStorage {
3197 };
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208 union {
3209
3211
3213
3215
3217 };
3218
3219protected:
3225 Mutable(Mutable), StorageKind((InitStorageKind)InitStyle),
3226 CachedFieldIndex(0), Init() {
3227 if (BW)
3229 }
3230
3231public:
3234
3240
3242
3243
3244
3247 if (Canonical->CachedFieldIndex == 0) {
3248 Canonical->setCachedFieldIndex();
3249 assert(Canonical->CachedFieldIndex != 0);
3250 }
3251 return Canonical->CachedFieldIndex - 1;
3252 }
3253
3254private:
3255
3256 void setCachedFieldIndex() const;
3257
3258public:
3259
3261
3262
3264
3265
3267
3268
3269
3270
3271
3273
3274
3275
3277 if (!BitField)
3278 return nullptr;
3280 }
3281
3282
3283
3284
3286
3287
3288
3289
3290
3292
3293
3294
3297 "bit width or captured type already set");
3298 assert(Width && "no bit width specified");
3302 else
3304 BitField = true;
3305 }
3306
3307
3308
3310 assert(isBitField() && "no bitfield width to remove");
3312
3314 Init = ExistingInit;
3315 }
3316 BitField = false;
3317 }
3318
3319
3320
3321
3323
3324
3325
3326
3328
3329
3330
3332
3333
3335 return (StorageKind == ISK_CapturedVLAType ? ICIS_NoInit
3337 }
3338
3339
3343
3344
3345
3349
3350
3351
3352
3354
3355
3357
3358
3359
3361
3362private:
3363 void setLazyInClassInitializer(LazyDeclStmtPtr NewInit);
3364
3365public:
3366
3369 StorageKind = ISK_NoInit;
3370 if (BitField) {
3371
3373 BitWidth = ExistingBitWidth;
3374 }
3375 }
3376
3377
3378
3380 return StorageKind == ISK_CapturedVLAType;
3381 }
3382
3383
3387
3388
3390
3391
3392
3393
3394
3395
3399
3403
3405
3406
3409
3410
3412 static bool classofKind(Kind K) { return K >= firstField && K <= lastField; }
3413
3415};
3416
3417
3418
3419
3420
3422 public Mergeable,
3424 Stmt *Init;
3425 bool IsUnsigned;
3426
3427protected:
3430 const llvm::APSInt &V);
3431
3432public:
3434
3438 const llvm::APSInt &V);
3440
3444 return llvm::APSInt(getValue(), IsUnsigned);
3445 }
3446
3450 IsUnsigned = V.isUnsigned();
3451 }
3452
3454
3455
3458
3459
3462};
3463
3464
3465
3467 public Mergeable {
3469 unsigned ChainingSize;
3470
3474
3475 void anchor() override;
3476
3477public:
3479
3483
3485
3487
3491
3493
3495 assert(chain().size() >= 2);
3497 }
3498
3500 assert(chain().size() >= 2);
3501 return dyn_cast(chain().front());
3502 }
3503
3506
3507
3510};
3511
3512
3516
3517
3518
3519
3520
3521 mutable const Type *TypeForDecl = nullptr;
3522
3523
3525
3526 void anchor() override;
3527
3528protected:
3531 : NamedDecl(DK, DC, L, Id), LocStart(StartL) {}
3532
3533public:
3534
3535
3536
3537
3540 return TypeForDecl;
3541 }
3544 TypeForDecl = TD;
3545 }
3546
3550 if (LocStart.isValid())
3552 else
3554 }
3555
3556
3558 static bool classofKind(Kind K) { return K >= firstType && K <= lastType; }
3559};
3560
3561
3563 struct alignas(8) ModedTInfo {
3566 };
3567
3568
3569
3570 mutable llvm::PointerIntPair<
3571 llvm::PointerUnion<TypeSourceInfo *, ModedTInfo *>, 2>
3572 MaybeModedTInfo;
3573
3574 void anchor() override;
3575
3576protected:
3581 MaybeModedTInfo(TInfo, 0) {}
3582
3584
3588
3592
3596
3597public:
3600
3607
3611
3616
3622
3624 MaybeModedTInfo.setPointer(newType);
3625 }
3626
3628 MaybeModedTInfo.setPointer(new (getASTContext(), 8)
3629 ModedTInfo({unmodedTSI, modedTy}));
3630 }
3631
3632
3635
3636
3637
3638
3639
3640
3642
3643
3644
3646 if (MaybeModedTInfo.getInt())
3647 return MaybeModedTInfo.getInt() & 0x2;
3648 return isTransparentTagSlow();
3649 }
3650
3651
3654
3655
3658 return K >= firstTypedefName && K <= lastTypedefName;
3659 }
3660
3661private:
3662 bool isTransparentTagSlow() const;
3663};
3664
3665
3666
3672
3673public:
3678
3680
3681
3684};
3685
3686
3687
3689
3691
3697
3698public:
3703
3705
3708
3709
3712};
3713
3714
3718
3719
3720public:
3721
3723
3724private:
3726
3727
3728
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739 llvm::PointerUnion<TypedefNameDecl *, ExtInfo *> TypedefNameDeclOrQualifier;
3740
3741 bool hasExtInfo() const { return isa<ExtInfo *>(TypedefNameDeclOrQualifier); }
3742 ExtInfo *getExtInfo() { return cast<ExtInfo *>(TypedefNameDeclOrQualifier); }
3743 const ExtInfo *getExtInfo() const {
3745 }
3746
3747protected:
3749 SourceLocation L, IdentifierInfo *Id, TagDecl *PrevDecl,
3750 SourceLocation StartL);
3751
3753
3757
3761
3765
3766
3767
3768
3770
3771
3773
3774public:
3777
3780
3787
3790
3791
3792
3794
3795
3796
3799
3802 return const_cast<TagDecl*>(this)->getCanonicalDecl();
3803 }
3804
3805
3806
3810
3811
3813
3814
3818
3819
3820
3822 return TagDeclBits.IsCompleteDefinitionRequired;
3823 }
3824
3825
3826
3830
3831
3833
3834
3835
3839
3840
3841
3843 TagDeclBits.IsEmbeddedInDeclarator = isInDeclarator;
3844 }
3845
3846
3848
3849
3853
3854
3855
3856
3858
3859
3860
3861
3862
3863
3865 return TagDeclBits.IsThisDeclarationADemotedDefinition;
3866 }
3867
3868
3869
3872 "Should demote definitions only, not forward declarations");
3874 TagDeclBits.IsThisDeclarationADemotedDefinition = true;
3875 }
3876
3877
3878
3879
3880
3881
3883
3884
3885
3886
3887
3888
3889
3890
3891
3893
3896 return Def;
3897 return const_cast<TagDecl *>(this);
3898 }
3899
3900
3903 return Def->isBeingDefined();
3904 return false;
3905 }
3906
3910
3914
3916 TagDeclBits.TagDeclKind = llvm::to_underlying(TK);
3917 }
3918
3924
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3947
3949 return hasExtInfo() ? nullptr
3951 }
3952
3954
3955
3956
3958 return hasExtInfo() ? getExtInfo()->QualifierLoc.getNestedNameSpecifier()
3959 : std::nullopt;
3960 }
3961
3962
3963
3964
3966 return hasExtInfo() ? getExtInfo()->QualifierLoc
3968 }
3969
3971
3973 return hasExtInfo() ? getExtInfo()->NumTemplParamLists : 0;
3974 }
3975
3978 return getExtInfo()->TemplParamLists[i];
3979 }
3980
3981
3984
3987
3990
3991
3993 static bool classofKind(Kind K) { return K >= firstTag && K <= lastTag; }
3994
3998
4002};
4003
4004
4005
4006
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025 llvm::PointerUnion<const Type *, TypeSourceInfo *> IntegerType;
4026
4027
4028
4029
4030
4032
4033
4034
4035
4037
4038
4039
4040
4041 unsigned ODRHash;
4042
4043
4044
4045
4047
4050 bool Scoped, bool ScopedUsingClassTag, bool Fixed);
4051
4052 void anchor() override;
4053
4054 void setInstantiationOfMemberEnum(ASTContext &C, EnumDecl *ED,
4056
4057
4058
4059 void setNumPositiveBits(unsigned Num) {
4061 assert(EnumDeclBits.NumPositiveBits == Num && "can't store this bitcount");
4062 }
4063
4064
4065
4066 void setNumNegativeBits(unsigned Num) { EnumDeclBits.NumNegativeBits = Num; }
4067
4068public:
4069
4070
4072
4073
4074
4075
4076
4080
4081
4082
4084
4086
4088
4089private:
4090
4091 bool hasODRHash() const { return EnumDeclBits.HasODRHash; }
4092 void setHasODRHash(bool Hash = true) { EnumDeclBits.HasODRHash = Hash; }
4093
4094public:
4096
4103
4105 return cast_or_null(
4107 }
4111
4118
4122
4126
4130 bool IsScoped, bool IsScopedUsingClassTag,
4131 bool IsFixed);
4133
4134
4135
4137
4138
4139
4140
4141
4142
4145 unsigned NumPositiveBits,
4146 unsigned NumNegativeBits);
4147
4148
4152
4156
4159 if (!E)
4160 E = this;
4162 }
4163
4166 if (!E)
4167 E = this;
4169 }
4170
4171
4173
4174
4176
4177
4178
4179
4181 if (!IntegerType)
4183 if (const Type *T = dyn_cast<const Type *>(IntegerType))
4186 }
4187
4188
4190
4191
4193
4194
4195
4197 return dyn_cast_if_present<TypeSourceInfo *>(IntegerType);
4198 }
4199
4200
4201
4203
4204
4205
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4218
4219
4220
4221
4223
4224
4226
4227
4231
4232
4233
4235
4237
4238
4244
4245
4246
4248
4249
4250
4252
4253
4254
4256
4257
4258
4260
4261
4262
4263
4265
4266
4267
4268
4270
4271
4272
4275
4276
4277
4278
4280 return SpecializationInfo;
4281 }
4282
4283
4284
4287 setInstantiationOfMemberEnum(getASTContext(), ED, TSK);
4288 }
4289
4292};
4293
4294
4295
4296
4297
4299
4301
4302
4303
4304
4305
4306
4307
4308
4310
4311
4312
4313
4315};
4316
4317
4318
4319
4320
4322
4323
4324public:
4327
4328protected:
4332
4333public:
4338
4340 return cast_or_null(
4342 }
4346
4353
4357
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4376
4380
4383
4385
4389
4393
4397
4398
4400 return RecordDeclBits.NonTrivialToPrimitiveDefaultInitialize;
4401 }
4402
4406
4410
4414
4418
4422
4424 return RecordDeclBits.HasNonTrivialToPrimitiveDefaultInitializeCUnion;
4425 }
4426
4428 RecordDeclBits.HasNonTrivialToPrimitiveDefaultInitializeCUnion = V;
4429 }
4430
4432 return RecordDeclBits.HasNonTrivialToPrimitiveDestructCUnion;
4433 }
4434
4438
4442
4446
4450
4454
4455
4456
4457
4461
4466
4470
4474
4478
4480
4482
4484
4485
4486
4488
4489
4490
4492
4493
4494
4496
4497
4498
4499
4500
4501
4502
4503
4504
4508
4512
4513
4514
4515
4517
4518
4519
4520
4522 using field_range = llvm::iterator_range<specific_decl_iterator>;
4523
4526
4530
4531
4535
4536
4540
4541
4542
4543
4547
4552
4553
4557
4558
4560
4563 return K >= firstRecord && K <= lastRecord;
4564 }
4565
4566
4567
4568
4570
4571
4572
4573
4575
4576
4577
4579
4580
4582
4583private:
4584
4585 void LoadFieldsFromExternalStorage() const;
4586
4587
4588 bool hasODRHash() const { return RecordDeclBits.ODRHash; }
4589 void setODRHash(unsigned Hash) { RecordDeclBits.ODRHash = Hash; }
4590};
4591
4592class FileScopeAsmDecl : public Decl {
4593 Expr *AsmString;
4595
4598 : Decl(FileScopeAsm, DC, StartL), AsmString(asmstring), RParenLoc(EndL) {}
4599
4600 virtual void anchor();
4601
4602public:
4606
4608
4615
4619
4621
4624};
4625
4626
4627
4628
4629
4630
4634
4635 Stmt *Statement = nullptr;
4636 bool IsSemiMissing = false;
4637
4639 : Decl(TopLevelStmt, DC, L), DeclContext(TopLevelStmt), Statement(S) {}
4640
4641 virtual void anchor();
4642
4643public:
4646
4652 void setSemiMissing(bool Missing = true) { IsSemiMissing = Missing; }
4653
4656
4658 return static_cast<DeclContext *>(const_cast<TopLevelStmtDecl *>(D));
4659 }
4661 return static_cast<TopLevelStmtDecl *>(const_cast<DeclContext *>(DC));
4662 }
4663};
4664
4665
4666
4667
4669
4670
4671public:
4672
4673
4675 enum {
4676 flag_isByRef = 0x1,
4677 flag_isNested = 0x2
4678 };
4679
4680
4681 llvm::PointerIntPair<VarDecl*, 2> VariableAndFlags;
4682
4683
4684
4685
4686 Expr *CopyExpr;
4687
4688 public:
4690 : VariableAndFlags(variable,
4691 (byRef ? flag_isByRef : 0) | (nested ? flag_isNested : 0)),
4692 CopyExpr(copy) {}
4693
4694
4696
4697
4698
4699 bool isByRef() const { return VariableAndFlags.getInt() & flag_isByRef; }
4700
4704
4708
4709
4710
4711 bool isNested() const { return VariableAndFlags.getInt() & flag_isNested; }
4712
4713 bool hasCopyExpr() const { return CopyExpr != nullptr; }
4716 };
4717
4718private:
4719
4720
4721
4723 unsigned NumParams = 0;
4724
4725 Stmt *Body = nullptr;
4727
4728 const Capture *Captures = nullptr;
4729 unsigned NumCaptures = 0;
4730
4731 unsigned ManglingNumber = 0;
4732 Decl *ManglingContextDecl = nullptr;
4733
4734protected:
4736
4737public:
4740
4742
4745
4749
4752
4753
4760
4761
4764
4771
4773
4775 assert(i < getNumParams() && "Illegal param #");
4776 return ParamInfo[i];
4777 }
4779 assert(i < getNumParams() && "Illegal param #");
4780 return ParamInfo[i];
4781 }
4782
4784
4785
4786
4788
4789
4790
4792
4794
4796
4799
4802
4806
4810
4814
4818
4821
4828
4830
4832 bool CapturesCXXThis);
4833
4835
4837
4839 ManglingNumber = Number;
4840 ManglingContextDecl = Ctx;
4841 }
4842
4844
4847 if (const auto *FPT = TSI->getType()->getAs<FunctionProtoType>())
4848 return FPT->getFunctionEffects();
4849 return {};
4850 }
4851
4852
4861};
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872class OutlinedFunctionDecl final
4873 : public Decl,
4875 private llvm::TrailingObjects<OutlinedFunctionDecl, ImplicitParamDecl *> {
4876private:
4877
4878 unsigned NumParams;
4879
4880
4881 llvm::PointerIntPair<Stmt *, 1, bool> BodyAndNothrow;
4882
4883 explicit OutlinedFunctionDecl(DeclContext *DC, unsigned NumParams);
4884
4885 ImplicitParamDecl *const *getParams() const { return getTrailingObjects(); }
4886
4887 ImplicitParamDecl **getParams() { return getTrailingObjects(); }
4888
4889public:
4893
4895 unsigned NumParams);
4896 static OutlinedFunctionDecl *
4898
4901
4903 void setNothrow(bool Nothrow = true);
4904
4906
4908 assert(i < NumParams);
4909 return getParams()[i];
4910 }
4912 assert(i < NumParams);
4913 getParams()[i] = P;
4914 }
4915
4916
4924
4925
4929 return static_cast<DeclContext *>(const_cast<OutlinedFunctionDecl *>(D));
4930 }
4932 return static_cast<OutlinedFunctionDecl *>(const_cast<DeclContext *>(DC));
4933 }
4934};
4935
4936
4937class CapturedDecl final
4938 : public Decl,
4940 private llvm::TrailingObjects<CapturedDecl, ImplicitParamDecl *> {
4941protected:
4943 return NumParams;
4944 }
4945
4946private:
4947
4948 unsigned NumParams;
4949
4950
4951 unsigned ContextParam;
4952
4953
4954 llvm::PointerIntPair<Stmt *, 1, bool> BodyAndNothrow;
4955
4957
4958 ImplicitParamDecl *const *getParams() const { return getTrailingObjects(); }
4959
4960 ImplicitParamDecl **getParams() { return getTrailingObjects(); }
4961
4962public:
4966
4968 unsigned NumParams);
4970 unsigned NumParams);
4971
4974
4976 void setNothrow(bool Nothrow = true);
4977
4979
4981 assert(i < NumParams);
4982 return getParams()[i];
4983 }
4985 assert(i < NumParams);
4986 getParams()[i] = P;
4987 }
4988
4989
4996
4997
4999 assert(ContextParam < NumParams);
5000 return getParam(ContextParam);
5001 }
5003 assert(i < NumParams);
5004 ContextParam = i;
5006 }
5008
5010 using param_range = llvm::iterator_range<param_iterator>;
5011
5012
5014
5016
5017
5021 return static_cast<DeclContext *>(const_cast<CapturedDecl *>(D));
5022 }
5024 return static_cast<CapturedDecl *>(const_cast<DeclContext *>(DC));
5025 }
5026};
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048class ImportDecl final : public Decl,
5049 llvm::TrailingObjects<ImportDecl, SourceLocation> {
5053 friend TrailingObjects;
5054
5055
5056 Module *ImportedModule = nullptr;
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066 llvm::PointerIntPair<ImportDecl *, 1, bool> NextLocalImportAndComplete;
5067
5070
5073
5075
5076 bool isImportComplete() const { return NextLocalImportAndComplete.getInt(); }
5077
5078 void setImportComplete(bool C) { NextLocalImportAndComplete.setInt(C); }
5079
5080
5081
5082 ImportDecl *getNextLocalImport() const {
5083 return NextLocalImportAndComplete.getPointer();
5084 }
5085
5086 void setNextLocalImport(ImportDecl *Import) {
5087 NextLocalImportAndComplete.setPointer(Import);
5088 }
5089
5090public:
5091
5093 SourceLocation StartLoc, Module *Imported,
5094 ArrayRef IdentifierLocs);
5095
5096
5097
5099 SourceLocation StartLoc, Module *Imported,
5100 SourceLocation EndLoc);
5101
5102
5104 unsigned NumLocations);
5105
5106
5108
5109
5110
5111
5112
5113
5115
5117
5120};
5121
5122
5123
5124
5125
5126
5127
5129 LLVM_DECLARE_VIRTUAL_ANCHOR_FUNCTION();
5130
5131private:
5133
5134
5136
5140
5141public:
5145
5149
5150 bool hasBraces() const { return RBraceLoc.isValid(); }
5151
5154 return RBraceLoc;
5155
5156
5158 }
5159
5163
5167 return static_cast<DeclContext *>(const_cast<ExportDecl*>(D));
5168 }
5170 return static_cast<ExportDecl *>(const_cast<DeclContext*>(DC));
5171 }
5172};
5173
5174
5175class EmptyDecl : public Decl {
5177
5178 virtual void anchor();
5179
5180public:
5184
5187};
5188
5189
5191
5193
5195
5197
5198 bool IsCBuffer;
5199
5200
5201 bool HasValidPackoffset;
5202
5204
5205
5206
5207
5208
5210
5214
5216
5217public:
5222 static HLSLBufferDecl *
5226
5239
5240
5244 return static_cast<DeclContext *>(const_cast<HLSLBufferDecl *>(D));
5245 }
5247 return static_cast<HLSLBufferDecl *>(const_cast<DeclContext *>(DC));
5248 }
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5261 llvm::concat_iterator<Decl *const, SmallVector<Decl *>::const_iterator,
5264
5271
5274};
5275
5276class HLSLRootSignatureDecl final
5278 private llvm::TrailingObjects<HLSLRootSignatureDecl,
5279 llvm::hlsl::rootsig::RootElement> {
5280 friend TrailingObjects;
5281
5282 llvm::dxbc::RootSignatureVersion Version;
5283
5284 unsigned NumElems;
5285
5286 llvm::hlsl::rootsig::RootElement *getElems() { return getTrailingObjects(); }
5287
5288 const llvm::hlsl::rootsig::RootElement *getElems() const {
5289 return getTrailingObjects();
5290 }
5291
5293 llvm::dxbc::RootSignatureVersion Version,
5294 unsigned NumElems);
5295
5296public:
5297 static HLSLRootSignatureDecl *
5299 llvm::dxbc::RootSignatureVersion Version,
5301
5304
5305 llvm::dxbc::RootSignatureVersion getVersion() const { return Version; }
5306
5308 return {getElems(), NumElems};
5309 }
5310
5311
5314};
5315
5316
5317
5320 PD.AddTaggedVal(reinterpret_cast<uint64_t>(ND),
5322 return PD;
5323}
5324
5325template<typename decl_type>
5327
5328
5330 "setPreviousDecl on a decl already in a redeclaration chain");
5331
5332 if (PrevDecl) {
5333
5334
5335
5336 First = PrevDecl->getFirstDecl();
5337 assert(First->RedeclLink.isFirst() && "Expected first");
5338 decl_type *MostRecent = First->getNextRedeclaration();
5340
5341
5342
5343 static_cast<decl_type*>(this)->IdentifierNamespace |=
5344 MostRecent->getIdentifierNamespace() &
5346 } else {
5347
5348 First = static_cast<decl_type*>(this);
5349 }
5350
5351
5352 First->RedeclLink.setLatest(static_cast<decl_type*>(this));
5353
5354 assert((static_cast<decl_type*>(this)) ||
5355 cast(static_cast<decl_type*>(this))->isLinkageValid());
5356}
5357
5358
5359
5360
5361
5362
5363
5366 return Def->isComplete();
5368}
5369
5370
5371
5372
5373
5377
5378
5379
5380
5382 return "$ompvariant";
5383}
5384
5385
5386
5388 bool IncludeLocallyStreaming);
5389
5390
5392
5393
5395
5396}
5397
5398#endif
Provides definitions for the various language-specific address spaces.
Defines the Diagnostic-related interfaces.
Defines the clang::IdentifierInfo, clang::IdentifierTable, and clang::Selector interfaces.
static const Decl * getCanonicalDecl(const Decl *D)
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified.
Defines an enumeration for C++ overloaded operators.
Implements a partial diagnostic that can be emitted anwyhere in a DiagnosticBuilder stream.
Defines the clang::SourceLocation class and associated facilities.
Defines various enumerations that describe declaration and type specifiers.
C Language Family Type Representation.
Defines clang::UnsignedOrNone.
Defines the clang::Visibility enumeration and various utility functions.
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
void setValue(const ASTContext &C, const llvm::APInt &Val)
llvm::APInt getValue() const
APValue - This class implements a discriminated union of [uninitialized] [APSInt] [APFloat],...
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
bool isNested() const
Whether this is a nested capture, i.e.
Definition Decl.h:4711
void setCopyExpr(Expr *e)
Definition Decl.h:4715
Expr * getCopyExpr() const
Definition Decl.h:4714
bool isByRef() const
Whether this is a "by ref" capture, i.e.
Definition Decl.h:4699
Capture(VarDecl *variable, bool byRef, bool nested, Expr *copy)
Definition Decl.h:4689
bool isNonEscapingByref() const
Definition Decl.h:4705
VarDecl * getVariable() const
The variable being captured.
Definition Decl.h:4695
bool isEscapingByref() const
Definition Decl.h:4701
bool hasCopyExpr() const
Definition Decl.h:4713
Represents a block literal declaration, which is like an unnamed FunctionDecl.
Definition Decl.h:4668
ParmVarDecl * getParamDecl(unsigned i)
Definition Decl.h:4778
BlockDecl(DeclContext *DC, SourceLocation CaretLoc)
static bool classofKind(Kind K)
Definition Decl.h:4854
CompoundStmt * getCompoundBody() const
Definition Decl.h:4746
static bool classof(const Decl *D)
Definition Decl.h:4853
unsigned getNumParams() const
Definition Decl.h:4772
unsigned getNumCaptures() const
Returns the number of captured variables.
Definition Decl.h:4791
void setParams(ArrayRef< ParmVarDecl * > NewParamInfo)
capture_const_iterator capture_begin() const
Definition Decl.h:4797
bool canAvoidCopyToHeap() const
Definition Decl.h:4822
void setDoesNotEscape(bool B=true)
Definition Decl.h:4820
param_iterator param_end()
Definition Decl.h:4767
capture_const_iterator capture_end() const
Definition Decl.h:4798
ArrayRef< Capture >::const_iterator capture_const_iterator
Definition Decl.h:4793
unsigned getBlockManglingNumber() const
Definition Decl.h:4834
param_const_iterator param_end() const
Definition Decl.h:4769
MutableArrayRef< ParmVarDecl * >::iterator param_iterator
Definition Decl.h:4762
size_t param_size() const
Definition Decl.h:4770
void setCapturesCXXThis(bool B=true)
Definition Decl.h:4801
void setSignatureAsWritten(TypeSourceInfo *Sig)
Definition Decl.h:4750
void setBlockMangling(unsigned Number, Decl *Ctx)
Definition Decl.h:4838
MutableArrayRef< ParmVarDecl * > parameters()
Definition Decl.h:4757
void setCanAvoidCopyToHeap(bool B=true)
Definition Decl.h:4825
param_iterator param_begin()
Definition Decl.h:4766
void setIsConversionFromLambda(bool val=true)
Definition Decl.h:4815
Stmt * getBody() const override
getBody - If this Decl represents a declaration for a body of code, such as a function or method defi...
Definition Decl.h:4747
static DeclContext * castToDeclContext(const BlockDecl *D)
Definition Decl.h:4855
void setBlockMissingReturnType(bool val=true)
Definition Decl.h:4807
FunctionEffectsRef getFunctionEffects() const
Definition Decl.h:4845
ArrayRef< Capture > captures() const
Definition Decl.h:4795
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
static BlockDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
void setIsVariadic(bool value)
Definition Decl.h:4744
bool param_empty() const
Definition Decl.h:4765
bool blockMissingReturnType() const
Definition Decl.h:4803
SourceLocation getCaretLocation() const
Definition Decl.h:4741
bool capturesCXXThis() const
Definition Decl.h:4800
bool capturesVariable(const VarDecl *var) const
bool doesNotEscape() const
Definition Decl.h:4819
bool hasCaptures() const
True if this block (or its nested blocks) captures anything of local storage from its enclosing scope...
Definition Decl.h:4787
Decl * getBlockManglingContextDecl() const
Definition Decl.h:4836
ArrayRef< ParmVarDecl * >::const_iterator param_const_iterator
Definition Decl.h:4763
static BlockDecl * castFromDeclContext(const DeclContext *DC)
Definition Decl.h:4858
const ParmVarDecl * getParamDecl(unsigned i) const
Definition Decl.h:4774
void setBody(CompoundStmt *B)
Definition Decl.h:4748
param_const_iterator param_begin() const
Definition Decl.h:4768
bool isConversionFromLambda() const
Definition Decl.h:4811
ArrayRef< ParmVarDecl * > parameters() const
Definition Decl.h:4754
void setCaptures(ASTContext &Context, ArrayRef< Capture > Captures, bool CapturesCXXThis)
bool isVariadic() const
Definition Decl.h:4743
TypeSourceInfo * getSignatureAsWritten() const
Definition Decl.h:4751
Represents a C++ struct/union/class.
Represents the body of a CapturedStmt, and serves as its DeclContext.
Definition Decl.h:4940
unsigned getNumParams() const
Definition Decl.h:4978
static bool classof(const Decl *D)
Definition Decl.h:5018
ImplicitParamDecl *const * param_iterator
Definition Decl.h:5009
ImplicitParamDecl * getContextParam() const
Retrieve the parameter containing captured variables.
Definition Decl.h:4998
ArrayRef< ImplicitParamDecl * > parameters() const
Definition Decl.h:4990
static DeclContext * castToDeclContext(const CapturedDecl *D)
Definition Decl.h:5020
size_t numTrailingObjects(OverloadToken< ImplicitParamDecl >)
Definition Decl.h:4942
static CapturedDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID, unsigned NumParams)
unsigned getContextParamPosition() const
Definition Decl.h:5007
static CapturedDecl * castFromDeclContext(const DeclContext *DC)
Definition Decl.h:5023
static bool classofKind(Kind K)
Definition Decl.h:5019
friend class ASTDeclReader
Definition Decl.h:4963
void setContextParam(unsigned i, ImplicitParamDecl *P)
Definition Decl.h:5002
void setNothrow(bool Nothrow=true)
void setParam(unsigned i, ImplicitParamDecl *P)
Definition Decl.h:4984
friend TrailingObjects
Definition Decl.h:4965
friend class ASTDeclWriter
Definition Decl.h:4964
param_iterator param_end() const
Retrieve an iterator one past the last parameter decl.
Definition Decl.h:5015
MutableArrayRef< ImplicitParamDecl * > parameters()
Definition Decl.h:4993
param_iterator param_begin() const
Retrieve an iterator pointing to the first parameter decl.
Definition Decl.h:5013
llvm::iterator_range< param_iterator > param_range
Definition Decl.h:5010
Stmt * getBody() const override
getBody - If this Decl represents a declaration for a body of code, such as a function or method defi...
ImplicitParamDecl * getParam(unsigned i) const
Definition Decl.h:4980
CharUnits - This is an opaque type for sizes expressed in character units.
CompoundStmt - This represents a group of statements like { stmt stmt }.
decl_iterator - Iterates through the declarations stored within this context.
specific_decl_iterator - Iterates over a subrange of declarations stored in a DeclContext,...
DeclContext - This is used only as base class of specific decl types that can act as declaration cont...
DeclContext * getParent()
getParent - Returns the containing DeclContext.
FunctionDeclBitfields FunctionDeclBits
TagDeclBitfields TagDeclBits
bool isDependentContext() const
Determines whether this context is dependent on a template parameter.
EnumDeclBitfields EnumDeclBits
lookup_result lookup(DeclarationName Name) const
lookup - Find the declarations (if any) with the given Name in this context.
BlockDeclBitfields BlockDeclBits
DeclContext * getRedeclContext()
getRedeclContext - Retrieve the context in which an entity conflicts with other entities of the same ...
RecordDeclBitfields RecordDeclBits
DeclContext(Decl::Kind K)
decl_iterator decls_end() const
NamespaceDeclBitfields NamespaceDeclBits
bool isFunctionOrMethod() const
Decl::Kind getDeclKind() const
DeclContext * getNonTransparentContext()
decl_iterator decls_begin() const
Decl - This represents one declaration (or definition), e.g.
SourceLocation getEndLoc() const LLVM_READONLY
bool isModulePrivate() const
Whether this declaration was marked as being private to the module in which it was defined.
ASTContext & getASTContext() const LLVM_READONLY
friend class Redeclarable
virtual Decl * getPreviousDeclImpl()
Implementation of getPreviousDecl(), to be overridden by any subclass that has a redeclaration chain.
bool hasCachedLinkage() const
Kind
Lists the kind of concrete classes of Decl.
ObjCDeclQualifier
ObjCDeclQualifier - 'Qualifiers' written next to the return and parameter types in method declaration...
virtual Decl * getNextRedeclarationImpl()
Returns the next redeclaration or itself if this is the only decl.
bool hasDefiningAttr() const
Return true if this declaration has an attribute which acts as definition of the entity,...
SourceLocation getLocation() const
@ IDNS_Ordinary
Ordinary names.
@ IDNS_Type
Types, declared with 'struct foo', typedefs, etc.
@ IDNS_Tag
Tags, declared with 'struct foo;' and referenced with 'struct foo'.
void setImplicit(bool I=true)
DeclContext * getDeclContext()
virtual Decl * getMostRecentDeclImpl()
Implementation of getMostRecentDecl(), to be overridden by any subclass that has a redeclaration chai...
void setModulePrivate()
Specify that this declaration was marked as being private to the module in which it was defined.
void setDeclContext(DeclContext *DC)
setDeclContext - Set both the semantic and lexical DeclContext to DC.
Module * getOwningModuleForLinkage() const
Get the module that owns this declaration for linkage purposes.
DeclContext * getLexicalDeclContext()
getLexicalDeclContext - The declaration context where this Decl was lexically declared (LexicalDC).
DeclarationNameLoc - Additional source/type location info for a declaration name.
The name of a declaration.
SourceLocation getTypeSpecEndLoc() const
SourceLocation getInnerLocStart() const
Return start of source range ignoring outer template declarations.
Definition Decl.h:822
TemplateParameterList * getTemplateParameterList(unsigned index) const
Definition Decl.h:866
static bool classofKind(Kind K)
Definition Decl.h:879
void setInnerLocStart(SourceLocation L)
Definition Decl.h:823
SourceLocation getOuterLocStart() const
Return start of source range taking into account any outer template declarations.
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
friend class ASTDeclReader
Definition Decl.h:806
SourceLocation getTypeSpecStartLoc() const
SourceLocation getBeginLoc() const LLVM_READONLY
Definition Decl.h:831
const AssociatedConstraint & getTrailingRequiresClause() const
Get the constraint-expression introduced by the trailing requires-clause in the function/member decla...
Definition Decl.h:855
unsigned getNumTemplateParameterLists() const
Definition Decl.h:862
void setTypeSourceInfo(TypeSourceInfo *TI)
Definition Decl.h:814
DeclaratorDecl(Kind DK, DeclContext *DC, SourceLocation L, DeclarationName N, QualType T, TypeSourceInfo *TInfo, SourceLocation StartL)
Definition Decl.h:800
void setQualifierInfo(NestedNameSpecifierLoc QualifierLoc)
void setTrailingRequiresClause(const AssociatedConstraint &AC)
friend class ASTDeclWriter
Definition Decl.h:807
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier (with source-location information) that qualifies the name of this...
Definition Decl.h:845
static bool classof(const Decl *D)
Definition Decl.h:878
NestedNameSpecifier getQualifier() const
Retrieve the nested-name-specifier that qualifies the name of this declaration, if it was present in ...
Definition Decl.h:837
TypeSourceInfo * getTypeSourceInfo() const
Definition Decl.h:809
void setTemplateParameterListsInfo(ASTContext &Context, ArrayRef< TemplateParameterList * > TPLists)
Provides information about a dependent function-template specialization declaration.
@ ak_nameddecl
NamedDecl *.
static EmptyDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
static bool classof(const Decl *D)
Definition Decl.h:5185
static bool classofKind(Kind K)
Definition Decl.h:5186
An instance of this object exists for each enum constant that is defined.
Definition Decl.h:3423
friend class StmtIteratorBase
Definition Decl.h:3433
EnumConstantDecl(const ASTContext &C, DeclContext *DC, SourceLocation L, IdentifierInfo *Id, QualType T, Expr *E, const llvm::APSInt &V)
static EnumConstantDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
static bool classofKind(Kind K)
Definition Decl.h:3461
const EnumConstantDecl * getCanonicalDecl() const
Definition Decl.h:3457
void setInitExpr(Expr *E)
Definition Decl.h:3447
void setInitVal(const ASTContext &C, const llvm::APSInt &V)
Definition Decl.h:3448
llvm::APSInt getInitVal() const
Definition Decl.h:3443
EnumConstantDecl * getCanonicalDecl() override
Retrieves the canonical declaration of this enumerator.
Definition Decl.h:3456
static bool classof(const Decl *D)
Definition Decl.h:3460
const Expr * getInitExpr() const
Definition Decl.h:3441
Expr * getInitExpr()
Definition Decl.h:3442
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
Represents an enum.
Definition Decl.h:4007
const EnumDecl * getMostRecentDecl() const
Definition Decl.h:4115
MemberSpecializationInfo * getMemberSpecializationInfo() const
If this enumeration is an instantiation of a member enumeration of a class template specialization,...
Definition Decl.h:4279
enumerator_range enumerators() const
Definition Decl.h:4153
void setFixed(bool Fixed=true)
True if this is an Objective-C, C++11, or Microsoft-style enumeration with a fixed underlying type.
Definition Decl.h:4083
bool isScoped() const
Returns true if this is a C++11 scoped enumeration.
Definition Decl.h:4225
unsigned getNumNegativeBits() const
Returns the width in bits required to store all the negative enumerators of this enum.
Definition Decl.h:4217
bool isScopedUsingClassTag() const
Returns true if this is a C++11 scoped enumeration.
Definition Decl.h:4228
void setIntegerType(QualType T)
Set the underlying integer type.
Definition Decl.h:4189
llvm::iterator_range< specific_decl_iterator< EnumConstantDecl > > enumerator_range
Definition Decl.h:4150
void setIntegerTypeSourceInfo(TypeSourceInfo *TInfo)
Set the underlying integer type source info.
Definition Decl.h:4192
enumerator_iterator enumerator_begin() const
Definition Decl.h:4157
bool isComplete() const
Returns true if this can be considered a complete type.
Definition Decl.h:4239
void setInstantiationOfMemberEnum(EnumDecl *ED, TemplateSpecializationKind TSK)
Specify that this enumeration is an instantiation of the member enumeration ED.
Definition Decl.h:4285
const EnumDecl * getCanonicalDecl() const
Definition Decl.h:4100
void setTemplateSpecializationKind(TemplateSpecializationKind TSK, SourceLocation PointOfInstantiation=SourceLocation())
For an enumeration member that was instantiated from a member enumeration of a templated class,...
TypeSourceInfo * getIntegerTypeSourceInfo() const
Return the type source info for the underlying integer type, if no type source info exists,...
Definition Decl.h:4196
friend class ASTDeclReader
Definition Decl.h:4095
static EnumDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
bool isClosedFlag() const
Returns true if this enum is annotated with flag_enum and isn't annotated with enum_extensibility(ope...
EnumDecl * getMostRecentDecl()
Definition Decl.h:4112
EnumDecl * getDefinitionOrSelf() const
Definition Decl.h:4123
void setScoped(bool Scoped=true)
True if this tag declaration is a scoped enumeration.
Definition Decl.h:4071
bool isFixed() const
Returns true if this is an Objective-C, C++11, or Microsoft-style enumeration with a fixed underlying...
Definition Decl.h:4234
SourceRange getIntegerTypeRange() const LLVM_READONLY
Retrieve the source range that covers the underlying type if specified.
void setPromotionType(QualType T)
Set the promotion type.
Definition Decl.h:4175
void setEnumKeyRange(SourceRange Range)
Definition Decl.h:4087
EnumDecl * getPreviousDecl()
Definition Decl.h:4104
SourceRange getSourceRange() const override LLVM_READONLY
Overrides to provide correct range when there's an enum-base specifier with forward declarations.
static bool classofKind(Kind K)
Definition Decl.h:4291
SourceRange getEnumKeyRange() const
Definition Decl.h:4085
static bool classof(const Decl *D)
Definition Decl.h:4290
EnumDecl * getCanonicalDecl() override
Retrieves the "canonical" declaration of the given declaration.
Definition Decl.h:4097
QualType getIntegerType() const
Return the integer type this enum decl corresponds to.
Definition Decl.h:4180
EnumDecl * getInstantiatedFromMemberEnum() const
Returns the enumeration (declared within the template) from which this enumeration type was instantia...
EnumDecl * getDefinition() const
Definition Decl.h:4119
unsigned getNumPositiveBits() const
Returns the width in bits required to store all the non-negative enumerators of this enum.
Definition Decl.h:4206
const EnumDecl * getPreviousDecl() const
Definition Decl.h:4108
specific_decl_iterator< EnumConstantDecl > enumerator_iterator
Definition Decl.h:4149
TemplateSpecializationKind getTemplateSpecializationKind() const
If this enumeration is a member of a specialization of a templated class, determine what kind of temp...
void setScopedUsingClassTag(bool ScopedUCT=true)
If this tag declaration is a scoped enum, then this is true if the scoped enum was declared using the...
Definition Decl.h:4077
bool isClosed() const
Returns true if this enum is either annotated with enum_extensibility(closed) or isn't annotated with...
QualType getPromotionType() const
Return the integer type that enumerators should promote to.
Definition Decl.h:4172
EnumDecl * getTemplateInstantiationPattern() const
Retrieve the enum definition from which this enumeration could be instantiated, if it is an instantia...
bool isClosedNonFlag() const
Returns true if this enum is annotated with neither flag_enum nor enum_extensibility(open).
enumerator_iterator enumerator_end() const
Definition Decl.h:4164
void getValueRange(llvm::APInt &Max, llvm::APInt &Min) const
Calculates the [Min,Max) values the enum can store based on the NumPositiveBits and NumNegativeBits.
Represents a standard C++ module export declaration.
Definition Decl.h:5128
static bool classof(const Decl *D)
Definition Decl.h:5164
SourceLocation getRBraceLoc() const
Definition Decl.h:5147
SourceLocation getEndLoc() const LLVM_READONLY
Definition Decl.h:5152
SourceLocation getExportLoc() const
Definition Decl.h:5146
static bool classofKind(Kind K)
Definition Decl.h:5165
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
Definition Decl.h:5160
void setRBraceLoc(SourceLocation L)
Definition Decl.h:5148
friend class ASTDeclReader
Definition Decl.h:5132
static DeclContext * castToDeclContext(const ExportDecl *D)
Definition Decl.h:5166
static ExportDecl * castFromDeclContext(const DeclContext *DC)
Definition Decl.h:5169
static ExportDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
bool hasBraces() const
Definition Decl.h:5150
This represents one expression.
static DeclContext * castToDeclContext(const ExternCContextDecl *D)
Definition Decl.h:261
static bool classof(const Decl *D)
Definition Decl.h:259
static bool classofKind(Kind K)
Definition Decl.h:260
static ExternCContextDecl * castFromDeclContext(const DeclContext *DC)
Definition Decl.h:264
Represents a member of a struct/union/class.
Definition Decl.h:3160
Expr * BitWidth
Definition Decl.h:3212
bool isMutable() const
Determines whether this field is mutable (C++ only).
Definition Decl.h:3260
Expr * getInClassInitializer() const
Get the C++11 default member initializer for this member, or null if one has not been set.
bool isBitField() const
Determines whether this field is a bitfield.
Definition Decl.h:3263
bool hasInClassInitializer() const
Determine whether this member has a C++11 default member initializer.
Definition Decl.h:3340
FieldDecl(Kind DK, DeclContext *DC, SourceLocation StartLoc, SourceLocation IdLoc, const IdentifierInfo *Id, QualType T, TypeSourceInfo *TInfo, Expr *BW, bool Mutable, InClassInitStyle InitStyle)
Definition Decl.h:3220
LazyDeclStmtPtr Init
Definition Decl.h:3210
unsigned getBitWidthValue() const
Computes the bit width of this field, if this is a bit field.
bool isAnonymousStructOrUnion() const
Determines whether this field is a representative for an anonymous struct or union.
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
void setBitWidth(Expr *Width)
Set the bit-field width for this member.
Definition Decl.h:3295
void removeBitWidth()
Remove the bit-field width from this member.
Definition Decl.h:3309
InClassInitStyle getInClassInitStyle() const
Get the kind of (C++11) default member initializer that this field has.
Definition Decl.h:3334
bool hasConstantIntegerBitWidth() const
Determines whether the bit width of this field is a constant integer.
friend class ASTDeclReader
Definition Decl.h:3232
static FieldDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
void removeInClassInitializer()
Remove the C++11 in-class initializer from this member.
Definition Decl.h:3367
void setInClassInitializer(Expr *NewInit)
Set the C++11 in-class initializer for this member.
unsigned getFieldIndex() const
Returns the index of this field within its record, as appropriate for passing to ASTRecordLayout::get...
Definition Decl.h:3245
const RecordDecl * getParent() const
Returns the parent of this field declaration, which is the struct in which this field is defined.
Definition Decl.h:3396
bool isZeroSize(const ASTContext &Ctx) const
Determine if this field is a subobject of zero size, that is, either a zero-length bit-field or a fie...
InitAndBitWidthStorage * InitAndBitWidth
Definition Decl.h:3214
FieldDecl * getCanonicalDecl() override
Retrieves the canonical declaration of this field.
Definition Decl.h:3407
static bool classofKind(Kind K)
Definition Decl.h:3412
bool hasCapturedVLAType() const
Determine whether this member captures the variable length array type.
Definition Decl.h:3379
friend class ASTDeclWriter
Definition Decl.h:3233
bool isUnnamedBitField() const
Determines whether this is an unnamed bitfield.
Definition Decl.h:3266
bool isZeroLengthBitField() const
Is this a zero-length bit-field?
Expr * getBitWidth() const
Returns the expression that represents the bit width, if this field is a bit field.
Definition Decl.h:3276
void printName(raw_ostream &OS, const PrintingPolicy &Policy) const override
Pretty-print the unqualified name of this declaration.
const FieldDecl * getCanonicalDecl() const
Definition Decl.h:3408
const FieldDecl * findCountedByField() const
Find the FieldDecl specified in a FAM's "counted_by" attribute.
RecordDecl * getParent()
Definition Decl.h:3400
const VariableArrayType * getCapturedVLAType() const
Get the captured variable length array type.
Definition Decl.h:3384
bool isPotentiallyOverlapping() const
Determine if this field is of potentially-overlapping class type, that is, subobject with the [[no_un...
void setCapturedVLAType(const VariableArrayType *VLAType)
Set the captured variable length array type for this field.
bool hasNonNullInClassInitializer() const
Determine whether getInClassInitializer() would return a non-null pointer without deserializing the i...
Definition Decl.h:3346
const VariableArrayType * CapturedVLAType
Definition Decl.h:3216
static bool classof(const Decl *D)
Definition Decl.h:3411
void setRParenLoc(SourceLocation L)
Definition Decl.h:4611
SourceLocation getAsmLoc() const
Definition Decl.h:4609
std::string getAsmString() const
Expr * getAsmStringExpr()
Definition Decl.h:4617
static bool classofKind(Kind K)
Definition Decl.h:4623
const Expr * getAsmStringExpr() const
Definition Decl.h:4616
SourceLocation getRParenLoc() const
Definition Decl.h:4610
static bool classof(const Decl *D)
Definition Decl.h:4622
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
Definition Decl.h:4612
void setAsmString(Expr *Asm)
Definition Decl.h:4618
static FileScopeAsmDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
Stashed information about a defaulted/deleted function body.
Definition Decl.h:2028
StringLiteral * getDeletedMessage() const
Definition Decl.h:2048
void setDeletedMessage(StringLiteral *Message)
ArrayRef< DeclAccessPair > getUnqualifiedLookups() const
Get the unqualified lookup results that should be used in this defaulted function definition.
Definition Decl.h:2044
Represents a function declaration or definition.
Definition Decl.h:2000
unsigned getMemoryFunctionKind() const
Identify a memory copying or setting function.
static constexpr unsigned RequiredTypeAwareDeleteParameterCount
Count of mandatory parameters for type aware operator delete.
Definition Decl.h:2642
void setInstantiationIsPending(bool IC)
State that the instantiation of this function is pending.
Definition Decl.h:2513
bool isTargetClonesMultiVersion() const
True if this function is a multiversioned dispatch function as a part of the target-clones functional...
bool isMultiVersion() const
True if this function is considered a multiversioned function.
Definition Decl.h:2689
static FunctionDecl * Create(ASTContext &C, DeclContext *DC, SourceLocation StartLoc, SourceLocation NLoc, DeclarationName N, QualType T, TypeSourceInfo *TInfo, StorageClass SC, bool UsesFPIntrin=false, bool isInlineSpecified=false, bool hasWrittenPrototype=true, ConstexprSpecKind ConstexprKind=ConstexprSpecKind::Unspecified, const AssociatedConstraint &TrailingRequiresClause={})
Definition Decl.h:2189
const ParmVarDecl * getParamDecl(unsigned i) const
Definition Decl.h:2797
ExceptionSpecificationType getExceptionSpecType() const
Gets the ExceptionSpecificationType as declared.
Definition Decl.h:2869
bool isTrivialForCall() const
Definition Decl.h:2380
bool hasTrivialBody() const
Returns whether the function has a trivial body that does not require any specific codegen.
ConstexprSpecKind getConstexprKind() const
Definition Decl.h:2476
DefaultedOrDeletedFunctionInfo * getDefaultedOrDeletedInfo() const
unsigned getMinRequiredArguments() const
Returns the minimum number of arguments needed to call this function.
bool isFunctionTemplateSpecialization() const
Determine whether this function is a function template specialization.
void setPreviousDeclaration(FunctionDecl *PrevDecl)
void setDescribedFunctionTemplate(FunctionTemplateDecl *Template)
FunctionTemplateDecl * getDescribedFunctionTemplate() const
Retrieves the function template that is described by this function declaration.
void setIsPureVirtual(bool P=true)
const FunctionDecl * getDefinition() const
Definition Decl.h:2288
bool isThisDeclarationADefinition() const
Returns whether this specific declaration of the function is also a definition that does not contain ...
Definition Decl.h:2314
bool isImmediateFunction() const
void setDefaultedOrDeletedInfo(DefaultedOrDeletedFunctionInfo *Info)
void setFriendConstraintRefersToEnclosingTemplate(bool V=true)
Definition Decl.h:2701
SourceLocation getEllipsisLoc() const
Returns the location of the ellipsis of a variadic function.
Definition Decl.h:2223
static bool classofKind(Kind K)
Definition Decl.h:3146
void setHasSkippedBody(bool Skipped=true)
Definition Decl.h:2680
SourceRange getReturnTypeSourceRange() const
Attempt to compute an informative source range covering the function return type.
bool isDestroyingOperatorDelete() const
Determine whether this is a destroying operator delete.
static FunctionDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
unsigned getBuiltinID(bool ConsiderWrapperFunctions=false) const
Returns a value indicating whether this function corresponds to a builtin function.
void setUsesSEHTry(bool UST)
Definition Decl.h:2519
param_iterator param_end()
Definition Decl.h:2787
StringLiteral * getDeletedMessage() const
Get the message that indicates why this function was deleted.
Definition Decl.h:2758
SourceLocation getPointOfInstantiation() const
Retrieve the (first) point of instantiation of a function template specialization or a member of a cl...
bool isMemberLikeConstrainedFriend() const
Determine whether a function is a friend function that cannot be redeclared outside of its class,...
bool hasCXXExplicitFunctionObjectParameter() const
bool isInlined() const
Determine whether this function should be inlined, because it is either marked "inline" or "constexpr...
Definition Decl.h:2921
void setIsMultiVersion(bool V=true)
Sets the multiversion state for this declaration and all of its redeclarations.
Definition Decl.h:2695
bool UsesFPIntrin() const
Determine whether the function was declared in source context that requires constrained FP intrinsics...
Definition Decl.h:2909
SourceLocation getDefaultLoc() const
Definition Decl.h:2398
void setInstantiationOfMemberFunction(FunctionDecl *FD, TemplateSpecializationKind TSK)
Specify that this record is an instantiation of the member function FD.
Definition Decl.h:2974
bool usesSEHTry() const
Indicates the function uses __try.
Definition Decl.h:2518
void setHasWrittenPrototype(bool P=true)
State that this function has a written prototype.
Definition Decl.h:2453
bool isNoReturn() const
Determines whether this function is known to be 'noreturn', through an attribute on its declaration o...
QualType getReturnType() const
Definition Decl.h:2845
ArrayRef< ParmVarDecl * > parameters() const
Definition Decl.h:2774
bool isCPUSpecificMultiVersion() const
True if this function is a multiversioned processor specific function as a part of the cpu_specific/c...
FunctionDecl * getTemplateInstantiationPattern(bool ForDefinition=true) const
Retrieve the function declaration from which this function could be instantiated, if it is an instant...
bool isMSExternInline() const
The combination of the extern and inline keywords under MSVC forces the function to be required.
bool isExplicitlyDefaulted() const
Whether this function is explicitly defaulted.
Definition Decl.h:2389
bool isTrivial() const
Whether this function is "trivial" in some specialized C++ senses.
Definition Decl.h:2377
bool instantiationIsPending() const
Whether the instantiation of this function is pending.
Definition Decl.h:2507
unsigned getMinRequiredExplicitArguments() const
Returns the minimum number of non-object arguments needed to call this function.
const FunctionDecl * getCanonicalDecl() const
Definition Decl.h:2767
bool BodyContainsImmediateEscalatingExpressions() const
Definition Decl.h:2490
LanguageLinkage getLanguageLinkage() const
Compute the language linkage.
FunctionTemplateDecl * getPrimaryTemplate() const
Retrieve the primary template that this function template specialization either specializes or was in...
MutableArrayRef< ParmVarDecl * >::iterator param_iterator
Definition Decl.h:2782
FunctionDecl * getNextRedeclarationImpl() override
Returns the next redeclaration or itself if this is the only decl.
Definition Decl.h:2162
bool hasWrittenPrototype() const
Whether this function has a written prototype.
Definition Decl.h:2448
void setWillHaveBody(bool V=true)
Definition Decl.h:2686
void setDeclarationNameLoc(DeclarationNameLoc L)
Definition Decl.h:2220
bool isReplaceableGlobalAllocationFunction(UnsignedOrNone *AlignmentParam=nullptr, bool *IsNothrow=nullptr) const
Determines whether this function is one of the replaceable global allocation functions: void *operato...
Definition Decl.h:2594
MemberSpecializationInfo * getMemberSpecializationInfo() const
If this function is an instantiation of a member function of a class template specialization,...
bool hasPrototype() const
Whether this function has a prototype, either because one was explicitly written or because it was "i...
Definition Decl.h:2443
FunctionTemplateSpecializationInfo * getTemplateSpecializationInfo() const
If this function is actually a function template specialization, retrieve information about this func...
void setUsesFPIntrin(bool I)
Set whether the function was declared in source context that requires constrained FP intrinsics.
Definition Decl.h:2913
void setDefaultLoc(SourceLocation NewLoc)
Definition Decl.h:2402
FunctionDecl * getCanonicalDecl() override
Retrieves the "canonical" declaration of the given declaration.
void getAssociatedConstraints(SmallVectorImpl< AssociatedConstraint > &ACs) const
Get the associated-constraints of this function declaration.
Definition Decl.h:2752
FunctionTypeLoc getFunctionTypeLoc() const
Find the source location information for how the type of this function was written.
void setInstantiatedFromMemberTemplate(bool Val=true)
Definition Decl.h:2369
MutableArrayRef< ParmVarDecl * > parameters()
Definition Decl.h:2777
param_iterator param_begin()
Definition Decl.h:2786
FunctionDecl * getPreviousDeclImpl() override
Implementation of getPreviousDecl(), to be overridden by any subclass that has a redeclaration chain.
Definition Decl.h:2166
const ParmVarDecl * getNonObjectParameter(unsigned I) const
Definition Decl.h:2823
bool isVariadic() const
Whether this function is variadic.
bool doesThisDeclarationHaveABody() const
Returns whether this specific declaration of the function has a body.
Definition Decl.h:2326
bool isConstexprSpecified() const
Definition Decl.h:2479
DependentFunctionTemplateSpecializationInfo * getDependentSpecializationInfo() const
bool isDeleted() const
Whether this function has been deleted.
Definition Decl.h:2540
void setBodyContainsImmediateEscalatingExpressions(bool Set)
Definition Decl.h:2486
const TemplateArgumentList * getTemplateSpecializationArgs() const
Retrieve the template arguments used to produce this function template specialization from the primar...
FunctionEffectsRef getFunctionEffects() const
Definition Decl.h:3134
static DeclContext * castToDeclContext(const FunctionDecl *D)
Definition Decl.h:3149
SourceRange getExceptionSpecSourceRange() const
Attempt to compute an informative source range covering the function exception specification,...
bool hasBody() const override
Returns true if this Decl represents a declaration for a body of code, such as a function or method d...
Definition Decl.h:2253
bool isMSVCRTEntryPoint() const
Determines whether this function is a MSVCRT user defined entry point.
unsigned getODRHash()
Returns ODRHash of the function.
TemplateSpecializationKind getTemplateSpecializationKindForInstantiation() const
Determine the kind of template specialization this function represents for the purpose of template in...
ArrayRef< ParmVarDecl * >::const_iterator param_const_iterator
Definition Decl.h:2783
FunctionDecl(Kind DK, ASTContext &C, DeclContext *DC, SourceLocation StartLoc, const DeclarationNameInfo &NameInfo, QualType T, TypeSourceInfo *TInfo, StorageClass S, bool UsesFPIntrin, bool isInlineSpecified, ConstexprSpecKind ConstexprKind, const AssociatedConstraint &TrailingRequiresClause)
bool isTemplateInstantiation() const
Determines if the given function was instantiated from a function template.
void setInlineSpecified(bool I)
Set whether the "inline" keyword was specified for this function.
Definition Decl.h:2902
unsigned getNumNonObjectParams() const
TemplatedKind
The kind of templated function a FunctionDecl can be.
Definition Decl.h:2005
@ TK_NonTemplate
Definition Decl.h:2007
@ TK_FunctionTemplate
Definition Decl.h:2009
@ TK_MemberSpecialization
Definition Decl.h:2012
@ TK_DependentNonTemplate
Definition Decl.h:2021
@ TK_FunctionTemplateSpecialization
Definition Decl.h:2016
@ TK_DependentFunctionTemplateSpecialization
Definition Decl.h:2019
redeclarable_base::redecl_range redecl_range
Definition Decl.h:2178
friend class ASTDeclReader
Definition Decl.h:2175
UsualDeleteParams getUsualDeleteParams() const
StorageClass getStorageClass() const
Returns the storage class as written in the source.
Definition Decl.h:2888
FunctionDecl * getMostRecentDeclImpl() override
Implementation of getMostRecentDecl(), to be overridden by any subclass that has a redeclaration chai...
Definition Decl.h:2170
bool isStatic() const
Definition Decl.h:2929
redeclarable_base::redecl_iterator redecl_iterator
Definition Decl.h:2179
bool isOutOfLine() const override
Determine whether this is or was instantiated from an out-of-line definition of a member function.
void setTrivial(bool IT)
Definition Decl.h:2378
bool isInlineBuiltinDeclaration() const
Determine if this function provides an inline implementation of a builtin.
bool FriendConstraintRefersToEnclosingTemplate() const
Definition Decl.h:2707
ParmVarDecl * getParamDecl(unsigned i)
Definition Decl.h:2801
TemplatedKind getTemplatedKind() const
What kind of templated function this is.
void setInstantiatedFromDecl(FunctionDecl *FD)
Specify that this function declaration was instantiated from a FunctionDecl FD.
bool isConstexpr() const
Whether this is a (C++11) constexpr function or constexpr constructor.
Definition Decl.h:2470
bool isDeletedAsWritten() const
Definition Decl.h:2544
bool isReservedGlobalPlacementOperator() const
Determines whether this operator new or delete is one of the reserved global placement operators: voi...
ParmVarDecl * getNonObjectParameter(unsigned I)
Definition Decl.h:2827
void setHasInheritedPrototype(bool P=true)
State that this function inherited its prototype from a previous declaration.
Definition Decl.h:2465
void setDependentTemplateSpecialization(ASTContext &Context, const UnresolvedSetImpl &Templates, const TemplateArgumentListInfo *TemplateArgs)
Specifies that this function declaration is actually a dependent function template specialization.
bool isInExternCContext() const
Determines whether this function's context is, or is nested within, a C++ extern "C" linkage spec.
static constexpr unsigned RequiredTypeAwareNewParameterCount
Count of mandatory parameters for type aware operator new.
Definition Decl.h:2638
bool isPureVirtual() const
Whether this virtual function is pure, i.e.
Definition Decl.h:2353
bool isImplicitlyInstantiable() const
Determines whether this function is a function template specialization or a member of a class templat...
bool isExternC() const
Determines whether this function is a function with external, C linkage.
Stmt * getBody() const override
getBody - If this Decl represents a declaration for a body of code, such as a function or method defi...
Definition Decl.h:2300
bool isLateTemplateParsed() const
Whether this templated function will be late parsed.
Definition Decl.h:2357
FunctionDecl * getMostRecentDecl()
Returns the most recent (re)declaration of this declaration.
bool isDefined() const
Definition Decl.h:2276
LazyDeclStmtPtr Body
The body of the function.
Definition Decl.h:2066
bool hasImplicitReturnZero() const
Whether falling off this function implicitly returns null/zero.
Definition Decl.h:2428
bool isImmediateEscalating() const
void setVirtualAsWritten(bool V)
State that this function is marked as virtual explicitly.
Definition Decl.h:2349
bool hasSkippedBody() const
True if the function was a definition but its body was skipped.
Definition Decl.h:2679
void setIsDestroyingOperatorDelete(bool IsDestroyingDelete)
static bool classof(const Decl *D)
Definition Decl.h:3145
void setLateTemplateParsed(bool ILT=true)
State that this templated function will be late parsed.
Definition Decl.h:2362
bool isUsableAsGlobalAllocationFunctionInConstantEvaluation(UnsignedOrNone *AlignmentParam=nullptr, bool *IsNothrow=nullptr) const
Determines whether this function is one of the replaceable global allocation functions described in i...
DefaultedOrDeletedFunctionInfo * DefaultedOrDeletedInfo
Information about a future defaulted function definition.
Definition Decl.h:2068
FunctionDecl * getDefinition()
Get the definition for this declaration.
Definition Decl.h:2282
bool isTypeAwareOperatorNewOrDelete() const
Determine whether this is a type aware operator new or delete.
bool isInExternCXXContext() const
Determines whether this function's context is, or is nested within, a C++ extern "C++" linkage spec.
bool isMain() const
Determines whether this function is "main", which is the entry point into an executable program.
void setImplicitlyInline(bool I=true)
Flag that this function is implicitly inline.
Definition Decl.h:2916
bool isTargetVersionMultiVersion() const
True if this function is a multiversioned dispatch function as a part of the target-version functiona...
void setTrivialForCall(bool IT)
Definition Decl.h:2381
bool param_empty() const
Definition Decl.h:2785
void setIsTypeAwareOperatorNewOrDelete(bool IsTypeAwareOperator=true)
void setLazyBody(uint64_t Offset)
Definition Decl.h:2332
friend class ASTDeclWriter
Definition Decl.h:2176
bool isThisDeclarationInstantiatedFromAFriendDefinition() const
Determine whether this specific declaration of the function is a friend declaration that was instanti...
void setRangeEnd(SourceLocation E)
Definition Decl.h:2218
bool isCPUDispatchMultiVersion() const
True if this function is a multiversioned dispatch function as a part of the cpu_specific/cpu_dispatc...
bool isDefaulted() const
Whether this function is defaulted.
Definition Decl.h:2385
bool isIneligibleOrNotSelected() const
Definition Decl.h:2418
bool isReferenceableKernel() const
void setIneligibleOrNotSelected(bool II)
Definition Decl.h:2421
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
bool isOverloadedOperator() const
Whether this function declaration represents an C++ overloaded operator, e.g., "operator+".
Definition Decl.h:2933
FunctionDecl * getInstantiatedFromDecl() const
void setTemplateSpecializationKind(TemplateSpecializationKind TSK, SourceLocation PointOfInstantiation=SourceLocation())
Determine what kind of template instantiation this function represents.
const IdentifierInfo * getLiteralIdentifier() const
getLiteralIdentifier - The literal suffix identifier this function represents, if any.
OverloadedOperatorKind getOverloadedOperator() const
getOverloadedOperator - Which C++ overloaded operator this function represents, if any.
void setConstexprKind(ConstexprSpecKind CSK)
Definition Decl.h:2473
TemplateSpecializationKind getTemplateSpecializationKind() const
Determine what kind of template instantiation this function represents.
param_const_iterator param_begin() const
Definition Decl.h:2788
bool doesDeclarationForceExternallyVisibleDefinition() const
For a function declaration in C or C++, determine whether this declaration causes the definition to b...
void setDefaulted(bool D=true)
Definition Decl.h:2386
bool isConsteval() const
Definition Decl.h:2482
bool isTargetMultiVersion() const
True if this function is a multiversioned dispatch function as a part of the target functionality.
bool isUserProvided() const
True if this method is user-declared and was not deleted or defaulted on its first declaration.
Definition Decl.h:2410
bool isAnalyzerNoReturn() const
Determines whether this function is known to be 'noreturn' for analyzer, through an analyzer_noreturn...
QualType getDeclaredReturnType() const
Get the declared return type, which may differ from the actual return type if the return type is dedu...
Definition Decl.h:2862
void setStorageClass(StorageClass SClass)
Sets the storage class as written in the source.
Definition Decl.h:2893
bool isVirtualAsWritten() const
Whether this function is marked as virtual explicitly.
Definition Decl.h:2344
bool isGlobal() const
Determines whether this is a global function.
bool hasOneParamOrDefaultArgs() const
Determine whether this function has a single parameter, or multiple parameters where all but the firs...
void setDeletedAsWritten(bool D=true, StringLiteral *Message=nullptr)
void setFunctionTemplateSpecialization(FunctionTemplateDecl *Template, TemplateArgumentList *TemplateArgs, void *InsertPos, TemplateSpecializationKind TSK=TSK_ImplicitInstantiation, TemplateArgumentListInfo *TemplateArgsAsWritten=nullptr, SourceLocation PointOfInstantiation=SourceLocation())
Specify that this function declaration is actually a function template specialization.
Definition Decl.h:3074
void setExplicitlyDefaulted(bool ED=true)
State that this function is explicitly defaulted.
Definition Decl.h:2394
param_const_iterator param_end() const
Definition Decl.h:2789
bool hasInheritedPrototype() const
Whether this function inherited its prototype from a previous declaration.
Definition Decl.h:2459
bool isTargetMultiVersionDefault() const
True if this function is the default version of a multiversioned dispatch function as a part of the t...
FunctionDecl * getInstantiatedFromMemberFunction() const
If this function is an instantiation of a member function of a class template specialization,...
bool isInlineDefinitionExternallyVisible() const
For an inline function definition in C, or for a gnu_inline function in C++, determine whether the de...
unsigned getNumParams() const
Return the number of parameters this function must have based on its FunctionType.
size_t param_size() const
Definition Decl.h:2790
DeclarationNameInfo getNameInfo() const
Definition Decl.h:2211
Redeclarable< FunctionDecl > redeclarable_base
Definition Decl.h:2160
bool hasBody(const FunctionDecl *&Definition) const
Returns true if the function has a body.
SourceRange getParametersSourceRange() const
Attempt to compute an informative source range covering the function parameters, including the ellips...
static FunctionDecl * castFromDeclContext(const DeclContext *DC)
Definition Decl.h:3152
void setHasImplicitReturnZero(bool IRZ)
State that falling off this function implicitly returns null/zero.
Definition Decl.h:2435
FunctionDecl * getPreviousDecl()
Return the previous declaration of this declaration or NULL if this is the first declaration.
bool isInlineSpecified() const
Determine whether the "inline" keyword was specified for this function.
Definition Decl.h:2899
MultiVersionKind getMultiVersionKind() const
Gets the kind of multiversioning attribute this declaration has.
void getNameForDiagnostic(raw_ostream &OS, const PrintingPolicy &Policy, bool Qualified) const override
Appends a human-readable name for this declaration into the given stream.
void setParams(ArrayRef< ParmVarDecl * > NewParamInfo)
Definition Decl.h:2805
bool willHaveBody() const
True if this function will eventually have a body, once it's fully parsed.
Definition Decl.h:2685
const ASTTemplateArgumentListInfo * getTemplateSpecializationArgsAsWritten() const
Retrieve the template argument list as written in the sources, if any.
QualType getCallResultType() const
Determine the type of an expression that calls this function.
Definition Decl.h:2881
bool isInstantiatedFromMemberTemplate() const
Definition Decl.h:2366
An immutable set of FunctionEffects and possibly conditions attached to them.
Represents a prototype with parameter type info, e.g.
ExceptionSpecificationType getExceptionSpecType() const
Get the kind of exception specification on this function.
SourceLocation getEllipsisLoc() const
Declaration of a template function.
Provides information about a function template specialization, which is a FunctionDecl that has been ...
Wrapper for source info for functions.
FunctionType - C99 6.7.5.3 - Function Declarators.
static HLSLBufferDecl * castFromDeclContext(const DeclContext *DC)
Definition Decl.h:5246
buffer_decl_iterator buffer_decls_begin() const
static DeclContext * castToDeclContext(const HLSLBufferDecl *D)
Definition Decl.h:5243
bool isCBuffer() const
Definition Decl.h:5234
const CXXRecordDecl * getLayoutStruct() const
Definition Decl.h:5237
SourceLocation getLBraceLoc() const
Definition Decl.h:5231
SourceLocation getLocStart() const LLVM_READONLY
Definition Decl.h:5230
friend class ASTDeclReader
Definition Decl.h:5272
void addLayoutStruct(CXXRecordDecl *LS)
bool buffer_decls_empty()
SourceLocation getRBraceLoc() const
Definition Decl.h:5232
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
Definition Decl.h:5227
void setRBraceLoc(SourceLocation L)
Definition Decl.h:5233
friend class ASTDeclWriter
Definition Decl.h:5273
bool hasValidPackoffset() const
Definition Decl.h:5236
llvm::concat_iterator< Decl *const, SmallVector< Decl * >::const_iterator, decl_iterator > buffer_decl_iterator
Definition Decl.h:5260
static bool classofKind(Kind K)
Definition Decl.h:5242
llvm::iterator_range< buffer_decl_iterator > buffer_decl_range
Definition Decl.h:5263
void setHasValidPackoffset(bool PO)
Definition Decl.h:5235
static HLSLBufferDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
buffer_decl_iterator buffer_decls_end() const
static HLSLBufferDecl * CreateDefaultCBuffer(ASTContext &C, DeclContext *LexicalParent, ArrayRef< Decl * > DefaultCBufferDecls)
buffer_decl_range buffer_decls() const
Definition Decl.h:5265
static bool classof(const Decl *D)
Definition Decl.h:5241
static HLSLRootSignatureDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
ArrayRef< llvm::hlsl::rootsig::RootElement > getRootElements() const
Definition Decl.h:5307
llvm::dxbc::RootSignatureVersion getVersion() const
Definition Decl.h:5305
static bool classofKind(Kind K)
Definition Decl.h:5313
static bool classof(const Decl *D)
Definition Decl.h:5312
One of these records is kept for each identifier that is lexed.
StringRef getName() const
Return the actual identifier string.
static bool classofKind(Kind K)
Definition Decl.h:1786
ImplicitParamDecl(ASTContext &C, DeclContext *DC, SourceLocation IdLoc, const IdentifierInfo *Id, QualType Type, ImplicitParamKind ParamKind)
Definition Decl.h:1762
ImplicitParamKind getParameterKind() const
Returns the implicit parameter kind.
Definition Decl.h:1780
static bool classof(const Decl *D)
Definition Decl.h:1785
ImplicitParamDecl(ASTContext &C, QualType Type, ImplicitParamKind ParamKind)
Definition Decl.h:1771
static ImplicitParamDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
static ImportDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID, unsigned NumLocations)
Create a new, deserialized module import declaration.
friend class ASTReader
Definition Decl.h:5052
friend class ASTDeclReader
Definition Decl.h:5051
friend class ASTContext
Definition Decl.h:5050
static bool classof(const Decl *D)
Definition Decl.h:5118
ArrayRef< SourceLocation > getIdentifierLocs() const
Retrieves the locations of each of the identifiers that make up the complete module name in the impor...
Module * getImportedModule() const
Retrieve the module that was imported by the import declaration.
Definition Decl.h:5107
static bool classofKind(Kind K)
Definition Decl.h:5119
static ImportDecl * CreateImplicit(ASTContext &C, DeclContext *DC, SourceLocation StartLoc, Module *Imported, SourceLocation EndLoc)
Create a new module import declaration for an implicitly-generated import.
const IndirectFieldDecl * getCanonicalDecl() const
Definition Decl.h:3505
static bool classofKind(Kind K)
Definition Decl.h:3509
static bool classof(const Decl *D)
Definition Decl.h:3508
FieldDecl * getAnonField() const
Definition Decl.h:3494
static IndirectFieldDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
friend class ASTDeclReader
Definition Decl.h:3478
unsigned getChainingSize() const
Definition Decl.h:3492
IndirectFieldDecl * getCanonicalDecl() override
Retrieves the "canonical" declaration of the given declaration.
Definition Decl.h:3504
chain_iterator chain_end() const
Definition Decl.h:3490
chain_iterator chain_begin() const
Definition Decl.h:3489
ArrayRef< NamedDecl * > chain() const
Definition Decl.h:3488
VarDecl * getVarDecl() const
Definition Decl.h:3499
ArrayRef< NamedDecl * >::const_iterator chain_iterator
Definition Decl.h:3486
static bool classofKind(Kind K)
Definition Decl.h:566
void setMSAsmLabel(StringRef Name)
bool isResolvedMSAsmLabel() const
Definition Decl.h:559
bool isGnuLocal() const
Definition Decl.h:551
static bool classof(const Decl *D)
Definition Decl.h:565
void setLocStart(SourceLocation L)
Definition Decl.h:552
LabelStmt * getStmt() const
Definition Decl.h:548
StringRef getMSAsmLabel() const
Definition Decl.h:561
void setStmt(LabelStmt *T)
Definition Decl.h:549
void setMSAsmLabelResolved()
Definition Decl.h:562
static LabelDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
bool isMSAsmLabel() const
Definition Decl.h:558
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
Definition Decl.h:554
LabelStmt - Represents a label, which has a substatement.
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
Visibility getVisibility() const
Provides information a specialization of a member of a class template, which may be a member function...
FieldDecl * getFirstDecl()
Describes a module or submodule.
This represents a decl that may have a name.
Definition Decl.h:274
NamedDecl * getUnderlyingDecl()
Looks through UsingDecls and ObjCCompatibleAliasDecls for the underlying named decl.
Definition Decl.h:487
ExplicitVisibilityKind
Kinds of explicit visibility.
Definition Decl.h:452
@ VisibilityForValue
Do an LV computation for, ultimately, a non-type declaration.
Definition Decl.h:461
@ VisibilityForType
Do an LV computation for, ultimately, a type.
Definition Decl.h:456
Linkage getLinkageInternal() const
Determine what kind of linkage this entity has.
IdentifierInfo * getIdentifier() const
Get the identifier that names this declaration, if there is one.
Definition Decl.h:295
NamedDecl(Kind DK, DeclContext *DC, SourceLocation L, DeclarationName N)
Definition Decl.h:286
LinkageInfo getLinkageAndVisibility() const
Determines the linkage and visibility of this entity.
bool isLinkageValid() const
True if the computed linkage is valid.
StringRef getName() const
Get the name of identifier for this declaration as a StringRef.
Definition Decl.h:301
bool isPlaceholderVar(const LangOptions &LangOpts) const
Visibility getVisibility() const
Determines the visibility of this entity.
Definition Decl.h:444
bool hasLinkageBeenComputed() const
True if something has required us to compute the linkage of this declaration.
Definition Decl.h:479
bool hasExternalFormalLinkage() const
True if this decl has external linkage.
Definition Decl.h:429
static bool classof(const Decl *D)
Definition Decl.h:510
DeclarationName getDeclName() const
Get the actual, stored name of the declaration, which may be a special name.
Definition Decl.h:340
std::string getQualifiedNameAsString() const
std::string getNameAsString() const
Get a human-readable name for the declaration, even if it is one of the special kinds of names (C++ c...
Definition Decl.h:317
std::optional< Visibility > getExplicitVisibility(ExplicitVisibilityKind kind) const
If visibility was explicitly specified for this declaration, return that visibility.
NamedDecl * getMostRecentDecl()
Definition Decl.h:501
virtual void getNameForDiagnostic(raw_ostream &OS, const PrintingPolicy &Policy, bool Qualified) const
Appends a human-readable name for this declaration into the given stream.
bool declarationReplaces(const NamedDecl *OldD, bool IsKnownNewer=true) const
Determine whether this declaration, if known to be well-formed within its context,...
ObjCStringFormatFamily getObjCFStringFormattingFamily() const
Linkage getFormalLinkage() const
Get the linkage from a semantic point of view.
void printQualifiedName(raw_ostream &OS) const
Returns a human-readable qualified name for this declaration, like A::B::i, for i being member of nam...
static bool classofKind(Kind K)
Definition Decl.h:511
virtual void printName(raw_ostream &OS, const PrintingPolicy &Policy) const
Pretty-print the unqualified name of this declaration.
bool isCXXInstanceMember() const
Determine whether the given declaration is an instance member of a C++ class.
bool hasLinkage() const
Determine whether this declaration has linkage.
const NamedDecl * getMostRecentDecl() const
Definition Decl.h:504
bool isExternallyVisible() const
Definition Decl.h:433
void setDeclName(DeclarationName N)
Set the name of this declaration.
Definition Decl.h:343
ReservedIdentifierStatus isReserved(const LangOptions &LangOpts) const
Determine if the declaration obeys the reserved identifier rules of the given language.
bool isCXXClassMember() const
Determine whether this declaration is a C++ class member.
Definition Decl.h:397
const NamedDecl * getUnderlyingDecl() const
Definition Decl.h:497
void printNestedNameSpecifier(raw_ostream &OS) const
Print only the nested name specifier part of a fully-qualified name, including the '::' at the end.
bool isExternallyDeclarable() const
Determine whether this declaration can be redeclared in a different translation unit.
Definition Decl.h:439
Represents C++ namespaces and their aliases.
Definition Decl.h:573
const NamespaceDecl * getNamespace() const
Definition Decl.h:579
NamedDecl(Kind DK, DeclContext *DC, SourceLocation L, DeclarationName N)
Definition Decl.h:286
static bool classof(const Decl *D)
Definition Decl.h:583
NamespaceDecl * getNamespace()
static bool classofKind(Kind K)
Definition Decl.h:584
Represent a C++ namespace.
Definition Decl.h:592
NamespaceDecl * getCanonicalDecl() override
Retrieves the canonical declaration of this namespace.
Definition Decl.h:684
redeclarable_base::redecl_iterator redecl_iterator
Definition Decl.h:625
SourceLocation getRBraceLoc() const
Definition Decl.h:692
const NamespaceDecl * getCanonicalDecl() const
Definition Decl.h:685
void setAnonymousNamespace(NamespaceDecl *D)
Definition Decl.h:679
static bool classofKind(Kind K)
Definition Decl.h:698
void setNested(bool Nested)
Set whether this is a nested namespace declaration.
Definition Decl.h:660
static DeclContext * castToDeclContext(const NamespaceDecl *D)
Definition Decl.h:699
friend class ASTDeclReader
Definition Decl.h:614
void setLocStart(SourceLocation L)
Definition Decl.h:693
SourceLocation getBeginLoc() const LLVM_READONLY
Definition Decl.h:691
bool isAnonymousNamespace() const
Returns true if this is an anonymous namespace declaration.
Definition Decl.h:643
bool isInline() const
Returns true if this is an inline namespace declaration.
Definition Decl.h:648
static bool classof(const Decl *D)
Definition Decl.h:697
static NamespaceDecl * castFromDeclContext(const DeclContext *DC)
Definition Decl.h:702
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
Definition Decl.h:687
friend class ASTDeclWriter
Definition Decl.h:615
void setInline(bool Inline)
Set whether this is an inline namespace declaration.
Definition Decl.h:651
NamespaceDecl * getAnonymousNamespace() const
Retrieve the anonymous namespace that inhabits this namespace, if any.
Definition Decl.h:675
bool isNested() const
Returns true if this is a nested namespace declaration.
Definition Decl.h:657
static NamespaceDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
void setRBraceLoc(SourceLocation L)
Definition Decl.h:694
redeclarable_base::redecl_range redecl_range
Definition Decl.h:624
bool isRedundantInlineQualifierFor(DeclarationName Name) const
Returns true if the inline qualifier for Name is redundant.
Definition Decl.h:663
A C++ nested-name-specifier augmented with source location information.
Represents a C++ nested name specifier, such as "\::std::vector::".
ImplicitParamDecl * getParam(unsigned i) const
Definition Decl.h:4907
const ImplicitParamDecl *const * parameter_const_iterator
Definition Decl.h:4917
parameter_const_range parameters() const
Definition Decl.h:4919
static bool classof(const Decl *D)
Definition Decl.h:4926
static OutlinedFunctionDecl * castFromDeclContext(const DeclContext *DC)
Definition Decl.h:4931
static DeclContext * castToDeclContext(const OutlinedFunctionDecl *D)
Definition Decl.h:4928
friend class ASTDeclReader
Definition Decl.h:4890
void setNothrow(bool Nothrow=true)
parameter_const_iterator param_end() const
Definition Decl.h:4923
static bool classofKind(Kind K)
Definition Decl.h:4927
llvm::iterator_range< parameter_const_iterator > parameter_const_range
Definition Decl.h:4918
static OutlinedFunctionDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID, unsigned NumParams)
Stmt * getBody() const override
getBody - If this Decl represents a declaration for a body of code, such as a function or method defi...
void setParam(unsigned i, ImplicitParamDecl *P)
Definition Decl.h:4911
friend class ASTDeclWriter
Definition Decl.h:4891
parameter_const_iterator param_begin() const
Definition Decl.h:4922
unsigned getNumParams() const
Definition Decl.h:4905
friend TrailingObjects
Definition Decl.h:4892
Represents a parameter to a function.
Definition Decl.h:1790
bool isKNRPromoted() const
True if the value passed to this parameter must undergo K&R-style default argument promotion:
Definition Decl.h:1871
unsigned getFunctionScopeIndex() const
Returns the index of this parameter in its prototype or method scope.
Definition Decl.h:1850
void setObjCDeclQualifier(ObjCDeclQualifier QTVal)
Definition Decl.h:1858
static bool classofKind(Kind K)
Definition Decl.h:1953
void setDefaultArg(Expr *defarg)
static ParmVarDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
SourceLocation getExplicitObjectParamThisLoc() const
Definition Decl.h:1886
void setUnparsedDefaultArg()
Specify that this parameter has an unparsed default argument.
Definition Decl.h:1931
ParmVarDecl(Kind DK, ASTContext &C, DeclContext *DC, SourceLocation StartLoc, SourceLocation IdLoc, const IdentifierInfo *Id, QualType T, TypeSourceInfo *TInfo, StorageClass S, Expr *DefArg)
Definition Decl.h:1796
bool hasUnparsedDefaultArg() const
Determines whether this parameter has a default argument that has not yet been parsed.
Definition Decl.h:1919
SourceRange getDefaultArgRange() const
Retrieve the source range that covers the entire default argument.
void setUninstantiatedDefaultArg(Expr *arg)
bool isObjCMethodParameter() const
Definition Decl.h:1833
ObjCDeclQualifier getObjCDeclQualifier() const
Definition Decl.h:1854
static constexpr unsigned getMaxFunctionScopeDepth()
Definition Decl.h:1845
const Expr * getDefaultArg() const
Definition Decl.h:1891
void setScopeInfo(unsigned scopeDepth, unsigned parameterIndex)
Definition Decl.h:1823
bool hasUninstantiatedDefaultArg() const
Definition Decl.h:1923
void setObjCMethodScopeInfo(unsigned parameterIndex)
Definition Decl.h:1818
bool isDestroyedInCallee() const
Determines whether this parameter is destroyed in the callee function.
bool hasInheritedDefaultArg() const
Definition Decl.h:1935
bool isExplicitObjectParameter() const
Definition Decl.h:1878
void setKNRPromoted(bool promoted)
Definition Decl.h:1874
friend class ASTDeclReader
Definition Decl.h:1956
QualType getOriginalType() const
const Expr * getUninstantiatedDefaultArg() const
Definition Decl.h:1902
void setExplicitObjectParameterLoc(SourceLocation Loc)
Definition Decl.h:1882
Expr * getUninstantiatedDefaultArg()
@ MaxFunctionScopeDepth
Definition Decl.h:1792
bool hasDefaultArg() const
Determines whether this parameter has a default argument, either parsed or not.
unsigned getFunctionScopeDepth() const
Definition Decl.h:1840
void setHasInheritedDefaultArg(bool I=true)
Definition Decl.h:1939
void setOwningFunction(DeclContext *FD)
Sets the function declaration that owns this ParmVarDecl.
Definition Decl.h:1949
@ MaxFunctionScopeIndex
Definition Decl.h:1793
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
static bool classof(const Decl *D)
Definition Decl.h:1952
Represents a #pragma detect_mismatch line.
Definition Decl.h:201
StringRef getName() const
Definition Decl.h:222
friend class ASTDeclReader
Definition Decl.h:202
static PragmaDetectMismatchDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID, unsigned NameValueSize)
friend class ASTDeclWriter
Definition Decl.h:203
StringRef getValue() const
Definition Decl.h:223
static bool classofKind(Kind K)
Definition Decl.h:227
static bool classof(const Decl *D)
Definition Decl.h:226
A (possibly-)qualified type.
Represents a struct/union/class.
Definition Decl.h:4321
bool hasLoadedFieldsFromExternalStorage() const
Definition Decl.h:4390
unsigned getODRHash()
Get precomputed ODRHash or add a new one.
bool hasNonTrivialToPrimitiveDestructCUnion() const
Definition Decl.h:4431
bool isLambda() const
Determine whether this record is a class describing a lambda function object.
bool hasNonTrivialToPrimitiveCopyCUnion() const
Definition Decl.h:4439
bool isMsStruct(const ASTContext &C) const
Get whether or not this is an ms_struct which can be turned on with an attribute, pragma,...
void setAnonymousStructOrUnion(bool Anon)
Definition Decl.h:4377
bool canPassInRegisters() const
Determine whether this class can be passed in registers.
Definition Decl.h:4458
field_range noload_fields() const
noload_fields - Iterate over the fields stored in this record that are currently loaded; don't attemp...
Definition Decl.h:4544
unsigned getNumFields() const
Returns the number of fields (non-static data members) in this record.
Definition Decl.h:4537
RecordArgPassingKind getArgPassingRestrictions() const
Definition Decl.h:4462
RecordDecl(Kind DK, TagKind TK, const ASTContext &C, DeclContext *DC, SourceLocation StartLoc, SourceLocation IdLoc, IdentifierInfo *Id, RecordDecl *PrevDecl)
bool hasVolatileMember() const
Definition Decl.h:4384
bool hasFlexibleArrayMember() const
Definition Decl.h:4354
bool hasNonTrivialToPrimitiveDefaultInitializeCUnion() const
Definition Decl.h:4423
const FieldDecl * findFirstNamedDataMember() const
Finds the first data member which has a name.
field_iterator noload_field_begin() const
const RecordDecl * getMostRecentDecl() const
Definition Decl.h:4350
void setArgPassingRestrictions(RecordArgPassingKind Kind)
Definition Decl.h:4467
void setNonTrivialToPrimitiveCopy(bool V)
Definition Decl.h:4411
bool hasObjectMember() const
Definition Decl.h:4381
bool isNonTrivialToPrimitiveDestroy() const
Definition Decl.h:4415
bool isNonTrivialToPrimitiveCopy() const
Definition Decl.h:4407
bool isCapturedRecord() const
Determine whether this record is a record for captured variables in CapturedStmt construct.
void setHasNonTrivialToPrimitiveCopyCUnion(bool V)
Definition Decl.h:4443
field_iterator field_end() const
Definition Decl.h:4527
field_range fields() const
Definition Decl.h:4524
llvm::iterator_range< specific_decl_iterator< FieldDecl > > field_range
Definition Decl.h:4522
bool isRandomized() const
Definition Decl.h:4479
void setHasNonTrivialToPrimitiveDestructCUnion(bool V)
Definition Decl.h:4435
friend class ASTDeclReader
Definition Decl.h:4326
static bool classofKind(Kind K)
Definition Decl.h:4562
void setHasFlexibleArrayMember(bool V)
Definition Decl.h:4358
void setParamDestroyedInCallee(bool V)
Definition Decl.h:4475
void setNonTrivialToPrimitiveDestroy(bool V)
Definition Decl.h:4419
void setHasObjectMember(bool val)
Definition Decl.h:4382
void setHasVolatileMember(bool val)
Definition Decl.h:4386
void setHasNonTrivialToPrimitiveDefaultInitializeCUnion(bool V)
Definition Decl.h:4427
void reorderDecls(const SmallVectorImpl< Decl * > &Decls)
void setIsRandomized(bool V)
Definition Decl.h:4481
bool isParamDestroyedInCallee() const
Definition Decl.h:4471
static RecordDecl * CreateDeserialized(const ASTContext &C, GlobalDeclID ID)
bool noload_field_empty() const
Definition Decl.h:4554
bool mayInsertExtraPadding(bool EmitRemark=false) const
Whether we are allowed to insert extra padding between fields.
static bool classof(const Decl *D)
Definition Decl.h:4561
RecordDecl * getMostRecentDecl()
Definition Decl.h:4347
const RecordDecl * getPreviousDecl() const
Definition Decl.h:4343
bool isOrContainsUnion() const
Returns whether this record is a union, or contains (at any nesting level) a union member.
virtual void completeDefinition()
Note that the definition of this type is now complete.
RecordDecl * getDefinition() const
Returns the RecordDecl that actually defines this struct/union/class.
Definition Decl.h:4505
bool hasUninitializedExplicitInitFields() const
Definition Decl.h:4447
field_iterator noload_field_end() const
Definition Decl.h:4549
void setCapturedRecord()
Mark the record as a record for captured variables in CapturedStmt construct.
specific_decl_iterator< FieldDecl > field_iterator
Definition Decl.h:4521
void setHasUninitializedExplicitInitFields(bool V)
Definition Decl.h:4451
RecordDecl * getPreviousDecl()
Definition Decl.h:4339
void setNonTrivialToPrimitiveDefaultInitialize(bool V)
Definition Decl.h:4403
RecordDecl * getDefinitionOrSelf() const
Definition Decl.h:4509
bool isNonTrivialToPrimitiveDefaultInitialize() const
Functions to query basic properties of non-trivial C structs.
Definition Decl.h:4399
friend class DeclContext
Definition Decl.h:4325
bool isAnonymousStructOrUnion() const
Whether this is an anonymous struct or union.
Definition Decl.h:4373
void setHasLoadedFieldsFromExternalStorage(bool val) const
Definition Decl.h:4394
bool field_empty() const
Definition Decl.h:4532
field_iterator field_begin() const
TranslationUnitDecl * getFirstDecl()
TranslationUnitDecl * getNextRedeclaration() const
Redeclarable(const ASTContext &Ctx)
TranslationUnitDecl * getPreviousDecl()
redecl_iterator redecls_end() const
DeclLink RedeclLink
Points to the next redeclaration in the chain.
llvm::iterator_range< redecl_iterator > redecl_range
TranslationUnitDecl * getMostRecentDecl()
void setPreviousDecl(decl_type *PrevDecl)
Set the previous declaration.
Definition Decl.h:5326
redecl_iterator redecls_begin() const
redecl_range redecls() const
static DeclLink PreviousDeclLink(decl_type *D)
Encodes a location in the source.
A trivial tuple used to represent a source range.
Stmt - This represents one statement.
The streaming interface shared between DiagnosticBuilder and PartialDiagnostic.
void AddTaggedVal(uint64_t V, DiagnosticsEngine::ArgumentKind Kind) const
StringLiteral - This represents a string literal expression, e.g.
Represents the declaration of a struct/union/class/enum.
Definition Decl.h:3717
TagDecl * getPreviousDecl()
Return the previous declaration of this declaration or NULL if this is the first declaration.
void setTagKind(TagKind TK)
Definition Decl.h:3915
void setCompleteDefinitionRequired(bool V=true)
True if this complete decl is required to be complete for some existing use.
Definition Decl.h:3827
static TagDecl * castFromDeclContext(const DeclContext *DC)
Definition Decl.h:3999
SourceRange getBraceRange() const
Definition Decl.h:3788
TagTypeKind TagKind
Definition Decl.h:3722
bool isBeingDefined() const
Return true if this decl is currently being defined.
Definition Decl.h:3832
void demoteThisDefinitionToDeclaration()
Mark a definition as a declaration and maintain information it was a definition.
Definition Decl.h:3870
TagDecl * getMostRecentDeclImpl() override
Implementation of getMostRecentDecl(), to be overridden by any subclass that has a redeclaration chai...
Definition Decl.h:3762
TagDecl * getDefinition() const
Returns the TagDecl that actually defines this struct/union/class/enum.
bool isThisDeclarationADefinition() const
Return true if this declaration is a completion definition of the type.
Definition Decl.h:3807
bool isEnum() const
Definition Decl.h:3923
void setEmbeddedInDeclarator(bool isInDeclarator)
True if this tag declaration is "embedded" (i.e., defined or declared for the very first time) in the...
Definition Decl.h:3842
SourceLocation getInnerLocStart() const
Return SourceLocation representing start of source range ignoring outer template declarations.
Definition Decl.h:3793
bool isEmbeddedInDeclarator() const
True if this tag declaration is "embedded" (i.e., defined or declared for the very first time) in the...
Definition Decl.h:3836
bool isStructureOrClass() const
Definition Decl.h:3925
StringRef getKindName() const
Definition Decl.h:3907
bool isCompleteDefinition() const
Return true if this decl has its body fully specified.
Definition Decl.h:3812
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier (with source-location information) that qualifies the name of this...
Definition Decl.h:3965
bool isStruct() const
Definition Decl.h:3919
redeclarable_base::redecl_iterator redecl_iterator
Definition Decl.h:3779
TypedefNameDecl * getTypedefNameForAnonDecl() const
Definition Decl.h:3948
static bool classofKind(Kind K)
Definition Decl.h:3993
void startDefinition()
Starts the definition of this tag declaration.
TagDecl * getCanonicalDecl() override
Retrieves the "canonical" declaration of the given declaration.
void setTypedefNameForAnonDecl(TypedefNameDecl *TDD)
friend class ASTDeclReader
Definition Decl.h:3775
SourceLocation getOuterLocStart() const
Return SourceLocation representing start of source range taking into account any outer template decla...
bool isCompleteDefinitionRequired() const
Return true if this complete decl is required to be complete for some existing use.
Definition Decl.h:3821
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
bool isEntityBeingDefined() const
Determines whether this entity is in the process of being defined.
Definition Decl.h:3901
bool isFreeStanding() const
True if this tag is free standing, e.g. "struct foo;".
Definition Decl.h:3847
bool isUnion() const
Definition Decl.h:3922
void setBeingDefined(bool V=true)
True if this decl is currently being defined.
Definition Decl.h:3772
void setQualifierInfo(NestedNameSpecifierLoc QualifierLoc)
void setTemplateParameterListsInfo(ASTContext &Context, ArrayRef< TemplateParameterList * > TPLists)
void completeDefinition()
Completes the definition of this tag declaration.
bool isInterface() const
Definition Decl.h:3920
void printName(raw_ostream &OS, const PrintingPolicy &Policy) const override
Pretty-print the unqualified name of this declaration.
friend class ASTDeclWriter
Definition Decl.h:3776
void setTypeForDecl(const Type *TD)=delete
static bool classof(const Decl *D)
Definition Decl.h:3992
Redeclarable< TagDecl > redeclarable_base
Definition Decl.h:3752
bool isClass() const
Definition Decl.h:3921
NestedNameSpecifier getQualifier() const
Retrieve the nested-name-specifier that qualifies the name of this declaration, if it was present in ...
Definition Decl.h:3957
bool hasNameForLinkage() const
Is this tag type named, either directly or via being defined in a typedef of this type?
Definition Decl.h:3944
TemplateParameterList * getTemplateParameterList(unsigned i) const
Definition Decl.h:3976
void setFreeStanding(bool isFreeStanding=true)
True if this tag is free standing, e.g. "struct foo;".
Definition Decl.h:3850
TagKind getTagKind() const
Definition Decl.h:3911
TagDecl * getNextRedeclarationImpl() override
Returns the next redeclaration or itself if this is the only decl.
Definition Decl.h:3754
TagDecl * getPreviousDeclImpl() override
Implementation of getPreviousDecl(), to be overridden by any subclass that has a redeclaration chain.
Definition Decl.h:3758
bool isThisDeclarationADemotedDefinition() const
Whether this declaration was a definition in some module but was forced to be a declaration.
Definition Decl.h:3864
unsigned getNumTemplateParameterLists() const
Definition Decl.h:3972
redeclarable_base::redecl_range redecl_range
Definition Decl.h:3778
static DeclContext * castToDeclContext(const TagDecl *D)
Definition Decl.h:3995
bool isDependentType() const
Whether this declaration declares a type that is dependent, i.e., a type that somehow depends on temp...
Definition Decl.h:3857
const Type * getTypeForDecl() const =delete
TagDecl * getMostRecentDecl()
Returns the most recent (re)declaration of this declaration.
void setBraceRange(SourceRange R)
Definition Decl.h:3789
TagDecl * getDefinitionOrSelf() const
Definition Decl.h:3894
TagDecl(Kind DK, TagKind TK, const ASTContext &C, DeclContext *DC, SourceLocation L, IdentifierInfo *Id, TagDecl *PrevDecl, SourceLocation StartL)
void setCompleteDefinition(bool V=true)
True if this decl has its body fully specified.
Definition Decl.h:3815
A convenient class for passing around template argument information.
A template argument list.
Stores a list of template parameters for a TemplateDecl and its derived classes.
A declaration that models statements at global scope.
Definition Decl.h:4631
static bool classofKind(Kind K)
Definition Decl.h:4655
const Stmt * getStmt() const
Definition Decl.h:4649
Stmt * getStmt()
Definition Decl.h:4648
void setSemiMissing(bool Missing=true)
Definition Decl.h:4652
static bool classof(const Decl *D)
Definition Decl.h:4654
static TopLevelStmtDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
friend class ASTDeclReader
Definition Decl.h:4632
bool isSemiMissing() const
Definition Decl.h:4651
friend class ASTDeclWriter
Definition Decl.h:4633
static DeclContext * castToDeclContext(const TopLevelStmtDecl *D)
Definition Decl.h:4657
static TopLevelStmtDecl * castFromDeclContext(const DeclContext *DC)
Definition Decl.h:4660
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
The top declaration context.
Definition Decl.h:105
static TranslationUnitDecl * castFromDeclContext(const DeclContext *DC)
Definition Decl.h:154
static DeclContext * castToDeclContext(const TranslationUnitDecl *D)
Definition Decl.h:151
redeclarable_base::redecl_range redecl_range
Definition Decl.h:131
const TranslationUnitDecl * getCanonicalDecl() const
Definition Decl.h:160
static bool classofKind(Kind K)
Definition Decl.h:150
NamespaceDecl * getAnonymousNamespace() const
Definition Decl.h:143
TranslationUnitDecl * getPreviousDecl()
Return the previous declaration of this declaration or NULL if this is the first declaration.
ASTContext & getASTContext() const
Definition Decl.h:141
redeclarable_base::redecl_iterator redecl_iterator
Definition Decl.h:132
static bool classof(const Decl *D)
Definition Decl.h:149
TranslationUnitDecl * getCanonicalDecl() override
Retrieves the canonical declaration of this translation unit.
Definition Decl.h:159
TranslationUnitDecl * getMostRecentDecl()
Returns the most recent (re)declaration of this declaration.
void setAnonymousNamespace(NamespaceDecl *D)
static TypeAliasDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
TypeAliasTemplateDecl * getDescribedAliasTemplate() const
Definition Decl.h:3706
void setDescribedAliasTemplate(TypeAliasTemplateDecl *TAT)
Definition Decl.h:3707
static bool classof(const Decl *D)
Definition Decl.h:3710
static bool classofKind(Kind K)
Definition Decl.h:3711
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
Declaration of an alias template.
void setLocStart(SourceLocation L)
Definition Decl.h:3548
static bool classofKind(Kind K)
Definition Decl.h:3558
void setTypeForDecl(const Type *TD)
Definition Decl.h:3542
friend class ASTReader
Definition Decl.h:3515
const Type * getTypeForDecl() const
Definition Decl.h:3538
friend class ASTContext
Definition Decl.h:3514
static bool classof(const Decl *D)
Definition Decl.h:3557
TypeDecl(Kind DK, DeclContext *DC, SourceLocation L, const IdentifierInfo *Id, SourceLocation StartL=SourceLocation())
Definition Decl.h:3529
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
Definition Decl.h:3549
SourceLocation getBeginLoc() const LLVM_READONLY
Definition Decl.h:3547
A container of type source information.
The base class of the type hierarchy.
const T * castAs() const
Member-template castAs.
const T * getAs() const
Member-template getAs'.
static bool classofKind(Kind K)
Definition Decl.h:3683
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
static TypedefDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
static bool classof(const Decl *D)
Definition Decl.h:3682
Base class for declarations which introduce a typedef-name.
Definition Decl.h:3562
TypedefNameDecl * getNextRedeclarationImpl() override
Returns the next redeclaration or itself if this is the only decl.
Definition Decl.h:3585
TypeSourceInfo * getTypeSourceInfo() const
Definition Decl.h:3612
Redeclarable< TypedefNameDecl > redeclarable_base
Definition Decl.h:3583
TypedefNameDecl * getPreviousDeclImpl() override
Implementation of getPreviousDecl(), to be overridden by any subclass that has a redeclaration chain.
Definition Decl.h:3589
void setModedTypeSourceInfo(TypeSourceInfo *unmodedTSI, QualType modedTy)
Definition Decl.h:3627
redeclarable_base::redecl_range redecl_range
Definition Decl.h:3598
const Type * getTypeForDecl() const =delete
TypedefNameDecl * getPreviousDecl()
Return the previous declaration of this declaration or NULL if this is the first declaration.
TypedefNameDecl * getMostRecentDecl()
Returns the most recent (re)declaration of this declaration.
void setTypeForDecl(const Type *TD)=delete
bool isModed() const
Definition Decl.h:3608
static bool classof(const Decl *D)
Definition Decl.h:3656
const TypedefNameDecl * getCanonicalDecl() const
Definition Decl.h:3634
TypedefNameDecl * getMostRecentDeclImpl() override
Implementation of getMostRecentDecl(), to be overridden by any subclass that has a redeclaration chai...
Definition Decl.h:3593
TypedefNameDecl(Kind DK, ASTContext &C, DeclContext *DC, SourceLocation StartLoc, SourceLocation IdLoc, const IdentifierInfo *Id, TypeSourceInfo *TInfo)
Definition Decl.h:3577
QualType getUnderlyingType() const
Definition Decl.h:3617
bool isTransparentTag() const
Determines if this typedef shares a name and spelling location with its underlying tag type,...
Definition Decl.h:3645
redeclarable_base::redecl_iterator redecl_iterator
Definition Decl.h:3599
TypedefNameDecl * getCanonicalDecl() override
Retrieves the canonical declaration of this typedef-name.
Definition Decl.h:3633
void setTypeSourceInfo(TypeSourceInfo *newType)
Definition Decl.h:3623
static bool classofKind(Kind K)
Definition Decl.h:3657
TagDecl * getAnonDeclWithTypedefName(bool AnyRedecl=false) const
Retrieves the tag declaration for which this is the typedef name for linkage purposes,...
A set of unresolved declarations.
static bool classof(const Decl *D)
Definition Decl.h:747
ValueDecl(Kind DK, DeclContext *DC, SourceLocation L, DeclarationName N, QualType T)
Definition Decl.h:718
void setType(QualType newType)
Definition Decl.h:724
QualType getType() const
Definition Decl.h:723
bool isParameterPack() const
Determine whether this value is actually a function parameter pack, init-capture pack,...
bool isWeak() const
Determine whether this symbol is weakly-imported, or declared with the weak or weak-ref attr.
static bool classofKind(Kind K)
Definition Decl.h:748
VarDecl * getPotentiallyDecomposedVarDecl()
bool isInitCapture() const
Whether this variable is the implicit variable for a lambda init-capture.
const VarDecl * getPotentiallyDecomposedVarDecl() const
Definition Decl.h:738
friend class ASTDeclReader
Definition Decl.h:1048
friend class VarDecl
Definition Decl.h:1050
friend class ImplicitParamDecl
Definition Decl.h:1049
friend class ParmVarDecl
Definition Decl.h:1011
friend class ASTDeclReader
Definition Decl.h:1010
Represents a variable declaration or definition.
Definition Decl.h:926
const VarDecl * getDefinition() const
Definition Decl.h:1333
VarTemplateDecl * getDescribedVarTemplate() const
Retrieves the variable template that is described by this variable declaration.
void setObjCForDecl(bool FRD)
Definition Decl.h:1536
Stmt ** getInitAddress()
Retrieve the address of the initializer expression.
const VarDecl * getInitializingDeclaration() const
Definition Decl.h:1382
void setCXXForRangeDecl(bool FRD)
Definition Decl.h:1525
DefinitionKind isThisDeclarationADefinition() const
Definition Decl.h:1308
bool isFunctionOrMethodVarDecl() const
Similar to isLocalVarDecl, but excludes variables declared in blocks.
Definition Decl.h:1267
bool isConstexpr() const
Whether this variable is (C++11) constexpr.
Definition Decl.h:1569
void setInstantiationOfStaticDataMember(VarDecl *VD, TemplateSpecializationKind TSK)
Specify that this variable is an instantiation of the static data member VD.
TLSKind getTLSKind() const
DefaultArgKind
Definition Decl.h:1000
@ DAK_Unparsed
Definition Decl.h:1002
@ DAK_None
Definition Decl.h:1001
@ DAK_Normal
Definition Decl.h:1004
@ DAK_Uninstantiated
Definition Decl.h:1003
bool hasICEInitializer(const ASTContext &Context) const
Determine whether the initializer of this variable is an integer constant expression.
redeclarable_base::redecl_range redecl_range
Definition Decl.h:1147
ParmVarDeclBitfields ParmVarDeclBits
Definition Decl.h:1124
void setARCPseudoStrong(bool PS)
Definition Decl.h:1548
VarDecl * getNextRedeclarationImpl() override
Returns the next redeclaration or itself if this is the only decl.
Definition Decl.h:1134
@ NumParameterIndexBits
Definition Decl.h:998
void setInitStyle(InitializationStyle Style)
Definition Decl.h:1452
void setEscapingByref()
Definition Decl.h:1607
redeclarable_base::redecl_iterator redecl_iterator
Definition Decl.h:1148
VarDecl * getMostRecentDecl()
Returns the most recent (re)declaration of this declaration.
void setCXXForRangeImplicitVar(bool FRV)
Definition Decl.h:1627
InitializationStyle getInitStyle() const
The style of initialization for this declaration.
Definition Decl.h:1466
void setInitCapture(bool IC)
Definition Decl.h:1581
DefinitionKind hasDefinition() const
Definition Decl.h:1314
static const char * getStorageClassSpecifierString(StorageClass SC)
Return the string used to specify the storage class SC.
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
bool isOutOfLine() const override
Determine whether this is or was instantiated from an out-of-line definition of a static data member.
VarDecl * getCanonicalDecl() override
Retrieves the "canonical" declaration of the given declaration.
bool hasFlexibleArrayInit(const ASTContext &Ctx) const
Whether this variable has a flexible array member initialized with one or more elements.
bool isNoDestroy(const ASTContext &) const
Is destruction of this variable entirely suppressed?
bool isInitCapture() const
Whether this variable is the implicit variable for a lambda init-capture.
Definition Decl.h:1578
bool isCXXCondDecl() const
Definition Decl.h:1611
friend class StmtIteratorBase
Definition Decl.h:977
InitializationStyle
Initialization styles.
Definition Decl.h:929
@ ListInit
Direct list-initialization (C++11)
Definition Decl.h:937
@ CInit
C-style initialization with assignment.
Definition Decl.h:931
@ ParenListInit
Parenthesized list-initialization (C++20)
Definition Decl.h:940
@ CallInit
Call-style initialization (C++98)
Definition Decl.h:934
void setCXXCondDecl()
Definition Decl.h:1615
bool isObjCForDecl() const
Determine whether this variable is a for-loop declaration for a for-in statement in Objective-C.
Definition Decl.h:1532
void setStorageClass(StorageClass SC)
void setPreviousDeclInSameBlockScope(bool Same)
Definition Decl.h:1593
bool hasInitWithSideEffects() const
Checks whether this declaration has an initializer with side effects.
bool isInlineSpecified() const
Definition Decl.h:1554
APValue * evaluateValue() const
Attempt to evaluate the value of the initializer attached to this declaration, and produce notes expl...
bool isStaticDataMember() const
Determines whether this is a static data member.
Definition Decl.h:1283
static VarDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
VarDecl * getTemplateInstantiationPattern() const
Retrieve the variable declaration from which this variable could be instantiated, if it is an instant...
bool hasGlobalStorage() const
Returns true for all variables that do not have local storage.
Definition Decl.h:1226
VarDeclBitfields VarDeclBits
Definition Decl.h:1123
CharUnits getFlexibleArrayInitChars(const ASTContext &Ctx) const
If hasFlexibleArrayInit is true, compute the number of additional bytes necessary to store those elem...
bool hasConstantInitialization() const
Determine whether this variable has constant initialization.
bool isCXXForRangeDecl() const
Determine whether this variable is the for-range-declaration in a C++0x for-range statement.
Definition Decl.h:1522
friend class ASTDeclReader
Definition Decl.h:975
LanguageLinkage getLanguageLinkage() const
Compute the language linkage.
static bool classofKind(Kind K)
Definition Decl.h:1720
unsigned AllBits
Definition Decl.h:1122
const VarDecl * getDefinition(ASTContext &C) const
Definition Decl.h:1327
friend class ASTNodeImporter
Definition Decl.h:976
EvaluatedStmt * getEvaluatedStmt() const
bool mightBeUsableInConstantExpressions(const ASTContext &C) const
Determine whether this variable's value might be usable in a constant expression, according to the re...
EvaluatedStmt * ensureEvaluatedStmt() const
Convert the initializer for this declaration to the elaborated EvaluatedStmt form,...
bool evaluateDestruction(SmallVectorImpl< PartialDiagnosticAt > &Notes) const
Evaluate the destruction of this variable to determine if it constitutes constant destruction.
static bool classof(const Decl *D)
Definition Decl.h:1719
bool isNRVOVariable() const
Determine whether this local variable can be used with the named return value optimization (NRVO).
Definition Decl.h:1512
void setInlineSpecified()
Definition Decl.h:1558
bool isStaticLocal() const
Returns true if a variable with function scope is a static local variable.
Definition Decl.h:1208
const VarDecl * getCanonicalDecl() const
Definition Decl.h:1289
VarDecl * getInstantiatedFromStaticDataMember() const
If this variable is an instantiated static data member of a class template specialization,...
bool isFileVarDecl() const
Returns true for file scoped variable declaration.
Definition Decl.h:1342
bool isCXXForRangeImplicitVar() const
Whether this variable is the implicit '__range' variable in C++ range-based for loops.
Definition Decl.h:1622
bool isExceptionVariable() const
Determine whether this variable is the exception variable in a C++ catch statememt or an Objective-C ...
Definition Decl.h:1494
void setTemplateSpecializationKind(TemplateSpecializationKind TSK, SourceLocation PointOfInstantiation=SourceLocation())
For a static data member that was instantiated from a static data member of a class template,...
void setTSCSpec(ThreadStorageClassSpecifier TSC)
Definition Decl.h:1173
void setNRVOVariable(bool NRVO)
Definition Decl.h:1515
QualType::DestructionKind needsDestruction(const ASTContext &Ctx) const
Would the destruction of this variable have any effect, and if so, what kind?
bool checkForConstantInitialization(SmallVectorImpl< PartialDiagnosticAt > &Notes) const
Evaluate the initializer of this variable to determine whether it's a constant initializer.
bool isInline() const
Whether this variable is (C++1z) inline.
Definition Decl.h:1551
ThreadStorageClassSpecifier getTSCSpec() const
Definition Decl.h:1177
const Expr * getInit() const
Definition Decl.h:1368
bool isNonEscapingByref() const
Indicates the capture is a __block variable that is never captured by an escaping block.
bool isInExternCContext() const
Determines whether this variable's context is, or is nested within, a C++ extern "C" linkage spec.
NonParmVarDeclBitfields NonParmVarDeclBits
Definition Decl.h:1125
bool hasExternalStorage() const
Returns true if a variable has extern or private_extern storage.
Definition Decl.h:1217
InitType Init
The initializer for this variable or, for a ParmVarDecl, the C++ default argument.
Definition Decl.h:972
Redeclarable< VarDecl > redeclarable_base
Definition Decl.h:1132
APValue * getEvaluatedValue() const
Return the already-evaluated value of this variable's initializer, or NULL if the value is not yet kn...
bool isARCPseudoStrong() const
Determine whether this variable is an ARC pseudo-__strong variable.
Definition Decl.h:1547
bool hasLocalStorage() const
Returns true if a variable with function scope is a non-static local variable.
Definition Decl.h:1184
VarDecl * getInitializingDeclaration()
Get the initializing declaration of this variable, if any.
void setConstexpr(bool IC)
Definition Decl.h:1572
TLSKind
Kinds of thread-local storage.
Definition Decl.h:944
@ TLS_Static
TLS with a known-constant initializer.
Definition Decl.h:949
@ TLS_Dynamic
TLS with a dynamic initializer.
Definition Decl.h:952
@ TLS_None
Not a TLS variable.
Definition Decl.h:946
VarDecl * getActingDefinition()
Get the tentative definition that acts as the real definition in a TU.
DefinitionKind
Definition Decl.h:1293
@ TentativeDefinition
This declaration is a tentative definition.
Definition Decl.h:1298
@ DeclarationOnly
This declaration is only a declaration.
Definition Decl.h:1295
@ Definition
This declaration is definitely a definition.
Definition Decl.h:1301
@ NumScopeDepthOrObjCQualsBits
Definition Decl.h:1007
void setDescribedVarTemplate(VarTemplateDecl *Template)
bool isExternC() const
Determines whether this variable is a variable with external, C linkage.
VarDecl(Kind DK, ASTContext &C, DeclContext *DC, SourceLocation StartLoc, SourceLocation IdLoc, const IdentifierInfo *Id, QualType T, TypeSourceInfo *TInfo, StorageClass SC)
llvm::PointerUnion< Stmt *, EvaluatedStmt * > InitType
Definition Decl.h:968
bool isLocalVarDecl() const
Returns true for local variable declarations other than parameters.
Definition Decl.h:1253
bool isDirectInit() const
Whether the initializer is a direct-initializer (list or call).
Definition Decl.h:1471
VarDecl * getMostRecentDeclImpl() override
Implementation of getMostRecentDecl(), to be overridden by any subclass that has a redeclaration chai...
Definition Decl.h:1142
StorageDuration getStorageDuration() const
Get the storage duration of this variable, per C++ [basic.stc].
Definition Decl.h:1229
StorageClass getStorageClass() const
Returns the storage class as written in the source.
Definition Decl.h:1168
bool isEscapingByref() const
Indicates the capture is a __block variable that is captured by a block that can potentially escape (...
void setImplicitlyInline()
Definition Decl.h:1563
bool isThisDeclarationADemotedDefinition() const
If this definition should pretend to be a declaration.
Definition Decl.h:1476
bool isPreviousDeclInSameBlockScope() const
Whether this local extern variable declaration's previous declaration was declared in the same block ...
Definition Decl.h:1588
VarDecl * getPreviousDecl()
Return the previous declaration of this declaration or NULL if this is the first declaration.
bool isUsableInConstantExpressions(const ASTContext &C) const
Determine whether this variable's value can be used in a constant expression, according to the releva...
bool isInExternCXXContext() const
Determines whether this variable's context is, or is nested within, a C++ extern "C++" linkage spec.
SourceLocation getPointOfInstantiation() const
If this variable is an instantiation of a variable template or a static data member of a class templa...
bool hasDependentAlignment() const
Determines if this variable's alignment is dependent.
TemplateSpecializationKind getTemplateSpecializationKindForInstantiation() const
Get the template specialization kind of this variable for the purposes of template instantiation.
VarDecl * getDefinition()
Definition Decl.h:1330
bool isLocalVarDeclOrParm() const
Similar to isLocalVarDecl but also includes parameters.
Definition Decl.h:1262
TemplateSpecializationKind getTemplateSpecializationKind() const
If this variable is an instantiation of a variable template or a static data member of a class templa...
const VarDecl * getActingDefinition() const
Definition Decl.h:1321
const Expr * getAnyInitializer() const
Get the initializer for this variable, no matter which declaration it is attached to.
Definition Decl.h:1358
void setExceptionVariable(bool EV)
Definition Decl.h:1497
bool isKnownToBeDefined() const
VarDecl * getPreviousDeclImpl() override
Implementation of getPreviousDecl(), to be overridden by any subclass that has a redeclaration chain.
Definition Decl.h:1138
void demoteThisDefinitionToDeclaration()
This is a definition which should be demoted to a declaration.
Definition Decl.h:1486
MemberSpecializationInfo * getMemberSpecializationInfo() const
If this variable is an instantiation of a static data member of a class template specialization,...
Declaration of a variable template.
Represents a C array with a specified size that is not an integer-constant-expression.
Defines the Linkage enumeration and various utility functions.
The JSON file list parser is used to communicate input to InstallAPI.
OverloadedOperatorKind
Enumeration specifying the different kinds of C++ overloaded operators.
@ OO_None
Not an overloaded operator.
bool isa(CodeGen::Address addr)
LazyOffsetPtr< Stmt, uint64_t, &ExternalASTSource::GetExternalDeclStmt > LazyDeclStmtPtr
A lazy pointer to a statement.
ConstexprSpecKind
Define the kind of constexpr specifier.
InClassInitStyle
In-class initialization styles for non-static data members.
@ ICIS_CopyInit
Copy initialization.
@ ICIS_ListInit
Direct list-initialization.
@ ICIS_NoInit
No in-class initializer.
bool IsEnumDeclComplete(EnumDecl *ED)
Check if the given decl is complete.
Definition Decl.h:5364
@ Create
'create' clause, allowed on Compute and Combined constructs, plus 'data', 'enter data',...
nullptr
This class represents a compute construct, representing a 'Kind' of ‘parallel’, 'serial',...
LanguageLinkage
Describes the different kinds of language linkage (C++ [dcl.link]) that an entity may have.
StorageClass
Storage classes.
ThreadStorageClassSpecifier
Thread storage-class-specifier.
@ TSCS_thread_local
C++11 thread_local.
static constexpr StringRef getOpenMPVariantManglingSeparatorStr()
OpenMP variants are mangled early based on their OpenMP context selector.
Definition Decl.h:5381
Linkage
Describes the different kinds of linkage (C++ [basic.link], C99 6.2.2) that an entity may have.
@ Module
Module linkage, which indicates that the entity can be referred to from other translation units withi...
@ Asm
Assembly: we accept this only so that we can preprocess it.
StorageDuration
The storage duration for an object (per C++ [basic.stc]).
@ SD_Thread
Thread storage duration.
@ SD_Static
Static storage duration.
@ SD_Automatic
Automatic storage duration (most local variables).
const FunctionProtoType * T
@ Template
We are parsing a template declaration.
bool hasArmZT0State(const FunctionDecl *FD)
Returns whether the given FunctionDecl has Arm ZT0 state.
TagTypeKind
The kind of a tag type.
@ Interface
The "__interface" keyword.
@ Struct
The "struct" keyword.
@ Class
The "class" keyword.
@ Union
The "union" keyword.
@ Enum
The "enum" keyword.
bool IsEnumDeclScoped(EnumDecl *ED)
Check if the given decl is scoped.
Definition Decl.h:5374
RecordArgPassingKind
Enum that represents the different ways arguments are passed to and returned from function calls.
Definition Decl.h:4298
@ CanPassInRegs
The argument of this type can be passed directly in registers.
Definition Decl.h:4300
@ CanNeverPassInRegs
The argument of this type cannot be passed directly in registers.
Definition Decl.h:4314
@ CannotPassInRegs
The argument of this type cannot be passed directly in registers.
Definition Decl.h:4309
MultiVersionKind
Definition Decl.h:1979
@ TargetClones
Definition Decl.h:1984
@ Target
Definition Decl.h:1981
@ CPUSpecific
Definition Decl.h:1982
@ CPUDispatch
Definition Decl.h:1983
@ TargetVersion
Definition Decl.h:1985
bool isExternalFormalLinkage(Linkage L)
const StreamingDiagnostic & operator<<(const StreamingDiagnostic &DB, const ConceptReference *C)
Insertion operator for diagnostics.
TemplateSpecializationKind
Describes the kind of template specialization that a particular template specialization declaration r...
@ TSK_ImplicitInstantiation
This template specialization was implicitly instantiated from a template.
U cast(CodeGen::Address addr)
@ None
The alignment was not explicit in code.
@ Enum
The "enum" keyword introduces the elaborated-type-specifier.
bool IsArmStreamingFunction(const FunctionDecl *FD, bool IncludeLocallyStreaming)
Returns whether the given FunctionDecl has an __arm[_locally]_streaming attribute.
bool isExternallyVisible(Linkage L)
ImplicitParamKind
Defines the kind of the implicit parameter: is this an implicit parameter with pointer to 'this',...
Definition Decl.h:1726
@ CXXThis
Parameter for C++ 'this' argument.
Definition Decl.h:1734
@ ThreadPrivateVar
Parameter for Thread private variable.
Definition Decl.h:1743
@ Other
Other implicit parameter.
Definition Decl.h:1746
@ CXXVTT
Parameter for C++ virtual table pointers.
Definition Decl.h:1737
@ ObjCSelf
Parameter for Objective-C 'self' argument.
Definition Decl.h:1728
@ ObjCCmd
Parameter for Objective-C '_cmd' argument.
Definition Decl.h:1731
@ CapturedContext
Parameter for captured context.
Definition Decl.h:1740
ExceptionSpecificationType
The various types of exception specifications that exist in C++11.
@ EST_None
no exception specification
Visibility
Describes the different kinds of visibility that a declaration may have.
bool hasArmZAState(const FunctionDecl *FD)
Returns whether the given FunctionDecl has Arm ZA state.
Diagnostic wrappers for TextAPI types for error reporting.
Represents an explicit template argument list in C++, e.g., the "" in "sort".
bool isNull() const
Definition Decl.h:99
AssociatedConstraint(const Expr *ConstraintExpr, UnsignedOrNone ArgPackSubstIndex=std::nullopt)
Definition Decl.h:93
const Expr * ConstraintExpr
Definition Decl.h:88
UnsignedOrNone ArgPackSubstIndex
Definition Decl.h:89
constexpr AssociatedConstraint()=default
A placeholder type used to construct an empty shell of a decl-derived type that will be filled in lat...
DeclarationNameInfo - A collector data type for bundling together a DeclarationName and the correspon...
Structure used to store a statement, the constant value to which it was evaluated (if any),...
Definition Decl.h:887
bool HasConstantDestruction
Whether this variable is known to have constant destruction.
Definition Decl.h:905
EvaluatedStmt()
Definition Decl.h:918
bool WasEvaluated
Whether this statement was already evaluated.
Definition Decl.h:889
bool CheckedForSideEffects
Definition Decl.h:913
bool CheckedForICEInit
Definition Decl.h:910
LazyDeclStmtPtr Value
Definition Decl.h:915
APValue Evaluated
Definition Decl.h:916
bool IsEvaluating
Whether this statement is being evaluated.
Definition Decl.h:892
bool HasConstantInitialization
Whether this variable is known to have constant initialization.
Definition Decl.h:898
bool HasSideEffects
Definition Decl.h:912
bool HasICEInit
In C++98, whether the initializer is an ICE.
Definition Decl.h:909
static StringRef getTagTypeKindName(TagTypeKind Kind)
Describes how types, statements, expressions, and declarations should be printed.
A struct with extended info about a syntactic name qualifier, to be used for the case of out-of-line ...
Definition Decl.h:753
QualifierInfo & operator=(const QualifierInfo &)=delete
TemplateParameterList ** TemplParamLists
A new-allocated array of size NumTemplParamLists, containing pointers to the "outer" template paramet...
Definition Decl.h:767
NestedNameSpecifierLoc QualifierLoc
Definition Decl.h:754
QualifierInfo(const QualifierInfo &)=delete
unsigned NumTemplParamLists
The number of "outer" template parameter lists.
Definition Decl.h:760
void setTemplateParameterListsInfo(ASTContext &Context, ArrayRef< TemplateParameterList * > TPLists)
Sets info about "outer" template parameter lists.
The parameters to pass to a usual operator delete.