File: DiagnosticSemaKinds.td

package info (click to toggle)
llvm-toolchain-5.0 1:5.0.1-2~bpo9+1
  • links: PTS, VCS
  • area: main
  • in suites: stretch-backports
  • size: 553,688 kB
  • sloc: cpp: 2,878,786; ansic: 584,110; asm: 246,252; python: 124,751; objc: 106,925; sh: 21,542; lisp: 8,628; pascal: 5,885; ml: 5,544; perl: 5,312; makefile: 2,208; cs: 2,022; xml: 686; php: 212; csh: 117
file content (9218 lines) | stat: -rw-r--r-- 468,789 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
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
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
7802
7803
7804
7805
7806
7807
7808
7809
7810
7811
7812
7813
7814
7815
7816
7817
7818
7819
7820
7821
7822
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
7979
7980
7981
7982
7983
7984
7985
7986
7987
7988
7989
7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
8153
8154
8155
8156
8157
8158
8159
8160
8161
8162
8163
8164
8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245
8246
8247
8248
8249
8250
8251
8252
8253
8254
8255
8256
8257
8258
8259
8260
8261
8262
8263
8264
8265
8266
8267
8268
8269
8270
8271
8272
8273
8274
8275
8276
8277
8278
8279
8280
8281
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324
8325
8326
8327
8328
8329
8330
8331
8332
8333
8334
8335
8336
8337
8338
8339
8340
8341
8342
8343
8344
8345
8346
8347
8348
8349
8350
8351
8352
8353
8354
8355
8356
8357
8358
8359
8360
8361
8362
8363
8364
8365
8366
8367
8368
8369
8370
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409
8410
8411
8412
8413
8414
8415
8416
8417
8418
8419
8420
8421
8422
8423
8424
8425
8426
8427
8428
8429
8430
8431
8432
8433
8434
8435
8436
8437
8438
8439
8440
8441
8442
8443
8444
8445
8446
8447
8448
8449
8450
8451
8452
8453
8454
8455
8456
8457
8458
8459
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469
8470
8471
8472
8473
8474
8475
8476
8477
8478
8479
8480
8481
8482
8483
8484
8485
8486
8487
8488
8489
8490
8491
8492
8493
8494
8495
8496
8497
8498
8499
8500
8501
8502
8503
8504
8505
8506
8507
8508
8509
8510
8511
8512
8513
8514
8515
8516
8517
8518
8519
8520
8521
8522
8523
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533
8534
8535
8536
8537
8538
8539
8540
8541
8542
8543
8544
8545
8546
8547
8548
8549
8550
8551
8552
8553
8554
8555
8556
8557
8558
8559
8560
8561
8562
8563
8564
8565
8566
8567
8568
8569
8570
8571
8572
8573
8574
8575
8576
8577
8578
8579
8580
8581
8582
8583
8584
8585
8586
8587
8588
8589
8590
8591
8592
8593
8594
8595
8596
8597
8598
8599
8600
8601
8602
8603
8604
8605
8606
8607
8608
8609
8610
8611
8612
8613
8614
8615
8616
8617
8618
8619
8620
8621
8622
8623
8624
8625
8626
8627
8628
8629
8630
8631
8632
8633
8634
8635
8636
8637
8638
8639
8640
8641
8642
8643
8644
8645
8646
8647
8648
8649
8650
8651
8652
8653
8654
8655
8656
8657
8658
8659
8660
8661
8662
8663
8664
8665
8666
8667
8668
8669
8670
8671
8672
8673
8674
8675
8676
8677
8678
8679
8680
8681
8682
8683
8684
8685
8686
8687
8688
8689
8690
8691
8692
8693
8694
8695
8696
8697
8698
8699
8700
8701
8702
8703
8704
8705
8706
8707
8708
8709
8710
8711
8712
8713
8714
8715
8716
8717
8718
8719
8720
8721
8722
8723
8724
8725
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762
8763
8764
8765
8766
8767
8768
8769
8770
8771
8772
8773
8774
8775
8776
8777
8778
8779
8780
8781
8782
8783
8784
8785
8786
8787
8788
8789
8790
8791
8792
8793
8794
8795
8796
8797
8798
8799
8800
8801
8802
8803
8804
8805
8806
8807
8808
8809
8810
8811
8812
8813
8814
8815
8816
8817
8818
8819
8820
8821
8822
8823
8824
8825
8826
8827
8828
8829
8830
8831
8832
8833
8834
8835
8836
8837
8838
8839
8840
8841
8842
8843
8844
8845
8846
8847
8848
8849
8850
8851
8852
8853
8854
8855
8856
8857
8858
8859
8860
8861
8862
8863
8864
8865
8866
8867
8868
8869
8870
8871
8872
8873
8874
8875
8876
8877
8878
8879
8880
8881
8882
8883
8884
8885
8886
8887
8888
8889
8890
8891
8892
8893
8894
8895
8896
8897
8898
8899
8900
8901
8902
8903
8904
8905
8906
8907
8908
8909
8910
8911
8912
8913
8914
8915
8916
8917
8918
8919
8920
8921
8922
8923
8924
8925
8926
8927
8928
8929
8930
8931
8932
8933
8934
8935
8936
8937
8938
8939
8940
8941
8942
8943
8944
8945
8946
8947
8948
8949
8950
8951
8952
8953
8954
8955
8956
8957
8958
8959
8960
8961
8962
8963
8964
8965
8966
8967
8968
8969
8970
8971
8972
8973
8974
8975
8976
8977
8978
8979
8980
8981
8982
8983
8984
8985
8986
8987
8988
8989
8990
8991
8992
8993
8994
8995
8996
8997
8998
8999
9000
9001
9002
9003
9004
9005
9006
9007
9008
9009
9010
9011
9012
9013
9014
9015
9016
9017
9018
9019
9020
9021
9022
9023
9024
9025
9026
9027
9028
9029
9030
9031
9032
9033
9034
9035
9036
9037
9038
9039
9040
9041
9042
9043
9044
9045
9046
9047
9048
9049
9050
9051
9052
9053
9054
9055
9056
9057
9058
9059
9060
9061
9062
9063
9064
9065
9066
9067
9068
9069
9070
9071
9072
9073
9074
9075
9076
9077
9078
9079
9080
9081
9082
9083
9084
9085
9086
9087
9088
9089
9090
9091
9092
9093
9094
9095
9096
9097
9098
9099
9100
9101
9102
9103
9104
9105
9106
9107
9108
9109
9110
9111
9112
9113
9114
9115
9116
9117
9118
9119
9120
9121
9122
9123
9124
9125
9126
9127
9128
9129
9130
9131
9132
9133
9134
9135
9136
9137
9138
9139
9140
9141
9142
9143
9144
9145
9146
9147
9148
9149
9150
9151
9152
9153
9154
9155
9156
9157
9158
9159
9160
9161
9162
9163
9164
9165
9166
9167
9168
9169
9170
9171
9172
9173
9174
9175
9176
9177
9178
9179
9180
9181
9182
9183
9184
9185
9186
9187
9188
9189
9190
9191
9192
9193
9194
9195
9196
9197
9198
9199
9200
9201
9202
9203
9204
9205
9206
9207
9208
9209
9210
9211
9212
9213
9214
9215
9216
9217
9218
//==--- DiagnosticSemaKinds.td - libsema diagnostics ----------------------===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//

//===----------------------------------------------------------------------===//
// Semantic Analysis
//===----------------------------------------------------------------------===//

let Component = "Sema" in {
let CategoryName = "Semantic Issue" in {

def note_previous_decl : Note<"%0 declared here">;
def note_entity_declared_at : Note<"%0 declared here">;
def note_callee_decl : Note<"%0 declared here">;
def note_defined_here : Note<"%0 defined here">;

// For loop analysis
def warn_variables_not_in_loop_body : Warning<
  "variable%select{s| %1|s %1 and %2|s %1, %2, and %3|s %1, %2, %3, and %4}0 "
  "used in loop condition not modified in loop body">,
  InGroup<ForLoopAnalysis>, DefaultIgnore;
def warn_redundant_loop_iteration : Warning<
  "variable %0 is %select{decremented|incremented}1 both in the loop header "
  "and in the loop body">,
  InGroup<ForLoopAnalysis>, DefaultIgnore;
def note_loop_iteration_here : Note<"%select{decremented|incremented}0 here">;

def warn_duplicate_enum_values : Warning<
  "element %0 has been implicitly assigned %1 which another element has "
  "been assigned">, InGroup<DiagGroup<"duplicate-enum">>, DefaultIgnore;
def note_duplicate_element : Note<"element %0 also has value %1">;

// Absolute value functions
def warn_unsigned_abs : Warning<
  "taking the absolute value of unsigned type %0 has no effect">,
  InGroup<AbsoluteValue>;
def note_remove_abs : Note<
  "remove the call to '%0' since unsigned values cannot be negative">;
def warn_abs_too_small : Warning<
  "absolute value function %0 given an argument of type %1 but has parameter "
  "of type %2 which may cause truncation of value">, InGroup<AbsoluteValue>;
def warn_wrong_absolute_value_type : Warning<
  "using %select{integer|floating point|complex}1 absolute value function %0 "
  "when argument is of %select{integer|floating point|complex}2 type">,
  InGroup<AbsoluteValue>;
def note_replace_abs_function : Note<"use function '%0' instead">;
def warn_pointer_abs : Warning<
  "taking the absolute value of %select{pointer|function|array}0 type %1 is suspicious">,
  InGroup<AbsoluteValue>;

def warn_max_unsigned_zero : Warning<
  "taking the max of "
  "%select{a value and unsigned zero|unsigned zero and a value}0 "
  "is always equal to the other value">,
  InGroup<MaxUnsignedZero>;
def note_remove_max_call : Note<
  "remove call to max function and unsigned zero argument">;

def warn_infinite_recursive_function : Warning<
  "all paths through this function will call itself">,
  InGroup<InfiniteRecursion>, DefaultIgnore;

def warn_comma_operator : Warning<"possible misuse of comma operator here">,
  InGroup<DiagGroup<"comma">>, DefaultIgnore;
def note_cast_to_void : Note<"cast expression to void to silence warning">;

// Constant expressions
def err_expr_not_ice : Error<
  "expression is not an %select{integer|integral}0 constant expression">;
def ext_expr_not_ice : Extension<
  "expression is not an %select{integer|integral}0 constant expression; "
  "folding it to a constant is a GNU extension">, InGroup<GNUFoldingConstant>;
def err_typecheck_converted_constant_expression : Error<
  "value of type %0 is not implicitly convertible to %1">;
def err_typecheck_converted_constant_expression_disallowed : Error<
  "conversion from %0 to %1 is not allowed in a converted constant expression">;
def err_typecheck_converted_constant_expression_indirect : Error<
  "conversion from %0 to %1 in converted constant expression would "
  "bind reference to a temporary">;
def err_expr_not_cce : Error<
  "%select{case value|enumerator value|non-type template argument|"
  "array size|constexpr if condition}0 "
  "is not a constant expression">;
def ext_cce_narrowing : ExtWarn<
  "%select{case value|enumerator value|non-type template argument|"
  "array size|constexpr if condition}0 "
  "%select{cannot be narrowed from type %2 to %3|"
  "evaluates to %2, which cannot be narrowed to type %3}1">,
  InGroup<CXX11Narrowing>, DefaultError, SFINAEFailure;
def err_ice_not_integral : Error<
  "integral constant expression must have integral or unscoped enumeration "
  "type, not %0">;
def err_ice_incomplete_type : Error<
  "integral constant expression has incomplete class type %0">;
def err_ice_explicit_conversion : Error<
  "integral constant expression requires explicit conversion from %0 to %1">;
def note_ice_conversion_here : Note<
  "conversion to %select{integral|enumeration}0 type %1 declared here">;
def err_ice_ambiguous_conversion : Error<
  "ambiguous conversion from type %0 to an integral or unscoped "
  "enumeration type">;
def err_ice_too_large : Error<
  "integer constant expression evaluates to value %0 that cannot be "
  "represented in a %1-bit %select{signed|unsigned}2 integer type">;
def err_expr_not_string_literal : Error<"expression is not a string literal">;

// Semantic analysis of constant literals.
def ext_predef_outside_function : Warning<
  "predefined identifier is only valid inside function">,
  InGroup<DiagGroup<"predefined-identifier-outside-function">>;
def warn_float_overflow : Warning<
  "magnitude of floating-point constant too large for type %0; maximum is %1">,
   InGroup<LiteralRange>;
def warn_float_underflow : Warning<
  "magnitude of floating-point constant too small for type %0; minimum is %1">,
  InGroup<LiteralRange>;
def warn_double_const_requires_fp64 : Warning<
  "double precision constant requires cl_khr_fp64, casting to single precision">;
def err_half_const_requires_fp16 : Error<
  "half precision constant requires cl_khr_fp16">;

// C99 variable-length arrays
def ext_vla : Extension<"variable length arrays are a C99 feature">,
  InGroup<VLAExtension>;
def warn_vla_used : Warning<"variable length array used">,
  InGroup<VLA>, DefaultIgnore;
def err_vla_in_sfinae : Error<
  "variable length array cannot be formed during template argument deduction">;
def err_array_star_in_function_definition : Error<
  "variable length array must be bound in function definition">;
def err_vla_decl_in_file_scope : Error<
  "variable length array declaration not allowed at file scope">;
def err_vla_decl_has_static_storage : Error<
  "variable length array declaration cannot have 'static' storage duration">;
def err_vla_decl_has_extern_linkage : Error<
  "variable length array declaration cannot have 'extern' linkage">;
def ext_vla_folded_to_constant : Extension<
  "variable length array folded to constant array as an extension">, InGroup<GNUFoldingConstant>;

// C99 variably modified types
def err_variably_modified_template_arg : Error<
  "variably modified type %0 cannot be used as a template argument">;
def err_variably_modified_nontype_template_param : Error<
  "non-type template parameter of variably modified type %0">;
def err_variably_modified_new_type : Error<
  "'new' cannot allocate object of variably modified type %0">;

// C99 Designated Initializers
def ext_designated_init : Extension<
  "designated initializers are a C99 feature">, InGroup<C99>;
def err_array_designator_negative : Error<
  "array designator value '%0' is negative">;
def err_array_designator_empty_range : Error<
  "array designator range [%0, %1] is empty">;
def err_array_designator_non_array : Error<
  "array designator cannot initialize non-array type %0">;
def err_array_designator_too_large : Error<
  "array designator index (%0) exceeds array bounds (%1)">;
def err_field_designator_non_aggr : Error<
  "field designator cannot initialize a "
  "%select{non-struct, non-union|non-class}0 type %1">;
def err_field_designator_unknown : Error<
  "field designator %0 does not refer to any field in type %1">;
def err_field_designator_nonfield : Error<
  "field designator %0 does not refer to a non-static data member">;
def note_field_designator_found : Note<"field designator refers here">;
def err_designator_for_scalar_init : Error<
  "designator in initializer for scalar type %0">;
def warn_subobject_initializer_overrides : Warning<
  "subobject initialization overrides initialization of other fields "
  "within its enclosing subobject">, InGroup<InitializerOverrides>;
def warn_initializer_overrides : Warning<
  "initializer overrides prior initialization of this subobject">,
  InGroup<InitializerOverrides>;
def note_previous_initializer : Note<
  "previous initialization %select{|with side effects }0is here"
  "%select{| (side effects may not occur at run time)}0">;
def err_designator_into_flexible_array_member : Error<
  "designator into flexible array member subobject">;
def note_flexible_array_member : Note<
  "initialized flexible array member %0 is here">;
def ext_flexible_array_init : Extension<
  "flexible array initialization is a GNU extension">, InGroup<GNUFlexibleArrayInitializer>;

// Declarations.
def ext_duplicate_declspec : ExtWarn<"duplicate '%0' declaration specifier">,
  InGroup<DuplicateDeclSpecifier>;
def warn_duplicate_declspec : Warning<"duplicate '%0' declaration specifier">,
  InGroup<DuplicateDeclSpecifier>;
def ext_plain_complex : ExtWarn<
  "plain '_Complex' requires a type specifier; assuming '_Complex double'">;
def ext_integer_complex : Extension<
  "complex integer types are a GNU extension">, InGroup<GNUComplexInteger>;

def err_invalid_sign_spec : Error<"'%0' cannot be signed or unsigned">;
def err_invalid_width_spec : Error<
  "'%select{|short|long|long long}0 %1' is invalid">;
def err_invalid_complex_spec : Error<"'_Complex %0' is invalid">;
def err_friend_decl_spec : Error<"'%0' is invalid in friend declarations">;

def ext_auto_type_specifier : ExtWarn<
  "'auto' type specifier is a C++11 extension">, InGroup<CXX11>;
def warn_auto_storage_class : Warning<
  "'auto' storage class specifier is redundant and incompatible with C++11">,
  InGroup<CXX11Compat>, DefaultIgnore;

def warn_deprecated_register : Warning<
  "'register' storage class specifier is deprecated "
  "and incompatible with C++17">, InGroup<DeprecatedRegister>;
def ext_register_storage_class : ExtWarn<
  "ISO C++17 does not allow 'register' storage class specifier">,
  DefaultError, InGroup<Register>;

def err_invalid_decl_spec_combination : Error<
  "cannot combine with previous '%0' declaration specifier">;
def err_invalid_vector_decl_spec_combination : Error<
  "cannot combine with previous '%0' declaration specifier. "
  "'__vector' must be first">;
def err_invalid_pixel_decl_spec_combination : Error<
  "'__pixel' must be preceded by '__vector'.  "
  "'%0' declaration specifier not allowed here">;
def err_invalid_vector_bool_decl_spec : Error<
  "cannot use '%0' with '__vector bool'">;
def err_invalid_vector_long_decl_spec : Error<
  "cannot use 'long' with '__vector'">;
def err_invalid_vector_float_decl_spec : Error<
  "cannot use 'float' with '__vector'">;
def err_invalid_vector_double_decl_spec : Error <
  "use of 'double' with '__vector' requires VSX support to be enabled "
  "(available on POWER7 or later)">;
def err_invalid_vector_long_long_decl_spec : Error <
  "use of 'long long' with '__vector bool' requires VSX support (available on "
  "POWER7 or later) or extended Altivec support (available on POWER8 or later) " 
  "to be enabled">;
def err_invalid_vector_long_double_decl_spec : Error<
  "cannot use 'long double' with '__vector'">;
def warn_vector_long_decl_spec_combination : Warning<
  "Use of 'long' with '__vector' is deprecated">, InGroup<Deprecated>;

def err_use_of_tag_name_without_tag : Error<
  "must use '%1' tag to refer to type %0%select{| in this scope}2">;

def err_redeclaration_different_type : Error<
  "redeclaration of %0 with a different type%diff{: $ vs $|}1,2">;
def err_bad_variable_name : Error<
  "%0 cannot be the name of a variable or data member">;
def err_bad_parameter_name : Error<
  "%0 cannot be the name of a parameter">;
def err_parameter_name_omitted : Error<"parameter name omitted">;
def err_anyx86_interrupt_attribute : Error<
  "%select{x86|x86-64}0 'interrupt' attribute only applies to functions that "
  "have %select{a 'void' return type|"
  "only a pointer parameter optionally followed by an integer parameter|"
  "a pointer as the first parameter|a %2 type as the second parameter}1">;
def err_anyx86_interrupt_called : Error<
  "interrupt service routine cannot be called directly">;
def warn_arm_interrupt_calling_convention : Warning<
   "call to function without interrupt attribute could clobber interruptee's VFP registers">,
   InGroup<Extra>;
def warn_mips_interrupt_attribute : Warning<
   "MIPS 'interrupt' attribute only applies to functions that have "
   "%select{no parameters|a 'void' return type}0">,
   InGroup<IgnoredAttributes>;
def warn_unused_parameter : Warning<"unused parameter %0">,
  InGroup<UnusedParameter>, DefaultIgnore;
def warn_unused_variable : Warning<"unused variable %0">,
  InGroup<UnusedVariable>, DefaultIgnore;
def warn_unused_local_typedef : Warning<
  "unused %select{typedef|type alias}0 %1">,
  InGroup<UnusedLocalTypedef>, DefaultIgnore;
def warn_unused_property_backing_ivar : 
  Warning<"ivar %0 which backs the property is not "
  "referenced in this property's accessor">,
  InGroup<UnusedPropertyIvar>, DefaultIgnore;
def warn_unused_const_variable : Warning<"unused variable %0">,
  InGroup<UnusedConstVariable>, DefaultIgnore;
def warn_unused_exception_param : Warning<"unused exception parameter %0">,
  InGroup<UnusedExceptionParameter>, DefaultIgnore;
def warn_decl_in_param_list : Warning<
  "declaration of %0 will not be visible outside of this function">,
  InGroup<Visibility>;
def warn_redefinition_in_param_list : Warning<
  "redefinition of %0 will not be visible outside of this function">,
  InGroup<Visibility>;
def warn_empty_parens_are_function_decl : Warning<
  "empty parentheses interpreted as a function declaration">,
  InGroup<VexingParse>;
def warn_parens_disambiguated_as_function_declaration : Warning<
  "parentheses were disambiguated as a function declaration">,
  InGroup<VexingParse>;
def note_additional_parens_for_variable_declaration : Note<
  "add a pair of parentheses to declare a variable">;
def note_empty_parens_function_call : Note<
  "change this ',' to a ';' to call %0">;
def note_empty_parens_default_ctor : Note<
  "remove parentheses to declare a variable">;
def note_empty_parens_zero_initialize : Note<
  "replace parentheses with an initializer to declare a variable">;
def warn_unused_function : Warning<"unused function %0">,
  InGroup<UnusedFunction>, DefaultIgnore;
def warn_unused_template : Warning<"unused %select{function|variable}0 template %1">,
  InGroup<UnusedTemplate>, DefaultIgnore;
def warn_unused_member_function : Warning<"unused member function %0">,
  InGroup<UnusedMemberFunction>, DefaultIgnore;
def warn_used_but_marked_unused: Warning<"%0 was marked unused but was used">,
  InGroup<UsedButMarkedUnused>, DefaultIgnore;
def warn_unneeded_internal_decl : Warning<
  "%select{function|variable}0 %1 is not needed and will not be emitted">,
  InGroup<UnneededInternalDecl>, DefaultIgnore;
def warn_unneeded_static_internal_decl : Warning<
  "'static' function %0 declared in header file "
  "should be declared 'static inline'">,
  InGroup<UnneededInternalDecl>, DefaultIgnore;
def warn_unneeded_member_function : Warning<
  "member function %0 is not needed and will not be emitted">,
  InGroup<UnneededMemberFunction>, DefaultIgnore;
def warn_unused_private_field: Warning<"private field %0 is not used">,
  InGroup<UnusedPrivateField>, DefaultIgnore;
def warn_unused_lambda_capture: Warning<"lambda capture %0 is not "
  "%select{used|required to be captured for this use}1">,
  InGroup<UnusedLambdaCapture>, DefaultIgnore;

def warn_parameter_size: Warning<
  "%0 is a large (%1 bytes) pass-by-value argument; "
  "pass it by reference instead ?">, InGroup<LargeByValueCopy>;
def warn_return_value_size: Warning<
  "return value of %0 is a large (%1 bytes) pass-by-value object; "
  "pass it by reference instead ?">, InGroup<LargeByValueCopy>;
def warn_return_value_udt: Warning<
  "%0 has C-linkage specified, but returns user-defined type %1 which is "
  "incompatible with C">, InGroup<ReturnTypeCLinkage>;
def warn_return_value_udt_incomplete: Warning<
  "%0 has C-linkage specified, but returns incomplete type %1 which could be "
  "incompatible with C">, InGroup<ReturnTypeCLinkage>;
def warn_implicit_function_decl : Warning<
  "implicit declaration of function %0">,
  InGroup<ImplicitFunctionDeclare>, DefaultIgnore;
def ext_implicit_function_decl : ExtWarn<
  "implicit declaration of function %0 is invalid in C99">,
  InGroup<ImplicitFunctionDeclare>;
def note_function_suggestion : Note<"did you mean %0?">;

def err_ellipsis_first_param : Error<
  "ISO C requires a named parameter before '...'">;
def err_declarator_need_ident : Error<"declarator requires an identifier">;
def err_language_linkage_spec_unknown : Error<"unknown linkage language">;
def err_language_linkage_spec_not_ascii : Error<
  "string literal in language linkage specifier cannot have an "
  "encoding-prefix">;
def warn_use_out_of_scope_declaration : Warning<
  "use of out-of-scope declaration of %0">;
def err_inline_non_function : Error<
  "'inline' can only appear on functions%select{| and non-local variables}0">;
def err_noreturn_non_function : Error<
  "'_Noreturn' can only appear on functions">;
def warn_qual_return_type : Warning< 
  "'%0' type qualifier%s1 on return type %plural{1:has|:have}1 no effect">,
  InGroup<IgnoredQualifiers>, DefaultIgnore;
def warn_deprecated_redundant_constexpr_static_def : Warning<
  "out-of-line definition of constexpr static data member is redundant "
  "in C++17 and is deprecated">,
  InGroup<Deprecated>, DefaultIgnore;

def warn_decl_shadow :
  Warning<"declaration shadows a %select{"
          "local variable|"
          "variable in %2|"
          "static data member of %2|"
          "field of %2|"
          "typedef in %2|"
          "type alias in %2}1">,
  InGroup<Shadow>, DefaultIgnore;
def warn_decl_shadow_uncaptured_local :
  Warning<warn_decl_shadow.Text>,
  InGroup<ShadowUncapturedLocal>, DefaultIgnore;
def warn_ctor_parm_shadows_field:
  Warning<"constructor parameter %0 shadows the field %1 of %2">,
  InGroup<ShadowFieldInConstructor>, DefaultIgnore;
def warn_modifying_shadowing_decl :
  Warning<"modifying constructor parameter %0 that shadows a "
          "field of %1">,
  InGroup<ShadowFieldInConstructorModified>, DefaultIgnore;

// C++ decomposition declarations
def err_decomp_decl_context : Error<
  "decomposition declaration not permitted in this context">;
def warn_cxx14_compat_decomp_decl : Warning<
  "decomposition declarations are incompatible with "
  "C++ standards before C++17">, DefaultIgnore, InGroup<CXXPre1zCompat>;
def ext_decomp_decl : ExtWarn<
  "decomposition declarations are a C++17 extension">, InGroup<CXX17>;
def err_decomp_decl_spec : Error<
  "decomposition declaration cannot be declared "
  "%plural{1:'%1'|:with '%1' specifiers}0">;
def err_decomp_decl_type : Error<
  "decomposition declaration cannot be declared with type %0; "
  "declared type must be 'auto' or reference to 'auto'">;
def err_decomp_decl_parens : Error<
  "decomposition declaration cannot be declared with parentheses">;
def err_decomp_decl_template : Error<
  "decomposition declaration template not supported">;
def err_decomp_decl_not_alone : Error<
  "decomposition declaration must be the only declaration in its group">;
def err_decomp_decl_requires_init : Error<
  "decomposition declaration %0 requires an initializer">;
def err_decomp_decl_wrong_number_bindings : Error<
  "type %0 decomposes into %2 elements, but %select{only |}3%1 "
  "names were provided">;
def err_decomp_decl_unbindable_type : Error<
  "cannot decompose %select{union|non-class, non-array}1 type %2">;
def err_decomp_decl_multiple_bases_with_members : Error<
  "cannot decompose class type %1: "
  "%select{its base classes %2 and|both it and its base class}0 %3 "
  "have non-static data members">;
def err_decomp_decl_ambiguous_base : Error<
  "cannot decompose members of ambiguous base class %1 of %0:%2">;
def err_decomp_decl_non_public_base : Error<
  "cannot decompose members of non-public base class %1 of %0">;
def err_decomp_decl_non_public_member : Error<
  "cannot decompose non-public member %0 of %1">;
def err_decomp_decl_anon_union_member : Error<
  "cannot decompose class type %0 because it has an anonymous "
  "%select{struct|union}1 member">;
def err_decomp_decl_std_tuple_element_not_specialized : Error<
  "cannot decompose this type; 'std::tuple_element<%0>::type' "
  "does not name a type">;
def err_decomp_decl_std_tuple_size_not_constant : Error<
  "cannot decompose this type; 'std::tuple_size<%0>::value' "
  "is not a valid integral constant expression">;
def note_in_binding_decl_init : Note<
  "in implicit initialization of binding declaration %0">;

def err_std_type_trait_not_class_template : Error<
  "unsupported standard library implementation: "
  "'std::%0' is not a class template">;

// C++ using declarations
def err_using_requires_qualname : Error<
  "using declaration requires a qualified name">;
def err_using_typename_non_type : Error<
  "'typename' keyword used on a non-type">;
def err_using_dependent_value_is_type : Error<
  "dependent using declaration resolved to type without 'typename'">;
def err_using_decl_nested_name_specifier_is_not_class : Error<
  "using declaration in class refers into '%0', which is not a class">;
def err_using_decl_nested_name_specifier_is_current_class : Error<
  "using declaration refers to its own class">;
def err_using_decl_nested_name_specifier_is_not_base_class : Error<
  "using declaration refers into '%0', which is not a base class of %1">;
def err_using_decl_constructor_not_in_direct_base : Error<
  "%0 is not a direct base of %1, cannot inherit constructors">;
def err_using_decl_can_not_refer_to_class_member : Error<
  "using declaration cannot refer to class member">;
def err_ambiguous_inherited_constructor : Error<
  "constructor of %0 inherited from multiple base class subobjects">;
def note_ambiguous_inherited_constructor_using : Note<
  "inherited from base class %0 here">;
def note_using_decl_class_member_workaround : Note<
  "use %select{an alias declaration|a typedef declaration|a reference|"
  "a const variable|a constexpr variable}0 instead">;
def err_using_decl_can_not_refer_to_namespace : Error<
  "using declaration cannot refer to a namespace">;
def err_using_decl_can_not_refer_to_scoped_enum : Error<
  "using declaration cannot refer to a scoped enumerator">;
def err_using_decl_constructor : Error<
  "using declaration cannot refer to a constructor">;
def warn_cxx98_compat_using_decl_constructor : Warning<
  "inheriting constructors are incompatible with C++98">,
  InGroup<CXX98Compat>, DefaultIgnore;
def err_using_decl_destructor : Error<
  "using declaration cannot refer to a destructor">;
def err_using_decl_template_id : Error<
  "using declaration cannot refer to a template specialization">;
def note_using_decl_target : Note<"target of using declaration">;
def note_using_decl_conflict : Note<"conflicting declaration">;
def err_using_decl_redeclaration : Error<"redeclaration of using declaration">;
def err_using_decl_conflict : Error<
  "target of using declaration conflicts with declaration already in scope">;
def err_using_decl_conflict_reverse : Error<
  "declaration conflicts with target of using declaration already in scope">;
def note_using_decl : Note<"%select{|previous }0using declaration">;
def err_using_decl_redeclaration_expansion : Error<
  "using declaration pack expansion at block scope produces multiple values">;

def warn_access_decl_deprecated : Warning<
  "access declarations are deprecated; use using declarations instead">,
  InGroup<Deprecated>;
def err_access_decl : Error<
  "ISO C++11 does not allow access declarations; "
  "use using declarations instead">;
def ext_dynamic_exception_spec : ExtWarn<
  "ISO C++17 does not allow dynamic exception specifications">,
  InGroup<DynamicExceptionSpec>, DefaultError;
def warn_exception_spec_deprecated : Warning<
  "dynamic exception specifications are deprecated">,
  InGroup<DeprecatedDynamicExceptionSpec>, DefaultIgnore;
def note_exception_spec_deprecated : Note<"use '%0' instead">;
def warn_deprecated_copy_operation : Warning<
  "definition of implicit copy %select{constructor|assignment operator}1 "
  "for %0 is deprecated because it has a user-declared "
  "%select{copy %select{assignment operator|constructor}1|destructor}2">,
  InGroup<Deprecated>, DefaultIgnore;
def warn_cxx1z_compat_exception_spec_in_signature : Warning<
  "mangled name of %0 will change in C++17 due to non-throwing exception "
  "specification in function signature">, InGroup<CXX17CompatMangling>;

def warn_global_constructor : Warning<
  "declaration requires a global constructor">,
  InGroup<GlobalConstructors>, DefaultIgnore;
def warn_global_destructor : Warning<
  "declaration requires a global destructor">,
   InGroup<GlobalConstructors>, DefaultIgnore;
def warn_exit_time_destructor : Warning<
  "declaration requires an exit-time destructor">,
  InGroup<ExitTimeDestructors>, DefaultIgnore;

def err_invalid_thread : Error<
  "'%0' is only allowed on variable declarations">;
def err_thread_non_global : Error<
  "'%0' variables must have global storage">;
def err_thread_unsupported : Error<
  "thread-local storage is not supported for the current target">;

def warn_maybe_falloff_nonvoid_function : Warning<
  "control may reach end of non-void function">,
  InGroup<ReturnType>;
def warn_falloff_nonvoid_function : Warning<
  "control reaches end of non-void function">,
  InGroup<ReturnType>;
def err_maybe_falloff_nonvoid_block : Error<
  "control may reach end of non-void block">;
def err_falloff_nonvoid_block : Error<
  "control reaches end of non-void block">;
def warn_maybe_falloff_nonvoid_coroutine : Warning<
  "control may reach end of coroutine; which is undefined behavior because the promise type %0 does not declare 'return_void()'">,
  InGroup<ReturnType>;
def warn_falloff_nonvoid_coroutine : Warning<
  "control reaches end of coroutine; which is undefined behavior because the promise type %0 does not declare 'return_void()'">,
  InGroup<ReturnType>;
def warn_suggest_noreturn_function : Warning<
  "%select{function|method}0 %1 could be declared with attribute 'noreturn'">,
  InGroup<MissingNoreturn>, DefaultIgnore;
def warn_suggest_noreturn_block : Warning<
  "block could be declared with attribute 'noreturn'">,
  InGroup<MissingNoreturn>, DefaultIgnore;

// Unreachable code.
def warn_unreachable : Warning<
  "code will never be executed">,
  InGroup<UnreachableCode>, DefaultIgnore;
def warn_unreachable_break : Warning<
  "'break' will never be executed">,
  InGroup<UnreachableCodeBreak>, DefaultIgnore;
def warn_unreachable_return : Warning<
  "'return' will never be executed">,
  InGroup<UnreachableCodeReturn>, DefaultIgnore;
def warn_unreachable_loop_increment : Warning<
  "loop will run at most once (loop increment never executed)">,
  InGroup<UnreachableCodeLoopIncrement>, DefaultIgnore;
def note_unreachable_silence : Note<
  "silence by adding parentheses to mark code as explicitly dead">;

/// Built-in functions.
def ext_implicit_lib_function_decl : ExtWarn<
  "implicitly declaring library function '%0' with type %1">,
  InGroup<ImplicitFunctionDeclare>;
def note_include_header_or_declare : Note<
  "include the header <%0> or explicitly provide a declaration for '%1'">;
def note_previous_builtin_declaration : Note<"%0 is a builtin with type %1">;
def warn_implicit_decl_requires_sysheader : Warning<
  "declaration of built-in function '%1' requires inclusion of the header <%0>">,
  InGroup<BuiltinRequiresHeader>;
def warn_redecl_library_builtin : Warning<
  "incompatible redeclaration of library function %0">,
  InGroup<DiagGroup<"incompatible-library-redeclaration">>;
def err_builtin_definition : Error<"definition of builtin function %0">;
def err_arm_invalid_specialreg : Error<"invalid special register for builtin">;
def err_invalid_cpu_supports : Error<"invalid cpu feature string for builtin">;
def err_builtin_needs_feature : Error<"%0 needs target feature %1">;
def err_function_needs_feature
    : Error<"always_inline function %1 requires target feature '%2', but would "
            "be inlined into function %0 that is compiled without support for "
            "'%2'">;
def warn_builtin_unknown : Warning<"use of unknown builtin %0">,
  InGroup<ImplicitFunctionDeclare>, DefaultError;
def warn_dyn_class_memaccess : Warning<
  "%select{destination for|source of|first operand of|second operand of}0 this "
  "%1 call is a pointer to %select{|class containing a }2dynamic class %3; "
  "vtable pointer will be %select{overwritten|copied|moved|compared}4">,
  InGroup<DiagGroup<"dynamic-class-memaccess">>;
def note_bad_memaccess_silence : Note<
  "explicitly cast the pointer to silence this warning">;
def warn_sizeof_pointer_expr_memaccess : Warning<
  "'%0' call operates on objects of type %1 while the size is based on a " 
  "different type %2">, 
  InGroup<SizeofPointerMemaccess>;
def warn_sizeof_pointer_expr_memaccess_note : Note<
  "did you mean to %select{dereference the argument to 'sizeof' (and multiply "
  "it by the number of elements)|remove the addressof in the argument to "
  "'sizeof' (and multiply it by the number of elements)|provide an explicit "
  "length}0?">;
def warn_sizeof_pointer_type_memaccess : Warning<
  "argument to 'sizeof' in %0 call is the same pointer type %1 as the "
  "%select{destination|source}2; expected %3 or an explicit length">,
  InGroup<SizeofPointerMemaccess>;
def warn_strlcpycat_wrong_size : Warning<
  "size argument in %0 call appears to be size of the source; "
  "expected the size of the destination">,
  InGroup<DiagGroup<"strlcpy-strlcat-size">>;
def note_strlcpycat_wrong_size : Note<
  "change size argument to be the size of the destination">;
def warn_memsize_comparison : Warning<
  "size argument in %0 call is a comparison">,
  InGroup<DiagGroup<"memsize-comparison">>;
def note_memsize_comparison_paren : Note<
  "did you mean to compare the result of %0 instead?">;
def note_memsize_comparison_cast_silence : Note<
  "explicitly cast the argument to size_t to silence this warning">;
  
def warn_strncat_large_size : Warning<
  "the value of the size argument in 'strncat' is too large, might lead to a " 
  "buffer overflow">, InGroup<StrncatSize>;
def warn_strncat_src_size : Warning<"size argument in 'strncat' call appears " 
  "to be size of the source">, InGroup<StrncatSize>;
def warn_strncat_wrong_size : Warning<
  "the value of the size argument to 'strncat' is wrong">, InGroup<StrncatSize>;
def note_strncat_wrong_size : Note<
  "change the argument to be the free space in the destination buffer minus " 
  "the terminating null byte">;

def warn_assume_side_effects : Warning<
  "the argument to %0 has side effects that will be discarded">,
  InGroup<DiagGroup<"assume">>;

def warn_memcpy_chk_overflow : Warning<
  "%0 will always overflow destination buffer">,
  InGroup<DiagGroup<"builtin-memcpy-chk-size">>;

/// main()
// static main() is not an error in C, just in C++.
def warn_static_main : Warning<"'main' should not be declared static">,
    InGroup<Main>;
def err_static_main : Error<"'main' is not allowed to be declared static">;
def err_inline_main : Error<"'main' is not allowed to be declared inline">;
def ext_variadic_main : ExtWarn<
  "'main' is not allowed to be declared variadic">, InGroup<Main>;
def ext_noreturn_main : ExtWarn<
  "'main' is not allowed to be declared _Noreturn">, InGroup<Main>;
def note_main_remove_noreturn : Note<"remove '_Noreturn'">;
def err_constexpr_main : Error<
  "'main' is not allowed to be declared constexpr">;
def err_deleted_main : Error<"'main' is not allowed to be deleted">;
def err_mainlike_template_decl : Error<"%0 cannot be a template">;
def err_main_returns_nonint : Error<"'main' must return 'int'">;
def ext_main_returns_nonint : ExtWarn<"return type of 'main' is not 'int'">,
    InGroup<MainReturnType>;
def note_main_change_return_type : Note<"change return type to 'int'">;
def err_main_surplus_args : Error<"too many parameters (%0) for 'main': "
    "must be 0, 2, or 3">;
def warn_main_one_arg : Warning<"only one parameter on 'main' declaration">,
    InGroup<Main>;
def err_main_arg_wrong : Error<"%select{first|second|third|fourth}0 "
    "parameter of 'main' (%select{argument count|argument array|environment|"
    "platform-specific data}0) must be of type %1">;
def warn_main_returns_bool_literal : Warning<"bool literal returned from "
    "'main'">, InGroup<Main>;
def err_main_global_variable :
    Error<"main cannot be declared as global variable">;
def warn_main_redefined : Warning<"variable named 'main' with external linkage "
    "has undefined behavior">, InGroup<Main>;
def ext_main_used : Extension<
  "ISO C++ does not allow 'main' to be used by a program">, InGroup<Main>;

/// parser diagnostics
def ext_no_declarators : ExtWarn<"declaration does not declare anything">,
  InGroup<MissingDeclarations>;
def ext_typedef_without_a_name : ExtWarn<"typedef requires a name">,
  InGroup<MissingDeclarations>;
def err_typedef_not_identifier : Error<"typedef name must be an identifier">;
def err_typedef_changes_linkage : Error<"unsupported: typedef changes linkage"
  " of anonymous type, but linkage was already computed">;
def note_typedef_changes_linkage : Note<"use a tag name here to establish "
  "linkage prior to definition">;
def err_statically_allocated_object : Error<
  "interface type cannot be statically allocated">;
def err_object_cannot_be_passed_returned_by_value : Error<
  "interface type %1 cannot be %select{returned|passed}0 by value"
  "; did you forget * in %1?">;
def err_parameters_retval_cannot_have_fp16_type : Error<
  "%select{parameters|function return value}0 cannot have __fp16 type; did you forget * ?">;
def err_opencl_half_load_store : Error<
  "%select{loading directly from|assigning directly to}0 pointer to type %1 requires "
  "cl_khr_fp16. Use vector data %select{load|store}0 builtin functions instead">;
def err_opencl_cast_to_half : Error<"casting to type %0 is not allowed">;
def err_opencl_half_declaration : Error<
  "declaring variable of type %0 is not allowed">;
def err_opencl_half_param : Error<
  "declaring function parameter of type %0 is not allowed; did you forget * ?">;
def err_opencl_invalid_return : Error<
  "declaring function return value of type %0 is not allowed %select{; did you forget * ?|}1">;
def warn_enum_value_overflow : Warning<"overflow in enumeration value">;
def warn_pragma_options_align_reset_failed : Warning<
  "#pragma options align=reset failed: %0">,
  InGroup<IgnoredPragmas>;
def err_pragma_options_align_mac68k_target_unsupported : Error<
  "mac68k alignment pragma is not supported on this target">;
def warn_pragma_pack_invalid_alignment : Warning<
  "expected #pragma pack parameter to be '1', '2', '4', '8', or '16'">,
  InGroup<IgnoredPragmas>;
// Follow the Microsoft implementation.
def warn_pragma_pack_show : Warning<"value of #pragma pack(show) == %0">;
def warn_pragma_pack_pop_identifer_and_alignment : Warning<
  "specifying both a name and alignment to 'pop' is undefined">;
def warn_pragma_pop_failed : Warning<"#pragma %0(pop, ...) failed: %1">,
  InGroup<IgnoredPragmas>;
def warn_cxx_ms_struct :
  Warning<"ms_struct may not produce Microsoft-compatible layouts for classes "
          "with base classes or virtual functions">,
  DefaultError, InGroup<IncompatibleMSStruct>;
def err_section_conflict : Error<"%0 causes a section type conflict with %1">;
def err_no_base_classes : Error<"invalid use of '__super', %0 has no base classes">;
def err_invalid_super_scope : Error<"invalid use of '__super', "
  "this keyword can only be used inside class or member function scope">;
def err_super_in_lambda_unsupported : Error<
  "use of '__super' inside a lambda is unsupported">;

def warn_pragma_unused_undeclared_var : Warning<
  "undeclared variable %0 used as an argument for '#pragma unused'">,
  InGroup<IgnoredPragmas>;
def warn_atl_uuid_deprecated : Warning<
  "specifying 'uuid' as an ATL attribute is deprecated; use __declspec instead">,
  InGroup<DeprecatedDeclarations>;
def warn_pragma_unused_expected_var_arg : Warning<
  "only variables can be arguments to '#pragma unused'">,
  InGroup<IgnoredPragmas>;
def err_pragma_push_visibility_mismatch : Error<
  "#pragma visibility push with no matching #pragma visibility pop">;
def note_surrounding_namespace_ends_here : Note<
  "surrounding namespace with visibility attribute ends here">;
def err_pragma_pop_visibility_mismatch : Error<
  "#pragma visibility pop with no matching #pragma visibility push">;
def note_surrounding_namespace_starts_here : Note<
  "surrounding namespace with visibility attribute starts here">;
def err_pragma_loop_invalid_argument_type : Error<
  "invalid argument of type %0; expected an integer type">;
def err_pragma_loop_invalid_argument_value : Error<
  "%select{invalid value '%0'; must be positive|value '%0' is too large}1">;
def err_pragma_loop_compatibility : Error<
  "%select{incompatible|duplicate}0 directives '%1' and '%2'">;
def err_pragma_loop_precedes_nonloop : Error<
  "expected a for, while, or do-while loop to follow '%0'">;

def err_pragma_attribute_matcher_subrule_contradicts_rule : Error<
  "redundant attribute subject matcher sub-rule '%0'; '%1' already matches "
  "those declarations">;
def err_pragma_attribute_matcher_negated_subrule_contradicts_subrule : Error<
  "negated attribute subject matcher sub-rule '%0' contradicts sub-rule '%1'">;
def err_pragma_attribute_invalid_matchers : Error<
  "attribute %0 can't be applied to %1">;
def err_pragma_attribute_stack_mismatch : Error<
  "'#pragma clang attribute pop' with no matching '#pragma clang attribute push'">;
def warn_pragma_attribute_unused : Warning<
  "unused attribute %0 in '#pragma clang attribute push' region">,
  InGroup<PragmaClangAttribute>;
def note_pragma_attribute_region_ends_here : Note<
  "'#pragma clang attribute push' regions ends here">;
def err_pragma_attribute_no_pop_eof : Error<"unterminated "
  "'#pragma clang attribute push' at end of file">;
def note_pragma_attribute_applied_decl_here : Note<
  "when applied to this declaration">;

/// Objective-C parser diagnostics
def err_duplicate_class_def : Error<
  "duplicate interface definition for class %0">;
def err_undef_superclass : Error<
  "cannot find interface declaration for %0, superclass of %1">;
def err_forward_superclass : Error<
  "attempting to use the forward class %0 as superclass of %1">;
def err_no_nsconstant_string_class : Error<
  "cannot find interface declaration for %0">;
def err_recursive_superclass : Error<
  "trying to recursively use %0 as superclass of %1">;
def err_conflicting_aliasing_type : Error<"conflicting types for alias %0">;
def warn_undef_interface : Warning<"cannot find interface declaration for %0">;
def warn_duplicate_protocol_def : Warning<
  "duplicate protocol definition of %0 is ignored">,
  InGroup<DiagGroup<"duplicate-protocol">>;
def err_protocol_has_circular_dependency : Error<
  "protocol has circular dependency">;
def err_undeclared_protocol : Error<"cannot find protocol declaration for %0">;
def warn_undef_protocolref : Warning<"cannot find protocol definition for %0">;
def warn_atprotocol_protocol : Warning<
  "@protocol is using a forward protocol declaration of %0">, InGroup<AtProtocol>;
def warn_readonly_property : Warning<
  "attribute 'readonly' of property %0 restricts attribute "
  "'readwrite' of property inherited from %1">,
  InGroup<PropertyAttr>;

def warn_property_attribute : Warning<
  "'%1' attribute on property %0 does not match the property inherited from %2">,
  InGroup<PropertyAttr>;
def warn_property_types_are_incompatible : Warning<
  "property type %0 is incompatible with type %1 inherited from %2">,
  InGroup<DiagGroup<"incompatible-property-type">>;
def warn_protocol_property_mismatch : Warning<
  "property %select{of type %1|with attribute '%1'|without attribute '%1'|with "
  "getter %1|with setter %1}0 was selected for synthesis">,
  InGroup<DiagGroup<"protocol-property-synthesis-ambiguity">>;
def err_protocol_property_mismatch: Error<warn_protocol_property_mismatch.Text>;
def err_undef_interface : Error<"cannot find interface declaration for %0">;
def err_category_forward_interface : Error<
  "cannot define %select{category|class extension}0 for undefined class %1">;
def err_class_extension_after_impl : Error<
  "cannot declare class extension for %0 after class implementation">;
def note_implementation_declared : Note<
  "class implementation is declared here">;
def note_while_in_implementation : Note<
  "detected while default synthesizing properties in class implementation">;
def note_class_declared : Note<
  "class is declared here">;
def note_receiver_class_declared : Note<
  "receiver is instance of class declared here">;
def note_receiver_expr_here : Note<
  "receiver expression is here">;
def note_receiver_is_id : Note<
  "receiver is treated with 'id' type for purpose of method lookup">;
def note_suppressed_class_declare : Note<
  "class with specified objc_requires_property_definitions attribute is declared here">;
def err_objc_root_class_subclass : Error<
  "objc_root_class attribute may only be specified on a root class declaration">;
def err_restricted_superclass_mismatch : Error<
  "cannot subclass a class that was declared with the "
  "'objc_subclassing_restricted' attribute">;
def warn_objc_root_class_missing : Warning<
  "class %0 defined without specifying a base class">,
  InGroup<ObjCRootClass>;
def err_objc_runtime_visible_category : Error<
  "cannot implement a category for class %0 that is only visible via the "
  "Objective-C runtime">;
def err_objc_runtime_visible_subclass : Error<
  "cannot implement subclass %0 of a superclass %1 that is only visible via the "
  "Objective-C runtime">;
def note_objc_needs_superclass : Note<
  "add a super class to fix this problem">;
def warn_dup_category_def : Warning<
  "duplicate definition of category %1 on interface %0">;
def err_conflicting_super_class : Error<"conflicting super class name %0">;
def err_dup_implementation_class : Error<"reimplementation of class %0">;
def err_dup_implementation_category : Error<
  "reimplementation of category %1 for class %0">;
def err_conflicting_ivar_type : Error<
  "instance variable %0 has conflicting type%diff{: $ vs $|}1,2">;
def err_duplicate_ivar_declaration : Error<
  "instance variable is already declared">;
def warn_on_superclass_use : Warning<
  "class implementation may not have super class">;
def err_conflicting_ivar_bitwidth : Error<
  "instance variable %0 has conflicting bit-field width">;
def err_conflicting_ivar_name : Error<
  "conflicting instance variable names: %0 vs %1">;
def err_inconsistent_ivar_count : Error<
  "inconsistent number of instance variables specified">;
def warn_undef_method_impl : Warning<"method definition for %0 not found">,
  InGroup<DiagGroup<"incomplete-implementation">>;

def warn_conflicting_overriding_ret_types : Warning<
  "conflicting return type in "
  "declaration of %0%diff{: $ vs $|}1,2">,
  InGroup<OverridingMethodMismatch>, DefaultIgnore;

def warn_conflicting_ret_types : Warning<
  "conflicting return type in "
  "implementation of %0%diff{: $ vs $|}1,2">,
  InGroup<MismatchedReturnTypes>;

def warn_conflicting_overriding_ret_type_modifiers : Warning<
  "conflicting distributed object modifiers on return type "
  "in declaration of %0">,
  InGroup<OverridingMethodMismatch>, DefaultIgnore;

def warn_conflicting_ret_type_modifiers : Warning<
  "conflicting distributed object modifiers on return type "
  "in implementation of %0">,
  InGroup<DistributedObjectModifiers>;

def warn_non_covariant_overriding_ret_types : Warning<
  "conflicting return type in "
  "declaration of %0: %1 vs %2">,
  InGroup<OverridingMethodMismatch>, DefaultIgnore;

def warn_non_covariant_ret_types : Warning<
  "conflicting return type in "
  "implementation of %0: %1 vs %2">,
  InGroup<MethodSignatures>, DefaultIgnore;

def warn_conflicting_overriding_param_types : Warning<
  "conflicting parameter types in "
  "declaration of %0%diff{: $ vs $|}1,2">,
  InGroup<OverridingMethodMismatch>, DefaultIgnore;

def warn_conflicting_param_types : Warning<
  "conflicting parameter types in "
  "implementation of %0%diff{: $ vs $|}1,2">,
  InGroup<MismatchedParameterTypes>;

def warn_conflicting_param_modifiers : Warning<
  "conflicting distributed object modifiers on parameter type "
  "in implementation of %0">,
  InGroup<DistributedObjectModifiers>;

def warn_conflicting_overriding_param_modifiers : Warning<
  "conflicting distributed object modifiers on parameter type "
  "in declaration of %0">,
  InGroup<OverridingMethodMismatch>, DefaultIgnore;

def warn_non_contravariant_overriding_param_types : Warning<
  "conflicting parameter types in "
  "declaration of %0: %1 vs %2">,
  InGroup<OverridingMethodMismatch>, DefaultIgnore;

def warn_non_contravariant_param_types : Warning<
  "conflicting parameter types in "
  "implementation of %0: %1 vs %2">,
  InGroup<MethodSignatures>, DefaultIgnore;

def warn_conflicting_overriding_variadic :Warning<
  "conflicting variadic declaration of method and its "
  "implementation">,
  InGroup<OverridingMethodMismatch>, DefaultIgnore;

def warn_conflicting_variadic :Warning<
  "conflicting variadic declaration of method and its "
  "implementation">;

def warn_category_method_impl_match:Warning<
  "category is implementing a method which will also be implemented"
  " by its primary class">, InGroup<ObjCProtocolMethodImpl>;

def warn_implements_nscopying : Warning<
"default assign attribute on property %0 which implements "
"NSCopying protocol is not appropriate with -fobjc-gc[-only]">;

def warn_multiple_method_decl : Warning<"multiple methods named %0 found">,
  InGroup<ObjCMultipleMethodNames>;
def warn_strict_multiple_method_decl : Warning<
  "multiple methods named %0 found">, InGroup<StrictSelector>, DefaultIgnore;
def warn_accessor_property_type_mismatch : Warning<
  "type of property %0 does not match type of accessor %1">;
def note_conv_function_declared_at : Note<"type conversion function declared here">;
def note_method_declared_at : Note<"method %0 declared here">;
def note_property_attribute : Note<"property %0 is declared "
  "%select{deprecated|unavailable|partial}1 here">;
def err_setter_type_void : Error<"type of setter must be void">;
def err_duplicate_method_decl : Error<"duplicate declaration of method %0">;
def warn_duplicate_method_decl : 
  Warning<"multiple declarations of method %0 found and ignored">, 
  InGroup<MethodDuplicate>, DefaultIgnore;
def warn_objc_cdirective_format_string :
  Warning<"using %0 directive in %select{NSString|CFString}1 "
          "which is being passed as a formatting argument to the formatting "
          "%select{method|CFfunction}2">,
  InGroup<ObjCCStringFormat>, DefaultIgnore;
def err_objc_var_decl_inclass : 
    Error<"cannot declare variable inside @interface or @protocol">;
def err_missing_method_context : Error<
  "missing context for method declaration">;
def err_objc_property_attr_mutually_exclusive : Error<
  "property attributes '%0' and '%1' are mutually exclusive">;
def err_objc_property_requires_object : Error<
  "property with '%0' attribute must be of object type">;
def warn_objc_property_no_assignment_attribute : Warning<
  "no 'assign', 'retain', or 'copy' attribute is specified - "
  "'assign' is assumed">,
  InGroup<ObjCPropertyNoAttribute>;
def warn_objc_isa_use : Warning<
  "direct access to Objective-C's isa is deprecated in favor of "
  "object_getClass()">, InGroup<DeprecatedObjCIsaUsage>;
def warn_objc_isa_assign : Warning<
  "assignment to Objective-C's isa is deprecated in favor of "
  "object_setClass()">, InGroup<DeprecatedObjCIsaUsage>;
def warn_objc_pointer_masking : Warning<
  "bitmasking for introspection of Objective-C object pointers is strongly "
  "discouraged">,
  InGroup<ObjCPointerIntrospect>;
def warn_objc_pointer_masking_performSelector : Warning<warn_objc_pointer_masking.Text>,
  InGroup<ObjCPointerIntrospectPerformSelector>;
def warn_objc_property_default_assign_on_object : Warning<
  "default property attribute 'assign' not appropriate for non-GC object">,
  InGroup<ObjCPropertyNoAttribute>;
def warn_property_attr_mismatch : Warning<
  "property attribute in class extension does not match the primary class">,
  InGroup<PropertyAttr>;
def warn_property_implicitly_mismatched : Warning <
  "primary property declaration is implicitly strong while redeclaration "
  "in class extension is weak">,
  InGroup<DiagGroup<"objc-property-implicit-mismatch">>;
def warn_objc_property_copy_missing_on_block : Warning<
    "'copy' attribute must be specified for the block property "
    "when -fobjc-gc-only is specified">;
def warn_objc_property_retain_of_block : Warning<
    "retain'ed block property does not copy the block "
    "- use copy attribute instead">, InGroup<ObjCRetainBlockProperty>;
def warn_objc_readonly_property_has_setter : Warning<
    "setter cannot be specified for a readonly property">,
    InGroup<ObjCReadonlyPropertyHasSetter>;
def warn_atomic_property_rule : Warning<
  "writable atomic property %0 cannot pair a synthesized %select{getter|setter}1 "
  "with a user defined %select{getter|setter}2">,
  InGroup<DiagGroup<"atomic-property-with-user-defined-accessor">>;
def note_atomic_property_fixup_suggest : Note<"setter and getter must both be "
  "synthesized, or both be user defined,or the property must be nonatomic">;
def err_atomic_property_nontrivial_assign_op : Error<
  "atomic property of reference type %0 cannot have non-trivial assignment"
  " operator">;
def warn_cocoa_naming_owned_rule : Warning<
  "property follows Cocoa naming"
  " convention for returning 'owned' objects">,
  InGroup<DiagGroup<"objc-property-matches-cocoa-ownership-rule">>;
def err_cocoa_naming_owned_rule : Error<
  "property follows Cocoa naming"
  " convention for returning 'owned' objects">;
def note_cocoa_naming_declare_family : Note<
  "explicitly declare getter %objcinstance0 with '%1' to return an 'unowned' "
  "object">;
def warn_auto_synthesizing_protocol_property :Warning<
  "auto property synthesis will not synthesize property %0"
  " declared in protocol %1">,
  InGroup<DiagGroup<"objc-protocol-property-synthesis">>;
def note_add_synthesize_directive : Note<
  "add a '@synthesize' directive">;
def warn_no_autosynthesis_shared_ivar_property : Warning <
  "auto property synthesis will not synthesize property "
  "%0 because it cannot share an ivar with another synthesized property">,
  InGroup<ObjCNoPropertyAutoSynthesis>;
def warn_no_autosynthesis_property : Warning<
  "auto property synthesis will not synthesize property "
  "%0 because it is 'readwrite' but it will be synthesized 'readonly' "
  "via another property">,
  InGroup<ObjCNoPropertyAutoSynthesis>;
def warn_autosynthesis_property_in_superclass : Warning<
  "auto property synthesis will not synthesize property "
  "%0; it will be implemented by its superclass, use @dynamic to "
  "acknowledge intention">,
  InGroup<ObjCNoPropertyAutoSynthesis>;
def warn_autosynthesis_property_ivar_match :Warning<
  "autosynthesized property %0 will use %select{|synthesized}1 instance variable "
  "%2, not existing instance variable %3">,
  InGroup<DiagGroup<"objc-autosynthesis-property-ivar-name-match">>;
def warn_missing_explicit_synthesis : Warning <
  "auto property synthesis is synthesizing property not explicitly synthesized">,
  InGroup<DiagGroup<"objc-missing-property-synthesis">>, DefaultIgnore;
def warn_property_getter_owning_mismatch : Warning<
  "property declared as returning non-retained objects"
  "; getter returning retained objects">;
def warn_property_redecl_getter_mismatch : Warning<
  "getter name mismatch between property redeclaration (%1) and its original "
  "declaration (%0)">, InGroup<PropertyAttr>;
def err_property_setter_ambiguous_use : Error<
  "synthesized properties %0 and %1 both claim setter %2 -"
  " use of this setter will cause unexpected behavior">;
def warn_default_atomic_custom_getter_setter : Warning<
  "atomic by default property %0 has a user defined %select{getter|setter}1 "
  "(property should be marked 'atomic' if this is intended)">,
  InGroup<CustomAtomic>, DefaultIgnore;
def err_use_continuation_class : Error<
  "illegal redeclaration of property in class extension %0"
  " (attribute must be 'readwrite', while its primary must be 'readonly')">;
def err_type_mismatch_continuation_class : Error<
  "type of property %0 in class extension does not match "
  "property type in primary class">;
def err_use_continuation_class_redeclaration_readwrite : Error<
  "illegal redeclaration of 'readwrite' property in class extension %0"
  " (perhaps you intended this to be a 'readwrite' redeclaration of a "
  "'readonly' public property?)">;
def err_continuation_class : Error<"class extension has no primary class">;
def err_property_type : Error<"property cannot have array or function type %0">;
def err_missing_property_context : Error<
  "missing context for property implementation declaration">;
def err_bad_property_decl : Error<
  "property implementation must have its declaration in interface %0 or one of "
  "its extensions">;
def err_category_property : Error<
  "property declared in category %0 cannot be implemented in "
  "class implementation">;
def note_property_declare : Note<
  "property declared here">;
def note_protocol_property_declare : Note<
  "it could also be property "
  "%select{of type %1|without attribute '%1'|with attribute '%1'|with getter "
  "%1|with setter %1}0 declared here">;
def note_property_synthesize : Note<
  "property synthesized here">;
def err_synthesize_category_decl : Error<
  "@synthesize not allowed in a category's implementation">;
def err_synthesize_on_class_property : Error<
  "@synthesize not allowed on a class property %0">;
def err_missing_property_interface : Error<
  "property implementation in a category with no category declaration">;
def err_bad_category_property_decl : Error<
  "property implementation must have its declaration in the category %0">;
def err_bad_property_context : Error<
  "property implementation must be in a class or category implementation">;
def err_missing_property_ivar_decl : Error<
  "synthesized property %0 must either be named the same as a compatible"
  " instance variable or must explicitly name an instance variable">;
def err_arc_perform_selector_retains : Error<
  "performSelector names a selector which retains the object">;
def warn_arc_perform_selector_leaks : Warning<
  "performSelector may cause a leak because its selector is unknown">,
  InGroup<DiagGroup<"arc-performSelector-leaks">>;
def warn_dealloc_in_category : Warning<
"-dealloc is being overridden in a category">,
InGroup<DeallocInCategory>;
def err_gc_weak_property_strong_type : Error<
  "weak attribute declared on a __strong type property in GC mode">;
def warn_arc_repeated_use_of_weak : Warning <
  "weak %select{variable|property|implicit property|instance variable}0 %1 is "
  "accessed multiple times in this %select{function|method|block|lambda}2 "
  "but may be unpredictably set to nil; assign to a strong variable to keep "
  "the object alive">,
  InGroup<ARCRepeatedUseOfWeak>, DefaultIgnore;
def warn_implicitly_retains_self : Warning <
  "block implicitly retains 'self'; explicitly mention 'self' to indicate "
  "this is intended behavior">,
  InGroup<DiagGroup<"implicit-retain-self">>, DefaultIgnore;
def warn_arc_possible_repeated_use_of_weak : Warning <
  "weak %select{variable|property|implicit property|instance variable}0 %1 may "
  "be accessed multiple times in this %select{function|method|block|lambda}2 "
  "and may be unpredictably set to nil; assign to a strong variable to keep "
  "the object alive">,
  InGroup<ARCRepeatedUseOfWeakMaybe>, DefaultIgnore;
def note_arc_weak_also_accessed_here : Note<
  "also accessed here">;
def err_incomplete_synthesized_property : Error<
  "cannot synthesize property %0 with incomplete type %1">;

def err_property_ivar_type : Error<
  "type of property %0 (%1) does not match type of instance variable %2 (%3)">;
def err_property_accessor_type : Error<
  "type of property %0 (%1) does not match type of accessor %2 (%3)">;
def err_ivar_in_superclass_use : Error<
  "property %0 attempting to use instance variable %1 declared in super class %2">;
def err_weak_property : Error<
  "existing instance variable %1 for __weak property %0 must be __weak">;
def err_strong_property : Error<
  "existing instance variable %1 for strong property %0 may not be __weak">;
def err_dynamic_property_ivar_decl : Error<
  "dynamic property cannot have instance variable specification">;
def err_duplicate_ivar_use : Error<
  "synthesized properties %0 and %1 both claim instance variable %2">;
def err_property_implemented : Error<"property %0 is already implemented">;
def warn_objc_missing_super_call : Warning<
  "method possibly missing a [super %0] call">,
  InGroup<ObjCMissingSuperCalls>;
def err_dealloc_bad_result_type : Error<
  "dealloc return type must be correctly specified as 'void' under ARC, "
  "instead of %0">;
def warn_undeclared_selector : Warning<
  "undeclared selector %0">, InGroup<UndeclaredSelector>, DefaultIgnore;
def warn_undeclared_selector_with_typo : Warning<
  "undeclared selector %0; did you mean %1?">,
  InGroup<UndeclaredSelector>, DefaultIgnore;
def warn_implicit_atomic_property : Warning<
  "property is assumed atomic by default">, InGroup<ImplicitAtomic>, DefaultIgnore;
def note_auto_readonly_iboutlet_fixup_suggest : Note<
  "property should be changed to be readwrite">;
def warn_auto_readonly_iboutlet_property : Warning<
  "readonly IBOutlet property %0 when auto-synthesized may "
  "not work correctly with 'nib' loader">,
  InGroup<DiagGroup<"readonly-iboutlet-property">>;
def warn_auto_implicit_atomic_property : Warning<
  "property is assumed atomic when auto-synthesizing the property">,
  InGroup<ImplicitAtomic>, DefaultIgnore;
def warn_unimplemented_selector:  Warning<
  "no method with selector %0 is implemented in this translation unit">, 
  InGroup<Selector>, DefaultIgnore;
def warn_unimplemented_protocol_method : Warning<
  "method %0 in protocol %1 not implemented">, InGroup<Protocol>;
def warn_multiple_selectors: Warning<
  "several methods with selector %0 of mismatched types are found "
  "for the @selector expression">,
  InGroup<SelectorTypeMismatch>, DefaultIgnore;

def err_objc_kindof_nonobject : Error<
  "'__kindof' specifier cannot be applied to non-object type %0">;
def err_objc_kindof_wrong_position : Error<
  "'__kindof' type specifier must precede the declarator">;

def err_objc_method_unsupported_param_ret_type : Error<
  "%0 %select{parameter|return}1 type is unsupported; "
  "support for vector types for this target is introduced in %2">;

// C++ declarations
def err_static_assert_expression_is_not_constant : Error<
  "static_assert expression is not an integral constant expression">;
def err_static_assert_failed : Error<"static_assert failed%select{ %1|}0">;
def ext_static_assert_no_message : ExtWarn<
  "static_assert with no message is a C++17 extension">, InGroup<CXX17>;
def warn_cxx14_compat_static_assert_no_message : Warning<
  "static_assert with no message is incompatible with C++ standards before C++17">,
  DefaultIgnore, InGroup<CXXPre1zCompat>;

def ext_inline_variable : ExtWarn<
  "inline variables are a C++17 extension">, InGroup<CXX17>;
def warn_cxx14_compat_inline_variable : Warning<
  "inline variables are incompatible with C++ standards before C++17">,
  DefaultIgnore, InGroup<CXXPre1zCompat>;

def warn_inline_namespace_reopened_noninline : Warning<
  "inline namespace reopened as a non-inline namespace">;
def err_inline_namespace_mismatch : Error<
  "non-inline namespace cannot be reopened as inline">;

def err_unexpected_friend : Error<
  "friends can only be classes or functions">;
def ext_enum_friend : ExtWarn<
  "befriending enumeration type %0 is a C++11 extension">, InGroup<CXX11>;
def warn_cxx98_compat_enum_friend : Warning<
  "befriending enumeration type %0 is incompatible with C++98">,
  InGroup<CXX98Compat>, DefaultIgnore;
def ext_nonclass_type_friend : ExtWarn<
  "non-class friend type %0 is a C++11 extension">, InGroup<CXX11>;
def warn_cxx98_compat_nonclass_type_friend : Warning<
  "non-class friend type %0 is incompatible with C++98">,
  InGroup<CXX98Compat>, DefaultIgnore;
def err_friend_is_member : Error<
  "friends cannot be members of the declaring class">;
def warn_cxx98_compat_friend_is_member : Warning<
  "friend declaration naming a member of the declaring class is incompatible "
  "with C++98">, InGroup<CXX98Compat>, DefaultIgnore;
def ext_unelaborated_friend_type : ExtWarn<
  "unelaborated friend declaration is a C++11 extension; specify "
  "'%select{struct|interface|union|class|enum}0' to befriend %1">,
  InGroup<CXX11>;
def warn_cxx98_compat_unelaborated_friend_type : Warning<
  "befriending %1 without '%select{struct|interface|union|class|enum}0' "
  "keyword is incompatible with C++98">, InGroup<CXX98Compat>, DefaultIgnore;
def err_qualified_friend_not_found : Error<
  "no function named %0 with type %1 was found in the specified scope">;
def err_introducing_special_friend : Error<
  "%plural{[0,2]:must use a qualified name when declaring|3:cannot declare}0"
  " a %select{constructor|destructor|conversion operator|deduction guide}0 "
  "as a friend">;
def err_tagless_friend_type_template : Error<
  "friend type templates must use an elaborated type">;
def err_no_matching_local_friend : Error<
  "no matching function found in local scope">;
def err_no_matching_local_friend_suggest : Error<
  "no matching function %0 found in local scope; did you mean %3?">;
def err_partial_specialization_friend : Error<
  "partial specialization cannot be declared as a friend">;
def err_qualified_friend_def : Error<
  "friend function definition cannot be qualified with '%0'">;
def err_friend_def_in_local_class : Error<
  "friend function cannot be defined in a local class">;
def err_friend_not_first_in_declaration : Error<
  "'friend' must appear first in a non-function declaration">;
def err_using_decl_friend : Error<
  "cannot befriend target of using declaration">;
def warn_template_qualified_friend_unsupported : Warning<
  "dependent nested name specifier '%0' for friend class declaration is "
  "not supported; turning off access control for %1">,
  InGroup<UnsupportedFriend>;
def warn_template_qualified_friend_ignored : Warning<
  "dependent nested name specifier '%0' for friend template declaration is "
  "not supported; ignoring this friend declaration">,
  InGroup<UnsupportedFriend>;
def ext_friend_tag_redecl_outside_namespace : ExtWarn<
  "unqualified friend declaration referring to type outside of the nearest "
  "enclosing namespace is a Microsoft extension; add a nested name specifier">,
  InGroup<MicrosoftUnqualifiedFriend>;
def err_pure_friend : Error<"friend declaration cannot have a pure-specifier">;

def err_invalid_member_in_interface : Error<
  "%select{data member |non-public member function |static member function |"
          "user-declared constructor|user-declared destructor|operator |"
          "nested class }0%1 is not permitted within an interface type">;
def err_invalid_base_in_interface : Error<
  "interface type cannot inherit from "
  "%select{'struct|non-public 'interface|'class}0 %1'">;

def err_abstract_type_in_decl : Error<
  "%select{return|parameter|variable|field|instance variable|"
  "synthesized instance variable}0 type %1 is an abstract class">;
def err_allocation_of_abstract_type : Error<
  "allocating an object of abstract class type %0">;
def err_throw_abstract_type : Error<
  "cannot throw an object of abstract type %0">;
def err_array_of_abstract_type : Error<"array of abstract class type %0">;
def err_capture_of_abstract_type : Error<
  "by-copy capture of value of abstract type %0">;
def err_capture_of_incomplete_type : Error<
  "by-copy capture of variable %0 with incomplete type %1">;
def err_capture_default_non_local : Error<
  "non-local lambda expression cannot have a capture-default">;

def err_multiple_final_overriders : Error<
  "virtual function %q0 has more than one final overrider in %1">; 
def note_final_overrider : Note<"final overrider of %q0 in %1">;

def err_type_defined_in_type_specifier : Error<
  "%0 cannot be defined in a type specifier">;
def err_type_defined_in_result_type : Error<
  "%0 cannot be defined in the result type of a function">;
def err_type_defined_in_param_type : Error<
  "%0 cannot be defined in a parameter type">;
def err_type_defined_in_alias_template : Error<
  "%0 cannot be defined in a type alias template">;
def err_type_defined_in_condition : Error<
  "%0 cannot be defined in a condition">;

def note_pure_virtual_function : Note<
  "unimplemented pure virtual method %0 in %1">;

def note_pure_qualified_call_kext : Note<
  "qualified call to %0::%1 is treated as a virtual call to %1 due to -fapple-kext">;

def err_deleted_decl_not_first : Error<
  "deleted definition must be first declaration">;

def err_deleted_override : Error<
  "deleted function %0 cannot override a non-deleted function">;

def err_non_deleted_override : Error<
  "non-deleted function %0 cannot override a deleted function">;

def warn_weak_vtable : Warning<
  "%0 has no out-of-line virtual method definitions; its vtable will be "
  "emitted in every translation unit">,
  InGroup<DiagGroup<"weak-vtables">>, DefaultIgnore;
def warn_weak_template_vtable : Warning<
  "explicit template instantiation %0 will emit a vtable in every "
  "translation unit">,
  InGroup<DiagGroup<"weak-template-vtables">>, DefaultIgnore;

def ext_using_undefined_std : ExtWarn<
  "using directive refers to implicitly-defined namespace 'std'">;
  
// C++ exception specifications
def err_exception_spec_in_typedef : Error<
  "exception specifications are not allowed in %select{typedefs|type aliases}0">;
def err_distant_exception_spec : Error<
  "exception specifications are not allowed beyond a single level "
  "of indirection">;
def err_incomplete_in_exception_spec : Error<
  "%select{|pointer to |reference to }0incomplete type %1 is not allowed "
  "in exception specification">;
def ext_incomplete_in_exception_spec : ExtWarn<err_incomplete_in_exception_spec.Text>,
  InGroup<MicrosoftExceptionSpec>;
def err_rref_in_exception_spec : Error<
  "rvalue reference type %0 is not allowed in exception specification">;
def err_mismatched_exception_spec : Error<
  "exception specification in declaration does not match previous declaration">;
def ext_mismatched_exception_spec : ExtWarn<err_mismatched_exception_spec.Text>,
  InGroup<MicrosoftExceptionSpec>;
def err_override_exception_spec : Error<
  "exception specification of overriding function is more lax than "
  "base version">;
def ext_override_exception_spec : ExtWarn<err_override_exception_spec.Text>,
  InGroup<MicrosoftExceptionSpec>;
def err_incompatible_exception_specs : Error<
  "target exception specification is not superset of source">;
def warn_incompatible_exception_specs : Warning<
  err_incompatible_exception_specs.Text>, InGroup<IncompatibleExceptionSpec>;
def err_deep_exception_specs_differ : Error<
  "exception specifications of %select{return|argument}0 types differ">;
def warn_deep_exception_specs_differ : Warning<
  err_deep_exception_specs_differ.Text>, InGroup<IncompatibleExceptionSpec>;
def err_missing_exception_specification : Error<
  "%0 is missing exception specification '%1'">;
def ext_missing_exception_specification : ExtWarn<
  err_missing_exception_specification.Text>,
  InGroup<DiagGroup<"missing-exception-spec">>;
def ext_ms_missing_exception_specification : ExtWarn<
  err_missing_exception_specification.Text>,
  InGroup<MicrosoftExceptionSpec>;
def err_noexcept_needs_constant_expression : Error<
  "argument to noexcept specifier must be a constant expression">;
def err_exception_spec_not_parsed : Error<
  "exception specification is not available until end of class definition">;

// C++ access checking
def err_class_redeclared_with_different_access : Error<
  "%0 redeclared with '%1' access">;
def err_access : Error<
  "%1 is a %select{private|protected}0 member of %3">, AccessControl;
def ext_ms_using_declaration_inaccessible : ExtWarn<
  "using declaration referring to inaccessible member '%0' (which refers "
  "to accessible member '%1') is a Microsoft compatibility extension">,
    AccessControl, InGroup<MicrosoftUsingDecl>;
def err_access_ctor : Error<
  "calling a %select{private|protected}0 constructor of class %2">, 
  AccessControl;
def ext_rvalue_to_reference_access_ctor : Extension<
  "C++98 requires an accessible copy constructor for class %2 when binding "
  "a reference to a temporary; was %select{private|protected}0">,
  AccessControl, InGroup<BindToTemporaryCopy>;
def err_access_base_ctor : Error<
  // The ERRORs represent other special members that aren't constructors, in
  // hopes that someone will bother noticing and reporting if they appear
  "%select{base class|inherited virtual base class}0 %1 has %select{private|"
  "protected}3 %select{default |copy |move |*ERROR* |*ERROR* "
  "|*ERROR*|}2constructor">, AccessControl;
def err_access_field_ctor : Error<
  // The ERRORs represent other special members that aren't constructors, in
  // hopes that someone will bother noticing and reporting if they appear
  "field of type %0 has %select{private|protected}2 "
  "%select{default |copy |move |*ERROR* |*ERROR* |*ERROR* |}1constructor">,
  AccessControl;
def err_access_friend_function : Error<
  "friend function %1 is a %select{private|protected}0 member of %3">,
  AccessControl;

def err_access_dtor : Error<
  "calling a %select{private|protected}1 destructor of class %0">, 
  AccessControl;
def err_access_dtor_base :
    Error<"base class %0 has %select{private|protected}1 destructor">,
    AccessControl;
def err_access_dtor_vbase :
    Error<"inherited virtual base class %1 has "
    "%select{private|protected}2 destructor">,
    AccessControl;
def err_access_dtor_temp :
    Error<"temporary of type %0 has %select{private|protected}1 destructor">,
    AccessControl;
def err_access_dtor_exception :
    Error<"exception object of type %0 has %select{private|protected}1 "
          "destructor">, AccessControl;
def err_access_dtor_field :
    Error<"field of type %1 has %select{private|protected}2 destructor">,
    AccessControl;
def err_access_dtor_var :
    Error<"variable of type %1 has %select{private|protected}2 destructor">,
    AccessControl;
def err_access_dtor_ivar :
    Error<"instance variable of type %0 has %select{private|protected}1 "
          "destructor">,
    AccessControl;
def note_previous_access_declaration : Note<
  "previously declared '%1' here">;
def note_access_natural : Note<
  "%select{|implicitly }1declared %select{private|protected}0 here">;
def note_access_constrained_by_path : Note<
  "constrained by %select{|implicitly }1%select{private|protected}0"
  " inheritance here">;
def note_access_protected_restricted_noobject : Note<
  "must name member using the type of the current context %0">;
def note_access_protected_restricted_ctordtor : Note<
  "protected %select{constructor|destructor}0 can only be used to "
  "%select{construct|destroy}0 a base class subobject">;
def note_access_protected_restricted_object : Note<
  "can only access this member on an object of type %0">;
def warn_cxx98_compat_sfinae_access_control : Warning<
  "substitution failure due to access control is incompatible with C++98">,
  InGroup<CXX98Compat>, DefaultIgnore, NoSFINAE;
  
// C++ name lookup
def err_incomplete_nested_name_spec : Error<
  "incomplete type %0 named in nested name specifier">;
def err_dependent_nested_name_spec : Error<
  "nested name specifier for a declaration cannot depend on a template "
  "parameter">;
def err_nested_name_member_ref_lookup_ambiguous : Error<
  "lookup of %0 in member access expression is ambiguous">;
def ext_nested_name_member_ref_lookup_ambiguous : ExtWarn<
  "lookup of %0 in member access expression is ambiguous; using member of %1">,
  InGroup<AmbigMemberTemplate>;
def note_ambig_member_ref_object_type : Note<
  "lookup in the object type %0 refers here">;
def note_ambig_member_ref_scope : Note<
  "lookup from the current scope refers here">;
def err_qualified_member_nonclass : Error<
  "qualified member access refers to a member in %0">;
def err_incomplete_member_access : Error<
  "member access into incomplete type %0">;
def err_incomplete_type : Error<
  "incomplete type %0 where a complete type is required">;
def warn_cxx98_compat_enum_nested_name_spec : Warning<
  "enumeration type in nested name specifier is incompatible with C++98">,
  InGroup<CXX98Compat>, DefaultIgnore;
def err_nested_name_spec_is_not_class : Error<
  "%0 cannot appear before '::' because it is not a class"
  "%select{ or namespace|, namespace, or enumeration}1; did you mean ':'?">;
def ext_nested_name_spec_is_enum : ExtWarn<
  "use of enumeration in a nested name specifier is a C++11 extension">,
  InGroup<CXX11>;
def err_out_of_line_qualified_id_type_names_constructor : Error<
  "qualified reference to %0 is a constructor name rather than a "
  "%select{template name|type}1 in this context">;
def ext_out_of_line_qualified_id_type_names_constructor : ExtWarn<
  "ISO C++ specifies that "
  "qualified reference to %0 is a constructor name rather than a "
  "%select{template name|type}1 in this context, despite preceding "
  "%select{'typename'|'template'}2 keyword">, SFINAEFailure,
  InGroup<DiagGroup<"injected-class-name">>;

// C++ class members
def err_storageclass_invalid_for_member : Error<
  "storage class specified for a member declaration">;
def err_mutable_function : Error<"'mutable' cannot be applied to functions">;
def err_mutable_reference : Error<"'mutable' cannot be applied to references">;
def ext_mutable_reference : ExtWarn<
  "'mutable' on a reference type is a Microsoft extension">,
  InGroup<MicrosoftMutableReference>;
def err_mutable_const : Error<"'mutable' and 'const' cannot be mixed">;
def err_mutable_nonmember : Error<
  "'mutable' can only be applied to member variables">;
def err_virtual_in_union : Error<
  "unions cannot have virtual functions">;
def err_virtual_non_function : Error<
  "'virtual' can only appear on non-static member functions">;
def err_virtual_out_of_class : Error<
  "'virtual' can only be specified inside the class definition">;
def err_virtual_member_function_template : Error<
  "'virtual' cannot be specified on member function templates">;
def err_static_overrides_virtual : Error<
  "'static' member function %0 overrides a virtual function in a base class">;
def err_explicit_non_function : Error<
  "'explicit' can only appear on non-static member functions">;
def err_explicit_out_of_class : Error<
  "'explicit' can only be specified inside the class definition">;
def err_explicit_non_ctor_or_conv_function : Error<
  "'explicit' can only be applied to a constructor or conversion function">;
def err_static_not_bitfield : Error<"static member %0 cannot be a bit-field">;
def err_static_out_of_line : Error<
  "'static' can only be specified inside the class definition">;
def err_storage_class_for_static_member : Error<
  "static data member definition cannot specify a storage class">;
def err_typedef_not_bitfield : Error<"typedef member %0 cannot be a bit-field">;
def err_not_integral_type_bitfield : Error<
  "bit-field %0 has non-integral type %1">;
def err_not_integral_type_anon_bitfield : Error<
  "anonymous bit-field has non-integral type %0">;
def err_member_function_initialization : Error<
  "initializer on function does not look like a pure-specifier">;
def err_non_virtual_pure : Error<
  "%0 is not virtual and cannot be declared pure">;
def ext_pure_function_definition : ExtWarn<
  "function definition with pure-specifier is a Microsoft extension">,
  InGroup<MicrosoftPureDefinition>;
def err_implicit_object_parameter_init : Error<
  "cannot initialize object parameter of type %0 with an expression "
  "of type %1">;
def err_qualified_member_of_unrelated : Error<
  "%q0 is not a member of class %1">;

def warn_call_to_pure_virtual_member_function_from_ctor_dtor : Warning<
  "call to pure virtual member function %0 has undefined behavior; "
  "overrides of %0 in subclasses are not available in the "
  "%select{constructor|destructor}1 of %2">;

def note_member_declared_at : Note<"member is declared here">;
def note_ivar_decl : Note<"instance variable is declared here">;
def note_bitfield_decl : Note<"bit-field is declared here">;
def note_implicit_param_decl : Note<"%0 is an implicit parameter">;
def note_member_synthesized_at : Note<
  "in implicit %select{default constructor|copy constructor|move constructor|"
  "copy assignment operator|move assignment operator|destructor}0 for %1 "
  "first required here">;
def err_missing_default_ctor : Error<
  "%select{constructor for %1 must explicitly initialize the|"
  "implicit default constructor for %1 must explicitly initialize the|"
  "cannot use constructor inherited from base class %4;}0 "
  "%select{base class|member}2 %3 %select{which|which|of %1}0 "
  "does not have a default constructor">;
def note_due_to_dllexported_class : Note<
  "due to '%0' being dllexported%select{|; try compiling in C++11 mode}1">;

def err_illegal_union_or_anon_struct_member : Error<
  "%select{anonymous struct|union}0 member %1 has a non-trivial "
  "%select{constructor|copy constructor|move constructor|copy assignment "
  "operator|move assignment operator|destructor}2">;
def warn_cxx98_compat_nontrivial_union_or_anon_struct_member : Warning<
  "%select{anonymous struct|union}0 member %1 with a non-trivial "
  "%select{constructor|copy constructor|move constructor|copy assignment "
  "operator|move assignment operator|destructor}2 is incompatible with C++98">,
  InGroup<CXX98Compat>, DefaultIgnore;

def note_nontrivial_virtual_dtor : Note<
  "destructor for %0 is not trivial because it is virtual">;
def note_nontrivial_has_virtual : Note<
  "because type %0 has a virtual %select{member function|base class}1">;
def note_nontrivial_no_def_ctor : Note<
  "because %select{base class of |field of |}0type %1 has no "
  "default constructor">;
def note_user_declared_ctor : Note<
  "implicit default constructor suppressed by user-declared constructor">;
def note_nontrivial_no_copy : Note<
  "because no %select{<<ERROR>>|constructor|constructor|assignment operator|"
  "assignment operator|<<ERROR>>}2 can be used to "
  "%select{<<ERROR>>|copy|move|copy|move|<<ERROR>>}2 "
  "%select{base class|field|an object}0 of type %3">;
def note_nontrivial_user_provided : Note<
  "because %select{base class of |field of |}0type %1 has a user-provided "
  "%select{default constructor|copy constructor|move constructor|"
  "copy assignment operator|move assignment operator|destructor}2">;
def note_nontrivial_in_class_init : Note<
  "because field %0 has an initializer">;
def note_nontrivial_param_type : Note<
  "because its parameter is %diff{of type $, not $|of the wrong type}2,3">;
def note_nontrivial_default_arg : Note<"because it has a default argument">;
def note_nontrivial_variadic : Note<"because it is a variadic function">;
def note_nontrivial_subobject : Note<
  "because the function selected to %select{construct|copy|move|copy|move|"
  "destroy}2 %select{base class|field}0 of type %1 is not trivial">;
def note_nontrivial_objc_ownership : Note<
  "because type %0 has a member with %select{no|no|__strong|__weak|"
  "__autoreleasing}1 ownership">;

def err_static_data_member_not_allowed_in_anon_struct : Error<
  "static data member %0 not allowed in anonymous struct">;
def ext_static_data_member_in_union : ExtWarn<
  "static data member %0 in union is a C++11 extension">, InGroup<CXX11>;
def warn_cxx98_compat_static_data_member_in_union : Warning<
  "static data member %0 in union is incompatible with C++98">,
  InGroup<CXX98Compat>, DefaultIgnore;
def ext_union_member_of_reference_type : ExtWarn<
  "union member %0 has reference type %1, which is a Microsoft extension">,
  InGroup<MicrosoftUnionMemberReference>;
def err_union_member_of_reference_type : Error<
  "union member %0 has reference type %1">;
def ext_anonymous_struct_union_qualified : Extension<
  "anonymous %select{struct|union}0 cannot be '%1'">;
def err_different_return_type_for_overriding_virtual_function : Error<
  "virtual function %0 has a different return type "
  "%diff{($) than the function it overrides (which has return type $)|"
  "than the function it overrides}1,2">;
def note_overridden_virtual_function : Note<
  "overridden virtual function is here">;
def err_conflicting_overriding_cc_attributes : Error<
  "virtual function %0 has different calling convention attributes "
  "%diff{($) than the function it overrides (which has calling convention $)|"
  "than the function it overrides}1,2">;

def err_covariant_return_inaccessible_base : Error<
  "invalid covariant return for virtual function: %1 is a "
  "%select{private|protected}2 base class of %0">, AccessControl;
def err_covariant_return_ambiguous_derived_to_base_conv : Error<
  "return type of virtual function %3 is not covariant with the return type of "
  "the function it overrides (ambiguous conversion from derived class "
  "%0 to base class %1:%2)">;
def err_covariant_return_not_derived : Error<
  "return type of virtual function %0 is not covariant with the return type of "
  "the function it overrides (%1 is not derived from %2)">;
def err_covariant_return_incomplete : Error<
  "return type of virtual function %0 is not covariant with the return type of "
  "the function it overrides (%1 is incomplete)">;
def err_covariant_return_type_different_qualifications : Error<
  "return type of virtual function %0 is not covariant with the return type of "
  "the function it overrides (%1 has different qualifiers than %2)">;
def err_covariant_return_type_class_type_more_qualified : Error<
  "return type of virtual function %0 is not covariant with the return type of "
  "the function it overrides (class type %1 is more qualified than class "
  "type %2">;

// C++ implicit special member functions
def note_in_declaration_of_implicit_special_member : Note<
  "while declaring the implicit "
  "%select{default constructor|copy constructor|move constructor|"
  "copy assignment operator|move assignment operator|destructor}1"
  " for %0">;

// C++ constructors
def err_constructor_cannot_be : Error<"constructor cannot be declared '%0'">;
def err_invalid_qualified_constructor : Error<
  "'%0' qualifier is not allowed on a constructor">;
def err_ref_qualifier_constructor : Error<
  "ref-qualifier '%select{&&|&}0' is not allowed on a constructor">;

def err_constructor_return_type : Error<
  "constructor cannot have a return type">;
def err_constructor_redeclared : Error<"constructor cannot be redeclared">;
def err_constructor_byvalue_arg : Error<
  "copy constructor must pass its first argument by reference">;
def warn_no_constructor_for_refconst : Warning<
  "%select{struct|interface|union|class|enum}0 %1 does not declare any "
  "constructor to initialize its non-modifiable members">;
def note_refconst_member_not_initialized : Note<
  "%select{const|reference}0 member %1 will never be initialized">;
def ext_ms_explicit_constructor_call : ExtWarn<
  "explicit constructor calls are a Microsoft extension">,
  InGroup<MicrosoftExplicitConstructorCall>;

// C++ destructors
def err_destructor_not_member : Error<
  "destructor must be a non-static member function">;
def err_destructor_cannot_be : Error<"destructor cannot be declared '%0'">;
def err_invalid_qualified_destructor : Error<
  "'%0' qualifier is not allowed on a destructor">;
def err_ref_qualifier_destructor : Error<
  "ref-qualifier '%select{&&|&}0' is not allowed on a destructor">;
def err_destructor_return_type : Error<"destructor cannot have a return type">;
def err_destructor_redeclared : Error<"destructor cannot be redeclared">;
def err_destructor_with_params : Error<"destructor cannot have any parameters">;
def err_destructor_variadic : Error<"destructor cannot be variadic">;
def err_destructor_typedef_name : Error<
  "destructor cannot be declared using a %select{typedef|type alias}1 %0 of the class name">;
def err_destructor_name : Error<
  "expected the class name after '~' to name the enclosing class">;
def err_destructor_class_name : Error<
  "expected the class name after '~' to name a destructor">;
def err_ident_in_dtor_not_a_type : Error<
  "identifier %0 in object destruction expression does not name a type">;
def err_destructor_expr_type_mismatch : Error<
  "destructor type %0 in object destruction expression does not match the "
  "type %1 of the object being destroyed">;
def note_destructor_type_here : Note<
  "type %0 is declared here">;

def err_destructor_template : Error<
  "destructor cannot be declared as a template">;

// C++ initialization
def err_init_conversion_failed : Error<
  "cannot initialize %select{a variable|a parameter|return object|an "
  "exception object|a member subobject|an array element|a new value|a value|a "
  "base class|a constructor delegation|a vector element|a block element|a "
  "block element|a complex element|a lambda capture|a compound literal "
  "initializer|a related result|a parameter of CF audited function}0 "
  "%diff{of type $ with an %select{rvalue|lvalue}2 of type $|"
  "with an %select{rvalue|lvalue}2 of incompatible type}1,3"
  "%select{|: different classes%diff{ ($ vs $)|}5,6"
  "|: different number of parameters (%5 vs %6)"
  "|: type mismatch at %ordinal5 parameter%diff{ ($ vs $)|}6,7"
  "|: different return type%diff{ ($ vs $)|}5,6"
  "|: different qualifiers ("
  "%select{none|const|restrict|const and restrict|volatile|const and volatile|"
  "volatile and restrict|const, volatile, and restrict}5 vs "
  "%select{none|const|restrict|const and restrict|volatile|const and volatile|"
  "volatile and restrict|const, volatile, and restrict}6)"
  "|: different exception specifications}4">;

def err_lvalue_to_rvalue_ref : Error<"rvalue reference %diff{to type $ cannot "
  "bind to lvalue of type $|cannot bind to incompatible lvalue}0,1">;
def err_lvalue_reference_bind_to_initlist : Error<
  "%select{non-const|volatile}0 lvalue reference to type %1 cannot bind to an "
  "initializer list temporary">;
def err_lvalue_reference_bind_to_temporary : Error<
  "%select{non-const|volatile}0 lvalue reference %diff{to type $ cannot bind "
  "to a temporary of type $|cannot bind to incompatible temporary}1,2">;
def err_lvalue_reference_bind_to_unrelated : Error<
  "%select{non-const|volatile}0 lvalue reference "
  "%diff{to type $ cannot bind to a value of unrelated type $|"
  "cannot bind to a value of unrelated type}1,2">;
def err_reference_bind_drops_quals : Error<
  "binding value %diff{of type $ to reference to type $|to reference}0,1 "
  "drops %select{<<ERROR>>|'const'|'restrict'|'const' and 'restrict'|"
  "'volatile'|'const' and 'volatile'|'restrict' and 'volatile'|"
  "'const', 'restrict', and 'volatile'}2 qualifier%plural{1:|2:|4:|:s}2">;
def err_reference_bind_failed : Error<
  "reference %diff{to type $ could not bind to an %select{rvalue|lvalue}1 of "
  "type $|could not bind to %select{rvalue|lvalue}1 of incompatible type}0,2">;
def err_reference_bind_init_list : Error<
  "reference to type %0 cannot bind to an initializer list">;
def warn_temporary_array_to_pointer_decay : Warning<
  "pointer is initialized by a temporary array, which will be destroyed at the "
  "end of the full-expression">,
  InGroup<DiagGroup<"address-of-array-temporary">>;
def err_init_list_bad_dest_type : Error<
  "%select{|non-aggregate }0type %1 cannot be initialized with an initializer "
  "list">;
def err_member_function_call_bad_cvr : Error<"member function %0 not viable: "
    "'this' argument has type %1, but function is not marked "
    "%select{const|restrict|const or restrict|volatile|const or volatile|"
    "volatile or restrict|const, volatile, or restrict}2">;

def err_reference_bind_to_bitfield : Error<
  "%select{non-const|volatile}0 reference cannot bind to "
  "bit-field%select{| %1}2">;
def err_reference_bind_to_vector_element : Error<
  "%select{non-const|volatile}0 reference cannot bind to vector element">;
def err_reference_var_requires_init : Error<
  "declaration of reference variable %0 requires an initializer">;
def err_reference_without_init : Error<
  "reference to type %0 requires an initializer">;
def note_value_initialization_here : Note<
  "in value-initialization of type %0 here">;
def err_reference_has_multiple_inits : Error<
  "reference cannot be initialized with multiple values">;
def err_init_non_aggr_init_list : Error<
  "initialization of non-aggregate type %0 with an initializer list">;
def err_init_reference_member_uninitialized : Error<
  "reference member of type %0 uninitialized">;
def note_uninit_reference_member : Note<
  "uninitialized reference member is here">;
def warn_field_is_uninit : Warning<"field %0 is uninitialized when used here">,
  InGroup<Uninitialized>;
def warn_base_class_is_uninit : Warning<
  "base class %0 is uninitialized when used here to access %q1">,
  InGroup<Uninitialized>;
def warn_reference_field_is_uninit : Warning<
  "reference %0 is not yet bound to a value when used here">,
  InGroup<Uninitialized>;
def note_uninit_in_this_constructor : Note<
  "during field initialization in %select{this|the implicit default}0 "
  "constructor">;
def warn_static_self_reference_in_init : Warning<
  "static variable %0 is suspiciously used within its own initialization">,
  InGroup<UninitializedStaticSelfInit>;
def warn_uninit_self_reference_in_init : Warning<
  "variable %0 is uninitialized when used within its own initialization">,
  InGroup<Uninitialized>;
def warn_uninit_self_reference_in_reference_init : Warning<
  "reference %0 is not yet bound to a value when used within its own"
  " initialization">,
  InGroup<Uninitialized>;
def warn_uninit_var : Warning<
  "variable %0 is uninitialized when %select{used here|captured by block}1">,
  InGroup<Uninitialized>, DefaultIgnore;
def warn_sometimes_uninit_var : Warning<
  "variable %0 is %select{used|captured}1 uninitialized whenever "
  "%select{'%3' condition is %select{true|false}4|"
  "'%3' loop %select{is entered|exits because its condition is false}4|"
  "'%3' loop %select{condition is true|exits because its condition is false}4|"
  "switch %3 is taken|"
  "its declaration is reached|"
  "%3 is called}2">,
  InGroup<UninitializedSometimes>, DefaultIgnore;
def warn_maybe_uninit_var : Warning<
  "variable %0 may be uninitialized when "
  "%select{used here|captured by block}1">,
  InGroup<UninitializedMaybe>, DefaultIgnore;
def note_var_declared_here : Note<"variable %0 is declared here">;
def note_uninit_var_use : Note<
  "%select{uninitialized use occurs|variable is captured by block}0 here">;
def warn_uninit_byref_blockvar_captured_by_block : Warning<
  "block pointer variable %0 is uninitialized when captured by block">,
  InGroup<Uninitialized>, DefaultIgnore;
def note_block_var_fixit_add_initialization : Note<
  "did you mean to use __block %0?">;
def note_in_omitted_aggregate_initializer : Note<
  "in implicit initialization of %select{"
  "array element %1 with omitted initializer|"
  "field %1 with omitted initializer|"
  "trailing array elements in runtime-sized array new}0">;
def note_in_reference_temporary_list_initializer : Note<
  "in initialization of temporary of type %0 created to "
  "list-initialize this reference">;
def note_var_fixit_add_initialization : Note<
  "initialize the variable %0 to silence this warning">;
def note_uninit_fixit_remove_cond : Note<
  "remove the %select{'%1' if its condition|condition if it}0 "
  "is always %select{false|true}2">;
def err_init_incomplete_type : Error<"initialization of incomplete type %0">;
def err_list_init_in_parens : Error<
  "cannot initialize %select{non-class|reference}0 type %1 with a "
  "parenthesized initializer list">;

def warn_unsequenced_mod_mod : Warning<
  "multiple unsequenced modifications to %0">, InGroup<Unsequenced>;
def warn_unsequenced_mod_use : Warning<
  "unsequenced modification and access to %0">, InGroup<Unsequenced>;

def err_temp_copy_no_viable : Error<
  "no viable constructor %select{copying variable|copying parameter|"
  "returning object|throwing object|copying member subobject|copying array "
  "element|allocating object|copying temporary|initializing base subobject|"
  "initializing vector element|capturing value}0 of type %1">;
def ext_rvalue_to_reference_temp_copy_no_viable : Extension<
  "no viable constructor %select{copying variable|copying parameter|"
  "returning object|throwing object|copying member subobject|copying array "
  "element|allocating object|copying temporary|initializing base subobject|"
  "initializing vector element|capturing value}0 of type %1; C++98 requires a copy "
  "constructor when binding a reference to a temporary">,
  InGroup<BindToTemporaryCopy>;
def err_temp_copy_ambiguous : Error<
  "ambiguous constructor call when %select{copying variable|copying "
  "parameter|returning object|throwing object|copying member subobject|copying "
  "array element|allocating object|copying temporary|initializing base subobject|"
  "initializing vector element|capturing value}0 of type %1">;
def err_temp_copy_deleted : Error<
  "%select{copying variable|copying parameter|returning object|throwing "
  "object|copying member subobject|copying array element|allocating object|"
  "copying temporary|initializing base subobject|initializing vector element|"
  "capturing value}0 of type %1 invokes deleted constructor">;
def err_temp_copy_incomplete : Error<
  "copying a temporary object of incomplete type %0">;
def warn_cxx98_compat_temp_copy : Warning<
  "%select{copying variable|copying parameter|returning object|throwing "
  "object|copying member subobject|copying array element|allocating object|"
  "copying temporary|initializing base subobject|initializing vector element}1 "
  "of type %2 when binding a reference to a temporary would %select{invoke "
  "an inaccessible constructor|find no viable constructor|find ambiguous "
  "constructors|invoke a deleted constructor}0 in C++98">,
  InGroup<CXX98CompatBindToTemporaryCopy>, DefaultIgnore;
def err_selected_explicit_constructor : Error<
  "chosen constructor is explicit in copy-initialization">;
def note_explicit_ctor_deduction_guide_here : Note<
  "explicit %select{constructor|deduction guide}0 declared here">;

// C++11 decltype
def err_decltype_in_declarator : Error<
    "'decltype' cannot be used to name a declaration">;
    
// C++11 auto
def warn_cxx98_compat_auto_type_specifier : Warning<
  "'auto' type specifier is incompatible with C++98">,
  InGroup<CXX98Compat>, DefaultIgnore;
def err_auto_variable_cannot_appear_in_own_initializer : Error<
  "variable %0 declared with deduced type %1 "
  "cannot appear in its own initializer">;
def err_binding_cannot_appear_in_own_initializer : Error<
  "binding %0 cannot appear in the initializer of its own "
  "decomposition declaration">;
def err_illegal_decl_array_of_auto : Error<
  "'%0' declared as array of %1">;
def err_new_array_of_auto : Error<
  "cannot allocate array of 'auto'">;
def err_auto_not_allowed : Error<
  "%select{'auto'|'decltype(auto)'|'__auto_type'|"
  "use of "
  "%select{class template|function template|variable template|alias template|"
  "template template parameter|template}2 %3 requires template arguments; "
  "argument deduction}0 not allowed "
  "%select{in function prototype"
  "|in non-static struct member|in struct member"
  "|in non-static union member|in union member"
  "|in non-static class member|in interface member"
  "|in exception declaration|in template parameter until C++17|in block literal"
  "|in template argument|in typedef|in type alias|in function return type"
  "|in conversion function type|here|in lambda parameter"
  "|in type allocated by 'new'|in K&R-style function parameter"
  "|in template parameter|in friend declaration}1">;
def err_dependent_deduced_tst : Error<
  "typename specifier refers to "
  "%select{class template|function template|variable template|alias template|"
  "template template parameter|template}0 member in %1; "
  "argument deduction not allowed here">;
def err_auto_not_allowed_var_inst : Error<
  "'auto' variable template instantiation is not allowed">;
def err_auto_var_requires_init : Error<
  "declaration of variable %0 with deduced type %1 requires an initializer">;
def err_auto_new_requires_ctor_arg : Error<
  "new expression for type %0 requires a constructor argument">;
def err_auto_new_list_init : Error<
  "new expression for type %0 cannot use list-initialization">;
def err_auto_var_init_no_expression : Error<
  "initializer for variable %0 with type %1 is empty">;
def err_auto_var_init_multiple_expressions : Error<
  "initializer for variable %0 with type %1 contains multiple expressions">;
def err_auto_var_init_paren_braces : Error<
  "cannot deduce type for variable %1 with type %2 from "
  "%select{parenthesized|nested}0 initializer list">;
def err_auto_new_ctor_multiple_expressions : Error<
  "new expression for type %0 contains multiple constructor arguments">;
def err_auto_missing_trailing_return : Error<
  "'auto' return without trailing return type; deduced return types are a "
  "C++14 extension">;
def err_deduced_return_type : Error<
  "deduced return types are a C++14 extension">;
def err_trailing_return_without_auto : Error<
  "function with trailing return type must specify return type 'auto', not %0">;
def err_trailing_return_in_parens : Error<
  "trailing return type may not be nested within parentheses">;
def err_auto_var_deduction_failure : Error<
  "variable %0 with type %1 has incompatible initializer of type %2">;
def err_auto_var_deduction_failure_from_init_list : Error<
  "cannot deduce actual type for variable %0 with type %1 from initializer list">;
def err_auto_new_deduction_failure : Error<
  "new expression for type %0 has incompatible constructor argument of type %1">;
def err_auto_different_deductions : Error<
  "%select{'auto'|'decltype(auto)'|'__auto_type'|template arguments}0 "
  "deduced as %1 in declaration of %2 and "
  "deduced as %3 in declaration of %4">;
def err_auto_non_deduced_not_alone : Error<
  "%select{function with deduced return type|"
  "declaration with trailing return type}0 "
  "must be the only declaration in its group">;
def err_implied_std_initializer_list_not_found : Error<
  "cannot deduce type of initializer list because std::initializer_list was "
  "not found; include <initializer_list>">;
def err_malformed_std_initializer_list : Error<
  "std::initializer_list must be a class template with a single type parameter">;
def warn_dangling_std_initializer_list : Warning<
  "array backing the initializer list will be destroyed at the end of "
  "%select{the full-expression|the constructor}0">,
  InGroup<DiagGroup<"dangling-initializer-list">>;
def err_auto_init_list_from_c : Error<
  "cannot use __auto_type with initializer list in C">;
def err_auto_bitfield : Error<
  "cannot pass bit-field as __auto_type initializer in C">;

// C++1y decltype(auto) type
def err_decltype_auto_invalid : Error<
  "'decltype(auto)' not allowed here">;
def err_decltype_auto_cannot_be_combined : Error<
  "'decltype(auto)' cannot be combined with other type specifiers">;
def err_decltype_auto_function_declarator_not_declaration : Error<
  "'decltype(auto)' can only be used as a return type "
  "in a function declaration">;
def err_decltype_auto_compound_type : Error<
  "cannot form %select{pointer to|reference to|array of}0 'decltype(auto)'">;
def err_decltype_auto_initializer_list : Error<
  "cannot deduce 'decltype(auto)' from initializer list">;

// C++1z deduced class template specialization types
def err_deduced_class_template_compound_type : Error<
  "cannot %select{form pointer to|form reference to|form array of|"
  "form function returning|use parentheses when declaring variable with}0 "
  "deduced class template specialization type">;
def err_deduced_non_class_template_specialization_type : Error<
  "%select{<error>|function template|variable template|alias template|"
  "template template parameter|template}0 %1 requires template arguments; "
  "argument deduction only allowed for class templates">;
def err_deduced_class_template_ctor_ambiguous : Error<
  "ambiguous deduction for template arguments of %0">;
def err_deduced_class_template_ctor_no_viable : Error<
  "no viable constructor or deduction guide for deduction of "
  "template arguments of %0">;
def err_deduced_class_template_incomplete : Error<
  "template %0 has no definition and no %select{|viable }1deduction guides "
  "for deduction of template arguments">;
def err_deduced_class_template_deleted : Error<
  "class template argument deduction for %0 selected a deleted constructor">;
def err_deduced_class_template_explicit : Error<
  "class template argument deduction for %0 selected an explicit "
  "%select{constructor|deduction guide}1 for copy-list-initialization">;
def err_deduction_guide_no_trailing_return_type : Error<
  "deduction guide declaration without trailing return type">;
def err_deduction_guide_bad_trailing_return_type : Error<
  "deduced type %1 of deduction guide is not %select{|written as }2"
  "a specialization of template %0">;
def err_deduction_guide_with_complex_decl : Error<
  "cannot specify any part of a return type in the "
  "declaration of a deduction guide">;
def err_deduction_guide_invalid_specifier : Error<
  "deduction guide cannot be declared '%0'">;
def err_deduction_guide_name_not_class_template : Error<
  "cannot specify deduction guide for "
  "%select{<error>|function template|variable template|alias template|"
  "template template parameter|dependent template name}0 %1">;
def err_deduction_guide_wrong_scope : Error<
  "deduction guide must be declared in the same scope as template %q0">;
def err_deduction_guide_defines_function : Error<
  "deduction guide cannot have a function definition">;
def err_deduction_guide_explicit_mismatch : Error<
  "deduction guide is %select{not |}0declared 'explicit' but "
  "previous declaration was%select{ not|}0">;
def err_deduction_guide_specialized : Error<"deduction guide cannot be "
  "%select{explicitly instantiated|explicitly specialized}0">;
def err_deduction_guide_template_not_deducible : Error<
    "deduction guide template contains "
    "%select{a template parameter|template parameters}0 that cannot be "
    "deduced">;

// C++1y deduced return types
def err_auto_fn_deduction_failure : Error<
  "cannot deduce return type %0 from returned value of type %1">;
def err_auto_fn_different_deductions : Error<
  "'%select{auto|decltype(auto)}0' in return type deduced as %1 here but "
  "deduced as %2 in earlier return statement">;
def err_auto_fn_used_before_defined : Error<
  "function %0 with deduced return type cannot be used before it is defined">;
def err_auto_fn_no_return_but_not_auto : Error<
  "cannot deduce return type %0 for function with no return statements">;
def err_auto_fn_return_void_but_not_auto : Error<
  "cannot deduce return type %0 from omitted return expression">;
def err_auto_fn_return_init_list : Error<
  "cannot deduce return type from initializer list">;
def err_auto_fn_virtual : Error<
  "function with deduced return type cannot be virtual">;

// C++11 override control
def override_keyword_only_allowed_on_virtual_member_functions : Error<
  "only virtual member functions can be marked '%0'">;
def override_keyword_hides_virtual_member_function : Error<
  "non-virtual member function marked '%0' hides virtual member "
  "%select{function|functions}1">;
def err_function_marked_override_not_overriding : Error<
  "%0 marked 'override' but does not override any member functions">;
def warn_destructor_marked_not_override_overriding : Warning <
  "%0 overrides a destructor but is not marked 'override'">,
  InGroup<CXX11WarnOverrideDestructor>, DefaultIgnore;
def warn_function_marked_not_override_overriding : Warning <
  "%0 overrides a member function but is not marked 'override'">,
  InGroup<CXX11WarnOverrideMethod>;
def err_class_marked_final_used_as_base : Error<
  "base %0 is marked '%select{final|sealed}1'">;
def warn_abstract_final_class : Warning<
  "abstract class is marked '%select{final|sealed}0'">, InGroup<AbstractFinalClass>;

// C++11 attributes
def err_repeat_attribute : Error<"%0 attribute cannot be repeated">;

// C++11 final
def err_final_function_overridden : Error<
  "declaration of %0 overrides a '%select{final|sealed}1' function">;

// C++11 scoped enumerations
def err_enum_invalid_underlying : Error<
  "non-integral type %0 is an invalid underlying type">;
def err_enumerator_too_large : Error<
  "enumerator value is not representable in the underlying type %0">;
def ext_enumerator_too_large : Extension<
  "enumerator value is not representable in the underlying type %0">,
  InGroup<MicrosoftEnumValue>;
def err_enumerator_wrapped : Error<
  "enumerator value %0 is not representable in the underlying type %1">;
def err_enum_redeclare_type_mismatch : Error<
  "enumeration redeclared with different underlying type %0 (was %1)">;
def err_enum_redeclare_fixed_mismatch : Error<
  "enumeration previously declared with %select{non|}0fixed underlying type">;
def err_enum_redeclare_scoped_mismatch : Error<
  "enumeration previously declared as %select{un|}0scoped">;
def err_enum_class_reference : Error<
  "reference to %select{|scoped }0enumeration must use 'enum' "
  "not 'enum class'">;
def err_only_enums_have_underlying_types : Error<
  "only enumeration types have underlying types">;
def err_underlying_type_of_incomplete_enum : Error<
  "cannot determine underlying type of incomplete enumeration type %0">;

// C++11 delegating constructors
def err_delegating_ctor : Error<
  "delegating constructors are permitted only in C++11">;
def warn_cxx98_compat_delegating_ctor : Warning<
  "delegating constructors are incompatible with C++98">,
  InGroup<CXX98Compat>, DefaultIgnore;
def err_delegating_initializer_alone : Error<
  "an initializer for a delegating constructor must appear alone">;
def warn_delegating_ctor_cycle : Warning<
  "constructor for %0 creates a delegation cycle">, DefaultError,
  InGroup<DelegatingCtorCycles>;
def note_it_delegates_to : Note<"it delegates to">;
def note_which_delegates_to : Note<"which delegates to">;

// C++11 range-based for loop
def err_for_range_decl_must_be_var : Error<
  "for range declaration must declare a variable">;
def err_for_range_storage_class : Error<
  "loop variable %0 may not be declared %select{'extern'|'static'|"
  "'__private_extern__'|'auto'|'register'|'constexpr'}1">;
def err_type_defined_in_for_range : Error<
  "types may not be defined in a for range declaration">;
def err_for_range_deduction_failure : Error<
  "cannot use type %0 as a range">;
def err_for_range_incomplete_type : Error<
  "cannot use incomplete type %0 as a range">;
def err_for_range_iter_deduction_failure : Error<
  "cannot use type %0 as an iterator">;
def err_for_range_member_begin_end_mismatch : Error<
  "range type %0 has '%select{begin|end}1' member but no '%select{end|begin}1' member">;
def ext_for_range_begin_end_types_differ : ExtWarn<
  "'begin' and 'end' returning different types (%0 and %1) is a C++17 extension">,
  InGroup<CXX17>;
def warn_for_range_begin_end_types_differ : Warning<
  "'begin' and 'end' returning different types (%0 and %1) is incompatible "
  "with C++ standards before C++17">, InGroup<CXXPre1zCompat>, DefaultIgnore;
def note_in_for_range: Note<
  "when looking up '%select{begin|end}0' function for range expression "
  "of type %1">;
def err_for_range_invalid: Error<
  "invalid range expression of type %0; no viable '%select{begin|end}1' "
  "function available">;
def err_range_on_array_parameter : Error<
  "cannot build range expression with array function parameter %0 since "
  "parameter with array type %1 is treated as pointer type %2">;
def err_for_range_dereference : Error<
  "invalid range expression of type %0; did you mean to dereference it "
  "with '*'?">;
def note_for_range_invalid_iterator : Note <
  "in implicit call to 'operator%select{!=|*|++}0' for iterator of type %1">;
def note_for_range_begin_end : Note<
  "selected '%select{begin|end}0' %select{function|template }1%2 with iterator type %3">;
def warn_for_range_const_reference_copy : Warning<
  "loop variable %0 "
  "%diff{has type $ but is initialized with type $"
  "| is initialized with a value of a different type}1,2 resulting in a copy">,
  InGroup<RangeLoopAnalysis>, DefaultIgnore;
def note_use_type_or_non_reference : Note<
  "use non-reference type %0 to keep the copy or type %1 to prevent copying">;
def warn_for_range_variable_always_copy : Warning<
  "loop variable %0 is always a copy because the range of type %1 does not "
  "return a reference">,
  InGroup<RangeLoopAnalysis>, DefaultIgnore;
def note_use_non_reference_type : Note<"use non-reference type %0">;
def warn_for_range_copy : Warning<
  "loop variable %0 of type %1 creates a copy from type %2">,
  InGroup<RangeLoopAnalysis>, DefaultIgnore;
def note_use_reference_type : Note<"use reference type %0 to prevent copying">;

// C++11 constexpr
def warn_cxx98_compat_constexpr : Warning<
  "'constexpr' specifier is incompatible with C++98">,
  InGroup<CXX98Compat>, DefaultIgnore;
// FIXME: Maybe this should also go in -Wc++14-compat?
def warn_cxx14_compat_constexpr_not_const : Warning<
  "'constexpr' non-static member function will not be implicitly 'const' "
  "in C++14; add 'const' to avoid a change in behavior">,
  InGroup<DiagGroup<"constexpr-not-const">>;
def err_invalid_constexpr : Error<
  "%select{function parameter|typedef|non-static data member}0 "
  "cannot be constexpr">;
def err_invalid_constexpr_member : Error<"non-static data member cannot be "
  "constexpr%select{; did you intend to make it %select{const|static}0?|}1">;
def err_constexpr_tag : Error<
  "%select{class|struct|interface|union|enum}0 cannot be marked constexpr">;
def err_constexpr_dtor : Error<"destructor cannot be marked constexpr">;
def err_constexpr_no_declarators : Error<
  "constexpr can only be used in variable and function declarations">;
def err_invalid_constexpr_var_decl : Error<
  "constexpr variable declaration must be a definition">;
def err_constexpr_static_mem_var_requires_init : Error<
  "declaration of constexpr static data member %0 requires an initializer">;
def err_constexpr_var_non_literal : Error<
  "constexpr variable cannot have non-literal type %0">;
def err_constexpr_var_requires_const_init : Error<
  "constexpr variable %0 must be initialized by a constant expression">;
def err_constexpr_redecl_mismatch : Error<
  "%select{non-constexpr declaration of %0 follows constexpr declaration"
  "|constexpr declaration of %0 follows non-constexpr declaration}1">;
def err_constexpr_virtual : Error<"virtual function cannot be constexpr">;
def err_constexpr_virtual_base : Error<
  "constexpr %select{member function|constructor}0 not allowed in "
  "%select{struct|interface|class}1 with virtual base "
  "%plural{1:class|:classes}2">;
def note_non_literal_incomplete : Note<
  "incomplete type %0 is not a literal type">;
def note_non_literal_virtual_base : Note<"%select{struct|interface|class}0 "
  "with virtual base %plural{1:class|:classes}1 is not a literal type">;
def note_constexpr_virtual_base_here : Note<"virtual base class declared here">;
def err_constexpr_non_literal_return : Error<
  "constexpr function's return type %0 is not a literal type">;
def err_constexpr_non_literal_param : Error<
  "constexpr %select{function|constructor}1's %ordinal0 parameter type %2 is "
  "not a literal type">;
def err_constexpr_body_invalid_stmt : Error<
  "statement not allowed in constexpr %select{function|constructor}0">;
def ext_constexpr_body_invalid_stmt : ExtWarn<
  "use of this statement in a constexpr %select{function|constructor}0 "
  "is a C++14 extension">, InGroup<CXX14>;
def warn_cxx11_compat_constexpr_body_invalid_stmt : Warning<
  "use of this statement in a constexpr %select{function|constructor}0 "
  "is incompatible with C++ standards before C++14">,
  InGroup<CXXPre14Compat>, DefaultIgnore;
def ext_constexpr_type_definition : ExtWarn<
  "type definition in a constexpr %select{function|constructor}0 "
  "is a C++14 extension">, InGroup<CXX14>;
def warn_cxx11_compat_constexpr_type_definition : Warning<
  "type definition in a constexpr %select{function|constructor}0 "
  "is incompatible with C++ standards before C++14">,
  InGroup<CXXPre14Compat>, DefaultIgnore;
def err_constexpr_vla : Error<
  "variably-modified type %0 cannot be used in a constexpr "
  "%select{function|constructor}1">;
def ext_constexpr_local_var : ExtWarn<
  "variable declaration in a constexpr %select{function|constructor}0 "
  "is a C++14 extension">, InGroup<CXX14>;
def warn_cxx11_compat_constexpr_local_var : Warning<
  "variable declaration in a constexpr %select{function|constructor}0 "
  "is incompatible with C++ standards before C++14">,
  InGroup<CXXPre14Compat>, DefaultIgnore;
def err_constexpr_local_var_static : Error<
  "%select{static|thread_local}1 variable not permitted in a constexpr "
  "%select{function|constructor}0">;
def err_constexpr_local_var_non_literal_type : Error<
  "variable of non-literal type %1 cannot be defined in a constexpr "
  "%select{function|constructor}0">;
def err_constexpr_local_var_no_init : Error<
  "variables defined in a constexpr %select{function|constructor}0 must be "
  "initialized">;
def ext_constexpr_function_never_constant_expr : ExtWarn<
  "constexpr %select{function|constructor}0 never produces a "
  "constant expression">, InGroup<DiagGroup<"invalid-constexpr">>, DefaultError;
def err_attr_cond_never_constant_expr : Error<
  "%0 attribute expression never produces a constant expression">;
def err_diagnose_if_invalid_diagnostic_type : Error<
  "invalid diagnostic type for 'diagnose_if'; use \"error\" or \"warning\" "
  "instead">;
def err_constexpr_body_no_return : Error<
  "no return statement in constexpr function">;
def err_constexpr_return_missing_expr : Error<
  "non-void constexpr function %0 should return a value">;
def warn_cxx11_compat_constexpr_body_no_return : Warning<
  "constexpr function with no return statements is incompatible with C++ "
  "standards before C++14">, InGroup<CXXPre14Compat>, DefaultIgnore;
def ext_constexpr_body_multiple_return : ExtWarn<
  "multiple return statements in constexpr function is a C++14 extension">,
  InGroup<CXX14>;
def warn_cxx11_compat_constexpr_body_multiple_return : Warning<
  "multiple return statements in constexpr function "
  "is incompatible with C++ standards before C++14">,
  InGroup<CXXPre14Compat>, DefaultIgnore;
def note_constexpr_body_previous_return : Note<
  "previous return statement is here">;
def err_constexpr_function_try_block : Error<
  "function try block not allowed in constexpr %select{function|constructor}0">;
def err_constexpr_union_ctor_no_init : Error<
  "constexpr union constructor does not initialize any member">;
def err_constexpr_ctor_missing_init : Error<
  "constexpr constructor must initialize all members">;
def note_constexpr_ctor_missing_init : Note<
  "member not initialized by constructor">;
def note_non_literal_no_constexpr_ctors : Note<
  "%0 is not literal because it is not an aggregate and has no constexpr "
  "constructors other than copy or move constructors">;
def note_non_literal_base_class : Note<
  "%0 is not literal because it has base class %1 of non-literal type">;
def note_non_literal_field : Note<
  "%0 is not literal because it has data member %1 of "
  "%select{non-literal|volatile}3 type %2">;
def note_non_literal_user_provided_dtor : Note<
  "%0 is not literal because it has a user-provided destructor">;
def note_non_literal_nontrivial_dtor : Note<
  "%0 is not literal because it has a non-trivial destructor">;
def warn_private_extern : Warning<
  "use of __private_extern__ on a declaration may not produce external symbol "
  "private to the linkage unit and is deprecated">, InGroup<PrivateExtern>;
def note_private_extern : Note<
  "use __attribute__((visibility(\"hidden\"))) attribute instead">;

// C++ Concepts TS
def err_concept_wrong_decl_kind : Error<
  "'concept' can only appear on the definition of a function template or variable template">;
def err_concept_decls_may_only_appear_in_namespace_scope : Error<
  "concept declarations may only appear in namespace scope">;
def err_function_concept_not_defined : Error<
  "function concept declaration must be a definition">;
def err_var_concept_not_initialized : Error<
  "variable concept declaration must be initialized">;
def err_function_concept_exception_spec : Error<
  "function concept cannot have exception specification">;
def err_concept_decl_invalid_specifiers : Error<
  "%select{variable|function}0 concept cannot be declared "
  "'%select{thread_local|inline|friend|constexpr}1'">;
def err_function_concept_with_params : Error<
  "function concept cannot have any parameters">;
def err_function_concept_bool_ret : Error<
  "declared return type of function concept must be 'bool'">;
def err_variable_concept_bool_decl : Error<
  "declared type of variable concept must be 'bool'">;
def err_concept_specified_specialization : Error<
  "'concept' cannot be applied on an "
  "%select{explicit instantiation|explicit specialization|partial specialization}0">;
def err_concept_specialized : Error<
  "%select{function|variable}0 concept cannot be "
  "%select{explicitly instantiated|explicitly specialized|partially specialized}1">;

def err_template_different_associated_constraints : Error<
  "associated constraints differ in template redeclaration">;

// C++11 char16_t/char32_t
def warn_cxx98_compat_unicode_type : Warning<
  "'%0' type specifier is incompatible with C++98">,
  InGroup<CXX98Compat>, DefaultIgnore;

// __make_integer_seq
def err_integer_sequence_negative_length : Error<
  "integer sequences must have non-negative sequence length">;
def err_integer_sequence_integral_element_type : Error<
  "integer sequences must have integral element type">;

// __type_pack_element
def err_type_pack_element_out_of_bounds : Error<
  "a parameter pack may not be accessed at an out of bounds index">;

// Objective-C++
def err_objc_decls_may_only_appear_in_global_scope : Error<
  "Objective-C declarations may only appear in global scope">;
def warn_auto_var_is_id : Warning<
  "'auto' deduced as 'id' in declaration of %0">,
  InGroup<DiagGroup<"auto-var-id">>;

// Attributes
def err_nsobject_attribute : Error<
  "'NSObject' attribute is for pointer types only">;
def err_attributes_are_not_compatible : Error<
  "%0 and %1 attributes are not compatible">;
def err_attribute_wrong_number_arguments : Error<
  "%0 attribute %plural{0:takes no arguments|1:takes one argument|"
  ":requires exactly %1 arguments}1">;
def err_attribute_too_many_arguments : Error<
  "%0 attribute takes no more than %1 argument%s1">;
def err_attribute_too_few_arguments : Error<
  "%0 attribute takes at least %1 argument%s1">;
def err_attribute_invalid_vector_type : Error<"invalid vector element type %0">;
def err_attribute_bad_neon_vector_size : Error<
  "Neon vector size must be 64 or 128 bits">;
def err_attribute_requires_positive_integer : Error<
  "%0 attribute requires a positive integral compile time constant expression">;
def err_attribute_requires_opencl_version : Error<
  "%0 attribute requires OpenCL version %1%select{| or above}2">;
def warn_unsupported_target_attribute
    : Warning<"Ignoring unsupported '%0' in the target attribute string">,
    InGroup<IgnoredAttributes>;
def err_attribute_unsupported
    : Error<"%0 attribute is not supported for this target">;
// The err_*_attribute_argument_not_int are separate because they're used by
// VerifyIntegerConstantExpression.
def err_aligned_attribute_argument_not_int : Error<
  "'aligned' attribute requires integer constant">;
def err_align_value_attribute_argument_not_int : Error<
  "'align_value' attribute requires integer constant">;
def err_alignas_attribute_wrong_decl_type : Error<
  "%0 attribute cannot be applied to a %select{function parameter|"
  "variable with 'register' storage class|'catch' variable|bit-field}1">;
def err_alignas_missing_on_definition : Error<
  "%0 must be specified on definition if it is specified on any declaration">;
def note_alignas_on_declaration : Note<"declared with %0 attribute here">;
def err_alignas_mismatch : Error<
  "redeclaration has different alignment requirement (%1 vs %0)">;
def err_alignas_underaligned : Error<
  "requested alignment is less than minimum alignment of %1 for type %0">;
def err_attribute_argument_n_type : Error<
  "%0 attribute requires parameter %1 to be %select{int or bool|an integer "
  "constant|a string|an identifier}2">;
def err_attribute_argument_type : Error<
  "%0 attribute requires %select{int or bool|an integer "
  "constant|a string|an identifier}1">;
def err_attribute_argument_outof_range : Error<
  "%0 attribute requires integer constant between %1 and %2 inclusive">;
def err_init_priority_object_attr : Error<
  "can only use 'init_priority' attribute on file-scope definitions "
  "of objects of class type">;
def err_attribute_argument_vec_type_hint : Error<
  "invalid attribute argument %0 - expecting a vector or vectorizable scalar type">;
def err_attribute_argument_out_of_bounds : Error<
  "%0 attribute parameter %1 is out of bounds">;
def err_attribute_only_once_per_parameter : Error<
  "%0 attribute can only be applied once per parameter">;
def err_attribute_uuid_malformed_guid : Error<
  "uuid attribute contains a malformed GUID">;
def err_mismatched_uuid : Error<"uuid does not match previous declaration">;
def note_previous_uuid : Note<"previous uuid specified here">;
def warn_attribute_pointers_only : Warning<
  "%0 attribute only applies to%select{| constant}1 pointer arguments">,
  InGroup<IgnoredAttributes>;
def err_attribute_pointers_only : Error<warn_attribute_pointers_only.Text>;
def err_attribute_integers_only : Error<
  "%0 attribute argument may only refer to a function parameter of integer "
  "type">;
def warn_attribute_return_pointers_only : Warning<
  "%0 attribute only applies to return values that are pointers">,
  InGroup<IgnoredAttributes>;
def warn_attribute_return_pointers_refs_only : Warning<
  "%0 attribute only applies to return values that are pointers or references">,
  InGroup<IgnoredAttributes>;
def warn_attribute_pointer_or_reference_only : Warning<
  "%0 attribute only applies to a pointer or reference (%1 is invalid)">,
  InGroup<IgnoredAttributes>;
def err_attribute_no_member_pointers : Error<
  "%0 attribute cannot be used with pointers to members">;
def err_attribute_invalid_implicit_this_argument : Error<
  "%0 attribute is invalid for the implicit this argument">;
def err_ownership_type : Error<
  "%0 attribute only applies to %select{pointer|integer}1 arguments">;
def err_ownership_returns_index_mismatch : Error<
  "'ownership_returns' attribute index does not match; here it is %0">;
def note_ownership_returns_index_mismatch : Note<
  "declared with index %0 here">;
def err_format_strftime_third_parameter : Error<
  "strftime format attribute requires 3rd parameter to be 0">;
def err_format_attribute_requires_variadic : Error<
  "format attribute requires variadic function">;
def err_format_attribute_not : Error<"format argument not %0">;
def err_format_attribute_result_not : Error<"function does not return %0">;
def err_format_attribute_implicit_this_format_string : Error<
  "format attribute cannot specify the implicit this argument as the format "
  "string">;
def err_init_method_bad_return_type : Error<
  "init methods must return an object pointer type, not %0">;
def err_attribute_invalid_size : Error<
  "vector size not an integral multiple of component size">;
def err_attribute_zero_size : Error<"zero vector size">;
def err_attribute_size_too_large : Error<"vector size too large">;
def err_typecheck_vector_not_convertable_implict_truncation : Error<
   "cannot convert between %select{scalar|vector}0 type %1 and vector type"
   " %2 as implicit conversion would cause truncation">;
def err_typecheck_vector_not_convertable : Error<
  "cannot convert between vector values of different size (%0 and %1)">;
def err_typecheck_vector_not_convertable_non_scalar : Error<
  "cannot convert between vector and non-scalar values (%0 and %1)">;
def err_typecheck_vector_lengths_not_equal : Error<
  "vector operands do not have the same number of elements (%0 and %1)">;
def warn_typecheck_vector_element_sizes_not_equal : Warning<
  "vector operands do not have the same elements sizes (%0 and %1)">,
  InGroup<DiagGroup<"vec-elem-size">>, DefaultError;
def err_ext_vector_component_exceeds_length : Error<
  "vector component access exceeds type %0">;
def err_ext_vector_component_name_illegal : Error<
  "illegal vector component name '%0'">;
def err_attribute_address_space_negative : Error<
  "address space is negative">;
def err_attribute_address_space_too_high : Error<
  "address space is larger than the maximum supported (%0)">;
def err_attribute_address_multiple_qualifiers : Error<
  "multiple address spaces specified for type">;
def err_attribute_address_function_type : Error<
  "function type may not be qualified with an address space">;
def err_as_qualified_auto_decl : Error<
  "automatic variable qualified with an%select{| invalid}0 address space">;
def err_arg_with_address_space : Error<
  "parameter may not be qualified with an address space">;
def err_field_with_address_space : Error<
  "field may not be qualified with an address space">;
def err_attr_objc_ownership_redundant : Error<
  "the type %0 is already explicitly ownership-qualified">;
def err_invalid_nsnumber_type : Error<
  "%0 is not a valid literal type for NSNumber">;
def err_objc_illegal_boxed_expression_type : Error<
  "illegal type %0 used in a boxed expression">;
def err_objc_non_trivially_copyable_boxed_expression_type : Error<
  "non-trivially copyable type %0 cannot be used in a boxed expression">;
def err_objc_incomplete_boxed_expression_type : Error<
  "incomplete type %0 used in a boxed expression">;
def err_undeclared_objc_literal_class : Error<
  "definition of class %0 must be available to use Objective-C "
  "%select{array literals|dictionary literals|numeric literals|boxed expressions|"
  "string literals}1">;
def err_undeclared_boxing_method : Error<
  "declaration of %0 is missing in %1 class">;
def err_objc_literal_method_sig : Error<
  "literal construction method %0 has incompatible signature">;
def note_objc_literal_method_param : Note<
  "%select{first|second|third}0 parameter has unexpected type %1 "
  "(should be %2)">;
def note_objc_literal_method_return : Note<
  "method returns unexpected type %0 (should be an object type)">;
def err_invalid_collection_element : Error<
  "collection element of type %0 is not an Objective-C object">;
def err_box_literal_collection : Error<
  "%select{string|character|boolean|numeric}0 literal must be prefixed by '@' "
  "in a collection">;
def warn_objc_literal_comparison : Warning<
  "direct comparison of %select{an array literal|a dictionary literal|"
  "a numeric literal|a boxed expression|}0 has undefined behavior">,
  InGroup<ObjCLiteralComparison>;
def err_missing_atsign_prefix : Error<
  "string literal must be prefixed by '@' ">;
def warn_objc_string_literal_comparison : Warning<
  "direct comparison of a string literal has undefined behavior">, 
  InGroup<ObjCStringComparison>;
def warn_concatenated_nsarray_literal : Warning<
  "concatenated NSString literal for an NSArray expression - "
  "possibly missing a comma">,
  InGroup<ObjCStringConcatenation>;
def note_objc_literal_comparison_isequal : Note<
  "use 'isEqual:' instead">;
def warn_objc_collection_literal_element : Warning<
  "object of type %0 is not compatible with "
  "%select{array element type|dictionary key type|dictionary value type}1 %2">,
  InGroup<ObjCLiteralConversion>;
def err_swift_param_attr_not_swiftcall : Error<
  "'%0' parameter can only be used with swiftcall calling convention">;
def err_swift_indirect_result_not_first : Error<
  "'swift_indirect_result' parameters must be first parameters of function">;
def err_swift_error_result_not_after_swift_context : Error<
  "'swift_error_result' parameter must follow 'swift_context' parameter">;
def err_swift_abi_parameter_wrong_type : Error<
  "'%0' parameter must have pointer%select{| to unqualified pointer}1 type; "
  "type here is %2">;

def err_attribute_argument_invalid : Error<
  "%0 attribute argument is invalid: %select{max must be 0 since min is 0|"
  "min must not be greater than max}1">;
def err_attribute_argument_is_zero : Error<
  "%0 attribute must be greater than 0">;
def warn_attribute_argument_n_negative : Warning<
  "%0 attribute parameter %1 is negative and will be ignored">,
  InGroup<CudaCompat>;
def err_property_function_in_objc_container : Error<
  "use of Objective-C property in function nested in Objective-C "
  "container not supported, move function outside its container">;

let CategoryName = "Cocoa API Issue" in {
def warn_objc_redundant_literal_use : Warning<
  "using %0 with a literal is redundant">, InGroup<ObjCRedundantLiteralUse>;
}

def err_attr_tlsmodel_arg : Error<"tls_model must be \"global-dynamic\", "
  "\"local-dynamic\", \"initial-exec\" or \"local-exec\"">;

def err_tls_var_aligned_over_maximum : Error<
  "alignment (%0) of thread-local variable %1 is greater than the maximum supported "
  "alignment (%2) for a thread-local variable on this target">;

def err_only_annotate_after_access_spec : Error<
  "access specifier can only have annotation attributes">;

def err_attribute_section_invalid_for_target : Error<
  "argument to 'section' attribute is not valid for this target: %0">;
def warn_mismatched_section : Warning<
  "section does not match previous declaration">, InGroup<Section>;

def err_anonymous_property: Error<
  "anonymous property is not supported">;
def err_property_is_variably_modified : Error<
  "property %0 has a variably modified type">;
def err_no_accessor_for_property : Error<
  "no %select{getter|setter}0 defined for property %1">;
def err_cannot_find_suitable_accessor : Error<
  "cannot find suitable %select{getter|setter}0 for property %1">;

def warn_alloca_align_alignof : Warning<
  "second argument to __builtin_alloca_with_align is supposed to be in bits">,
  InGroup<DiagGroup<"alloca-with-align-alignof">>;

def err_alignment_too_small : Error<
  "requested alignment must be %0 or greater">;
def err_alignment_too_big : Error<
  "requested alignment must be %0 or smaller">;
def err_alignment_not_power_of_two : Error<
  "requested alignment is not a power of 2">;
def err_alignment_dependent_typedef_name : Error<
  "requested alignment is dependent but declaration is not dependent">;

def err_attribute_aligned_too_great : Error<
  "requested alignment must be %0 bytes or smaller">;
def warn_redeclaration_without_attribute_prev_attribute_ignored : Warning<
  "%q0 redeclared without %1 attribute: previous %1 ignored">,
  InGroup<MicrosoftInconsistentDllImport>;
def warn_redeclaration_without_import_attribute : Warning<
  "%q0 redeclared without 'dllimport' attribute: 'dllexport' attribute added">,
  InGroup<MicrosoftInconsistentDllImport>;
def warn_dllimport_dropped_from_inline_function : Warning<
  "%q0 redeclared inline; %1 attribute ignored">,
  InGroup<IgnoredAttributes>;
def warn_attribute_ignored : Warning<"%0 attribute ignored">,
  InGroup<IgnoredAttributes>;
def warn_attribute_ignored_on_inline :
  Warning<"%0 attribute ignored on inline function">,
  InGroup<IgnoredAttributes>;
def warn_attribute_after_definition_ignored : Warning<
  "attribute %0 after definition is ignored">,
   InGroup<IgnoredAttributes>;
def warn_unknown_attribute_ignored : Warning<
  "unknown attribute %0 ignored">, InGroup<UnknownAttributes>;
def warn_cxx11_gnu_attribute_on_type : Warning<
  "attribute %0 ignored, because it cannot be applied to a type">,
  InGroup<IgnoredAttributes>;
def warn_unhandled_ms_attribute_ignored : Warning<
  "__declspec attribute %0 is not supported">, 
  InGroup<IgnoredAttributes>;
def err_decl_attribute_invalid_on_stmt : Error<
  "%0 attribute cannot be applied to a statement">;
def err_stmt_attribute_invalid_on_decl : Error<
  "%0 attribute cannot be applied to a declaration">;
def warn_declspec_attribute_ignored : Warning<
  "attribute %0 is ignored, place it after "
  "\"%select{class|struct|interface|union|enum}1\" to apply attribute to "
  "type declaration">, InGroup<IgnoredAttributes>;
def warn_attribute_precede_definition : Warning<
  "attribute declaration must precede definition">,
  InGroup<IgnoredAttributes>;
def warn_attribute_void_function_method : Warning<
  "attribute %0 cannot be applied to "
  "%select{functions|Objective-C method}1 without return value">,
  InGroup<IgnoredAttributes>;
def warn_attribute_weak_on_field : Warning<
  "__weak attribute cannot be specified on a field declaration">,
  InGroup<IgnoredAttributes>;
def warn_gc_attribute_weak_on_local : Warning<
  "Objective-C GC does not allow weak variables on the stack">,
  InGroup<IgnoredAttributes>;
def warn_nsobject_attribute : Warning<
  "'NSObject' attribute may be put on a typedef only; attribute is ignored">,
  InGroup<NSobjectAttribute>;
def warn_independentclass_attribute : Warning<
  "'objc_independent_class' attribute may be put on a typedef only; "
  "attribute is ignored">,
  InGroup<IndependentClassAttribute>;
def warn_ptr_independentclass_attribute : Warning<
  "'objc_independent_class' attribute may be put on Objective-C object "
  "pointer type only; attribute is ignored">,
  InGroup<IndependentClassAttribute>;
def warn_attribute_weak_on_local : Warning<
  "__weak attribute cannot be specified on an automatic variable when ARC "
  "is not enabled">,
  InGroup<IgnoredAttributes>;
def warn_weak_identifier_undeclared : Warning<
  "weak identifier %0 never declared">;
def err_attribute_weak_static : Error<
  "weak declaration cannot have internal linkage">;
def err_attribute_selectany_non_extern_data : Error<
  "'selectany' can only be applied to data items with external linkage">;
def err_declspec_thread_on_thread_variable : Error<
  "'__declspec(thread)' applied to variable that already has a "
  "thread-local storage specifier">;
def err_attribute_dll_not_extern : Error<
  "%q0 must have external linkage when declared %q1">;
def err_attribute_dll_thread_local : Error<
  "%q0 cannot be thread local when declared %q1">;
def err_attribute_dll_lambda : Error<
  "lambda cannot be declared %0">;
def warn_attribute_invalid_on_definition : Warning<
  "'%0' attribute cannot be specified on a definition">,
  InGroup<IgnoredAttributes>;
def err_attribute_dll_redeclaration : Error<
  "redeclaration of %q0 cannot add %q1 attribute">;
def warn_attribute_dll_redeclaration : Warning<
  "redeclaration of %q0 should not add %q1 attribute">,
  InGroup<DiagGroup<"dll-attribute-on-redeclaration">>;
def err_attribute_dllimport_function_definition : Error<
  "dllimport cannot be applied to non-inline function definition">;
def err_attribute_dll_deleted : Error<
  "attribute %q0 cannot be applied to a deleted function">;
def err_attribute_dllimport_data_definition : Error<
  "definition of dllimport data">;
def err_attribute_dllimport_static_field_definition : Error<
  "definition of dllimport static field not allowed">;
def warn_attribute_dllimport_static_field_definition : Warning<
  "definition of dllimport static field">,
  InGroup<DiagGroup<"dllimport-static-field-def">>;
def warn_attribute_dllexport_explicit_instantiation_decl : Warning<
  "explicit instantiation declaration should not be 'dllexport'">,
  InGroup<DiagGroup<"dllexport-explicit-instantiation-decl">>;
def warn_invalid_initializer_from_system_header : Warning<
  "invalid constructor form class in system header, should not be explicit">,
  InGroup<DiagGroup<"invalid-initializer-from-system-header">>;
def note_used_in_initialization_here : Note<"used in initialization here">;
def err_attribute_dll_member_of_dll_class : Error<
  "attribute %q0 cannot be applied to member of %q1 class">;
def warn_attribute_dll_instantiated_base_class : Warning<
  "propagating dll attribute to %select{already instantiated|explicitly specialized}0 "
  "base class template without dll attribute is not supported">,
  InGroup<DiagGroup<"unsupported-dll-base-class-template">>, DefaultIgnore;
def err_attribute_dll_ambiguous_default_ctor : Error<
  "'__declspec(dllexport)' cannot be applied to more than one default constructor in %0">;
def err_attribute_weakref_not_static : Error<
  "weakref declaration must have internal linkage">;
def err_attribute_weakref_not_global_context : Error<
  "weakref declaration of %0 must be in a global context">;
def err_attribute_weakref_without_alias : Error<
  "weakref declaration of %0 must also have an alias attribute">;
def err_alias_not_supported_on_darwin : Error <
  "only weak aliases are supported on darwin">;
def err_alias_to_undefined : Error<
  "%select{alias|ifunc}0 must point to a defined %select{variable or |}1function">;
def warn_alias_to_weak_alias : Warning<
  "%select{alias|ifunc}2 will always resolve to %0 even if weak definition of %1 is overridden">,
  InGroup<IgnoredAttributes>;
def warn_alias_with_section : Warning<
  "%select{alias|ifunc}1 will not be in section '%0' but in the same section as the %select{aliasee|resolver}2">,
  InGroup<IgnoredAttributes>;
def err_duplicate_mangled_name : Error<
  "definition with same mangled name as another definition">;
def err_cyclic_alias : Error<
  "%select{alias|ifunc}0 definition is part of a cycle">;
def err_ifunc_resolver_return : Error<
  "ifunc resolver function must return a pointer">;
def err_ifunc_resolver_params : Error<
  "ifunc resolver function must have no parameters">;
def warn_attribute_wrong_decl_type : Warning<
  "%0 attribute only applies to %select{"
  "functions"
  "|unions"
  "|variables and functions"
  "|functions and global variables"
  "|functions, variables, and Objective-C interfaces"
  "|functions and methods"
  "|parameters"
  "|functions, methods and blocks"
  "|functions, methods, and classes"
  "|functions, methods, and parameters"
  "|functions, methods, and global variables"
  "|classes"
  "|enums"
  "|variables"
  "|methods"
  "|fields and global variables"
  "|structs"
  "|parameters and typedefs"
  "|variables and typedefs"
  "|thread-local variables"
  "|variables and fields"
  "|variables, data members and tag types"
  "|types and namespaces"
  "|Objective-C interfaces"
  "|methods and properties"
  "|functions, methods, and properties"
  "|struct or union"
  "|struct, union or class"
  "|types"
  "|Objective-C instance methods"
  "|init methods of interface or class extension declarations"
  "|variables, functions and classes"
  "|functions, variables, classes, and Objective-C interfaces"
  "|Objective-C protocols"
  "|variables with static or thread storage duration"
  "|functions, methods, properties, and global variables"
  "|structs, unions, and typedefs"
  "|structs and typedefs"
  "|interface or protocol declarations"
  "|kernel functions"
  "|non-K&R-style functions"
  "|variables, enums, fields and typedefs"
  "|functions, methods, enums, and classes"
  "|structs, classes, variables, functions, and inline namespaces"
  "|variables, functions, methods, types, enumerations, enumerators, labels, and non-static data members"
  "|classes and enumerations"
  "|named declarations}1">,
  InGroup<IgnoredAttributes>;
def err_attribute_wrong_decl_type : Error<warn_attribute_wrong_decl_type.Text>;
def warn_type_attribute_wrong_type : Warning<
  "'%0' only applies to %select{function|pointer|"
  "Objective-C object or block pointer}1 types; type here is %2">,
  InGroup<IgnoredAttributes>;
def warn_incomplete_encoded_type : Warning<
  "encoding of %0 type is incomplete because %1 component has unknown encoding">,
  InGroup<DiagGroup<"encode-type">>;
def warn_gnu_inline_attribute_requires_inline : Warning<
  "'gnu_inline' attribute requires function to be marked 'inline',"
  " attribute ignored">,
  InGroup<IgnoredAttributes>;
def err_attribute_vecreturn_only_vector_member : Error<
  "the vecreturn attribute can only be used on a class or structure with one member, which must be a vector">;
def err_attribute_vecreturn_only_pod_record : Error<
  "the vecreturn attribute can only be used on a POD (plain old data) class or structure (i.e. no virtual functions)">;
def err_cconv_change : Error<
  "function declared '%0' here was previously declared "
  "%select{'%2'|without calling convention}1">;
def warn_cconv_ignored : Warning<
  "calling convention %0 ignored for this target">, InGroup<IgnoredAttributes>;
def err_cconv_knr : Error<
  "function with no prototype cannot use the %0 calling convention">;
def warn_cconv_knr : Warning<
  err_cconv_knr.Text>,
  InGroup<DiagGroup<"missing-prototype-for-cc">>;
def err_cconv_varargs : Error<
  "variadic function cannot use %0 calling convention">;
def warn_cconv_varargs : Warning<
  "%0 calling convention ignored on variadic function">,
  InGroup<IgnoredAttributes>;
def warn_cconv_structors : Warning<
  "%0 calling convention ignored on constructor/destructor">,
  InGroup<IgnoredAttributes>;
def err_regparm_mismatch : Error<"function declared with regparm(%0) "
  "attribute was previously declared "
  "%plural{0:without the regparm|:with the regparm(%1)}1 attribute">;
def err_function_attribute_mismatch : Error<
  "function declared with %0 attribute "
  "was previously declared without the %0 attribute">;
def err_objc_precise_lifetime_bad_type : Error<
  "objc_precise_lifetime only applies to retainable types; type here is %0">;
def warn_objc_precise_lifetime_meaningless : Error<
  "objc_precise_lifetime is not meaningful for "
  "%select{__unsafe_unretained|__autoreleasing}0 objects">;
def err_invalid_pcs : Error<"invalid PCS type">;
def warn_attribute_not_on_decl : Warning<
  "%0 attribute ignored when parsing type">, InGroup<IgnoredAttributes>;
def err_base_specifier_attribute : Error<
  "%0 attribute cannot be applied to a base specifier">;
def err_invalid_attribute_on_virtual_function : Error<
  "%0 attribute cannot be applied to virtual functions">;

// Availability attribute
def warn_availability_unknown_platform : Warning<
  "unknown platform %0 in availability macro">, InGroup<Availability>;
def warn_availability_version_ordering : Warning<
  "feature cannot be %select{introduced|deprecated|obsoleted}0 in %1 version "
  "%2 before it was %select{introduced|deprecated|obsoleted}3 in version %4; "
  "attribute ignored">, InGroup<Availability>;
def warn_mismatched_availability: Warning<
  "availability does not match previous declaration">, InGroup<Availability>;
def warn_mismatched_availability_override : Warning<
  "%select{|overriding }4method %select{introduced after|"
  "deprecated before|obsoleted before}0 "
  "%select{the protocol method it implements|overridden method}4 "
  "on %1 (%2 vs. %3)">, InGroup<Availability>;
def warn_mismatched_availability_override_unavail : Warning<
  "%select{|overriding }1method cannot be unavailable on %0 when "
  "%select{the protocol method it implements|its overridden method}1 is "
  "available">,
  InGroup<Availability>;
def note_overridden_method : Note<
  "overridden method is here">;
def note_protocol_method : Note<
  "protocol method is here">;

def warn_unguarded_availability :
  Warning<"%0 is only available on %1 %2 or newer">,
  InGroup<UnguardedAvailability>, DefaultIgnore;
def warn_unguarded_availability_new :
  Warning<warn_unguarded_availability.Text>,
  InGroup<UnguardedAvailabilityNew>;
def warn_partial_availability : Warning<"%0 is only available conditionally">,
    InGroup<UnguardedAvailability>, DefaultIgnore;
def warn_partial_availability_new : Warning<warn_partial_availability.Text>,
  InGroup<UnguardedAvailabilityNew>;
def note_partial_availability_silence : Note<
  "annotate %select{%1|anonymous %1}0 with an availability attribute to silence">;
def note_unguarded_available_silence : Note<
  "enclose %0 in %select{an @available|a __builtin_available}1 check to silence"
  " this warning">;
def warn_partial_message : Warning<"%0 is partial: %1">,
    InGroup<UnguardedAvailability>, DefaultIgnore;
def warn_partial_message_new : Warning<warn_partial_message.Text>,
  InGroup<UnguardedAvailabilityNew>;
def warn_partial_fwdclass_message : Warning<
    "%0 may be partial because the receiver type is unknown">,
    InGroup<UnguardedAvailability>, DefaultIgnore;
def warn_partial_fwdclass_message_new :
  Warning<warn_partial_fwdclass_message.Text>,
  InGroup<UnguardedAvailabilityNew>;
def warn_at_available_unchecked_use : Warning<
  "%select{@available|__builtin_available}0 does not guard availability here; "
  "use if (%select{@available|__builtin_available}0) instead">,
  InGroup<DiagGroup<"unsupported-availability-guard">>;

// Thread Safety Attributes
def warn_invalid_capability_name : Warning<
  "invalid capability name '%0'; capability name must be 'mutex' or 'role'">,
  InGroup<ThreadSafetyAttributes>, DefaultIgnore;
def warn_thread_attribute_ignored : Warning<
  "ignoring %0 attribute because its argument is invalid">,
  InGroup<ThreadSafetyAttributes>, DefaultIgnore;
def warn_thread_attribute_argument_not_lockable : Warning<
  "%0 attribute requires arguments whose type is annotated "
  "with 'capability' attribute; type here is %1">,
  InGroup<ThreadSafetyAttributes>, DefaultIgnore;
def warn_thread_attribute_decl_not_lockable : Warning<
  "%0 attribute can only be applied in a context annotated "
  "with 'capability(\"mutex\")' attribute">,
  InGroup<ThreadSafetyAttributes>, DefaultIgnore;
def warn_thread_attribute_decl_not_pointer : Warning<
  "%0 only applies to pointer types; type here is %1">,
  InGroup<ThreadSafetyAttributes>, DefaultIgnore;
def err_attribute_argument_out_of_range : Error<
  "%0 attribute parameter %1 is out of bounds: "
  "%plural{0:no parameters to index into|"
  "1:can only be 1, since there is one parameter|"
  ":must be between 1 and %2}2">;

// Thread Safety Analysis   
def warn_unlock_but_no_lock : Warning<"releasing %0 '%1' that was not held">,
  InGroup<ThreadSafetyAnalysis>, DefaultIgnore;
def warn_unlock_kind_mismatch : Warning<
  "releasing %0 '%1' using %select{shared|exclusive}2 access, expected "
  "%select{shared|exclusive}3 access">,
  InGroup<ThreadSafetyAnalysis>, DefaultIgnore;
def warn_double_lock : Warning<"acquiring %0 '%1' that is already held">,
  InGroup<ThreadSafetyAnalysis>, DefaultIgnore;
def warn_no_unlock : Warning<
  "%0 '%1' is still held at the end of function">,
  InGroup<ThreadSafetyAnalysis>, DefaultIgnore;
def warn_expecting_locked : Warning<
  "expecting %0 '%1' to be held at the end of function">,
  InGroup<ThreadSafetyAnalysis>, DefaultIgnore;  
// FIXME: improve the error message about locks not in scope
def warn_lock_some_predecessors : Warning<
  "%0 '%1' is not held on every path through here">,
  InGroup<ThreadSafetyAnalysis>, DefaultIgnore;
def warn_expecting_lock_held_on_loop : Warning<
  "expecting %0 '%1' to be held at start of each loop">,
  InGroup<ThreadSafetyAnalysis>, DefaultIgnore;
def note_locked_here : Note<"%0 acquired here">;
def warn_lock_exclusive_and_shared : Warning<
  "%0 '%1' is acquired exclusively and shared in the same scope">,
  InGroup<ThreadSafetyAnalysis>, DefaultIgnore;
def note_lock_exclusive_and_shared : Note<
  "the other acquisition of %0 '%1' is here">;
def warn_variable_requires_any_lock : Warning<
  "%select{reading|writing}1 variable '%0' requires holding "
  "%select{any mutex|any mutex exclusively}1">,
  InGroup<ThreadSafetyAnalysis>, DefaultIgnore;
def warn_var_deref_requires_any_lock : Warning<
  "%select{reading|writing}1 the value pointed to by '%0' requires holding "
  "%select{any mutex|any mutex exclusively}1">,
  InGroup<ThreadSafetyAnalysis>, DefaultIgnore;
def warn_fun_excludes_mutex : Warning<
  "cannot call function '%1' while %0 '%2' is held">,
  InGroup<ThreadSafetyAnalysis>, DefaultIgnore;
def warn_cannot_resolve_lock : Warning<
  "cannot resolve lock expression">,
  InGroup<ThreadSafetyAnalysis>, DefaultIgnore;
def warn_acquired_before : Warning<
  "%0 '%1' must be acquired before '%2'">,
  InGroup<ThreadSafetyAnalysis>, DefaultIgnore;
def warn_acquired_before_after_cycle : Warning<
  "Cycle in acquired_before/after dependencies, starting with '%0'">,
  InGroup<ThreadSafetyAnalysis>, DefaultIgnore;


// Thread safety warnings negative capabilities
def warn_acquire_requires_negative_cap : Warning<
  "acquiring %0 '%1' requires negative capability '%2'">,
  InGroup<ThreadSafetyNegative>, DefaultIgnore;

// Thread safety warnings on pass by reference
def warn_guarded_pass_by_reference : Warning<
  "passing variable '%1' by reference requires holding %0 "
  "%select{'%2'|'%2' exclusively}3">,
  InGroup<ThreadSafetyReference>, DefaultIgnore;
def warn_pt_guarded_pass_by_reference : Warning<
  "passing the value that '%1' points to by reference requires holding %0 "
  "%select{'%2'|'%2' exclusively}3">,
  InGroup<ThreadSafetyReference>, DefaultIgnore;

// Imprecise thread safety warnings
def warn_variable_requires_lock : Warning<
  "%select{reading|writing}3 variable '%1' requires holding %0 "
  "%select{'%2'|'%2' exclusively}3">,
  InGroup<ThreadSafetyAnalysis>, DefaultIgnore;
def warn_var_deref_requires_lock : Warning<
  "%select{reading|writing}3 the value pointed to by '%1' requires "
  "holding %0 %select{'%2'|'%2' exclusively}3">,
  InGroup<ThreadSafetyAnalysis>, DefaultIgnore;
def warn_fun_requires_lock : Warning<
  "calling function '%1' requires holding %0 %select{'%2'|'%2' exclusively}3">,
  InGroup<ThreadSafetyAnalysis>, DefaultIgnore;

// Precise thread safety warnings
def warn_variable_requires_lock_precise :
  Warning<warn_variable_requires_lock.Text>,
  InGroup<ThreadSafetyPrecise>, DefaultIgnore;
def warn_var_deref_requires_lock_precise :
  Warning<warn_var_deref_requires_lock.Text>,
  InGroup<ThreadSafetyPrecise>, DefaultIgnore;
def warn_fun_requires_lock_precise :
  Warning<warn_fun_requires_lock.Text>,
  InGroup<ThreadSafetyPrecise>, DefaultIgnore;
def note_found_mutex_near_match : Note<"found near match '%0'">;

// Verbose thread safety warnings
def warn_thread_safety_verbose : Warning<"Thread safety verbose warning.">, 
  InGroup<ThreadSafetyVerbose>, DefaultIgnore;
def note_thread_warning_in_fun : Note<"Thread warning in function '%0'">;
def note_guarded_by_declared_here : Note<"Guarded_by declared here.">;

// Dummy warning that will trigger "beta" warnings from the analysis if enabled. 
def warn_thread_safety_beta : Warning<"Thread safety beta warning.">, 
  InGroup<ThreadSafetyBeta>, DefaultIgnore;

// Consumed warnings
def warn_use_in_invalid_state : Warning<
  "invalid invocation of method '%0' on object '%1' while it is in the '%2' "
  "state">, InGroup<Consumed>, DefaultIgnore;
def warn_use_of_temp_in_invalid_state : Warning<
  "invalid invocation of method '%0' on a temporary object while it is in the "
  "'%1' state">, InGroup<Consumed>, DefaultIgnore;
def warn_attr_on_unconsumable_class : Warning<
  "consumed analysis attribute is attached to member of class '%0' which isn't "
  "marked as consumable">, InGroup<Consumed>, DefaultIgnore;
def warn_return_typestate_for_unconsumable_type : Warning<
  "return state set for an unconsumable type '%0'">, InGroup<Consumed>,
  DefaultIgnore;
def warn_return_typestate_mismatch : Warning<
  "return value not in expected state; expected '%0', observed '%1'">,
  InGroup<Consumed>, DefaultIgnore;
def warn_loop_state_mismatch : Warning<
  "state of variable '%0' must match at the entry and exit of loop">,
  InGroup<Consumed>, DefaultIgnore;
def warn_param_return_typestate_mismatch : Warning<
  "parameter '%0' not in expected state when the function returns: expected "
  "'%1', observed '%2'">, InGroup<Consumed>, DefaultIgnore;
def warn_param_typestate_mismatch : Warning<
  "argument not in expected state; expected '%0', observed '%1'">,
  InGroup<Consumed>, DefaultIgnore;

// no_sanitize attribute
def warn_unknown_sanitizer_ignored : Warning<
  "unknown sanitizer '%0' ignored">, InGroup<UnknownSanitizers>;

def warn_impcast_vector_scalar : Warning<
  "implicit conversion turns vector to scalar: %0 to %1">,
  InGroup<Conversion>, DefaultIgnore;
def warn_impcast_complex_scalar : Warning<
  "implicit conversion discards imaginary component: %0 to %1">,
  InGroup<Conversion>, DefaultIgnore;
def warn_impcast_float_precision : Warning<
  "implicit conversion loses floating-point precision: %0 to %1">,
  InGroup<Conversion>, DefaultIgnore;
def warn_impcast_double_promotion : Warning<
  "implicit conversion increases floating-point precision: %0 to %1">,
  InGroup<DoublePromotion>, DefaultIgnore;
def warn_impcast_integer_sign : Warning<
  "implicit conversion changes signedness: %0 to %1">,
  InGroup<SignConversion>, DefaultIgnore;
def warn_impcast_integer_sign_conditional : Warning<
  "operand of ? changes signedness: %0 to %1">,
  InGroup<SignConversion>, DefaultIgnore;
def warn_impcast_integer_precision : Warning<
  "implicit conversion loses integer precision: %0 to %1">,
  InGroup<Conversion>, DefaultIgnore;
def warn_impcast_integer_64_32 : Warning<
  "implicit conversion loses integer precision: %0 to %1">,
  InGroup<Shorten64To32>, DefaultIgnore;
def warn_impcast_integer_precision_constant : Warning<
  "implicit conversion from %2 to %3 changes value from %0 to %1">,
  InGroup<ConstantConversion>;
def warn_impcast_bitfield_precision_constant : Warning<
  "implicit truncation from %2 to bit-field changes value from %0 to %1">,
  InGroup<BitFieldConstantConversion>;

def warn_impcast_literal_float_to_integer : Warning<
  "implicit conversion from %0 to %1 changes value from %2 to %3">,
  InGroup<LiteralConversion>;
def warn_impcast_float_integer : Warning<
  "implicit conversion turns floating-point number into integer: %0 to %1">,
  InGroup<FloatConversion>, DefaultIgnore;

def warn_impcast_float_to_integer : Warning<
  "implicit conversion of out of range value from %0 to %1 changes value "
  "from %2 to %3">,
  InGroup<FloatOverflowConversion>, DefaultIgnore;
def warn_impcast_float_to_integer_zero : Warning<
  "implicit conversion from %0 to %1 changes non-zero value from %2 to %3">,
  InGroup<FloatZeroConversion>, DefaultIgnore;

def warn_impcast_string_literal_to_bool : Warning<
  "implicit conversion turns string literal into bool: %0 to %1">,
  InGroup<StringConversion>, DefaultIgnore;
def warn_impcast_different_enum_types : Warning<
  "implicit conversion from enumeration type %0 to different enumeration type "
  "%1">, InGroup<EnumConversion>;
def warn_impcast_bool_to_null_pointer : Warning<
    "initialization of pointer of type %0 to null from a constant boolean "
    "expression">, InGroup<BoolConversion>;
def warn_non_literal_null_pointer : Warning<
    "expression which evaluates to zero treated as a null pointer constant of "
    "type %0">, InGroup<NonLiteralNullConversion>;
def warn_impcast_null_pointer_to_integer : Warning<
    "implicit conversion of %select{NULL|nullptr}0 constant to %1">,
    InGroup<NullConversion>;
def warn_impcast_floating_point_to_bool : Warning<
    "implicit conversion turns floating-point number into bool: %0 to %1">,
    InGroup<ImplicitConversionFloatingPointToBool>;
def ext_ms_impcast_fn_obj : ExtWarn<
  "implicit conversion between pointer-to-function and pointer-to-object is a "
  "Microsoft extension">, InGroup<MicrosoftCast>;

def warn_impcast_pointer_to_bool : Warning<
    "address of%select{| function| array}0 '%1' will always evaluate to "
    "'true'">,
    InGroup<PointerBoolConversion>;
def warn_cast_nonnull_to_bool : Warning<
    "nonnull %select{function call|parameter}0 '%1' will evaluate to "
    "'true' on first encounter">,
    InGroup<PointerBoolConversion>;
def warn_this_bool_conversion : Warning<
  "'this' pointer cannot be null in well-defined C++ code; pointer may be "
  "assumed to always convert to true">, InGroup<UndefinedBoolConversion>;
def warn_address_of_reference_bool_conversion : Warning<
  "reference cannot be bound to dereferenced null pointer in well-defined C++ "
  "code; pointer may be assumed to always convert to true">,
  InGroup<UndefinedBoolConversion>;

def warn_null_pointer_compare : Warning<
    "comparison of %select{address of|function|array}0 '%1' %select{not |}2"
    "equal to a null pointer is always %select{true|false}2">,
    InGroup<TautologicalPointerCompare>;
def warn_nonnull_expr_compare : Warning<
    "comparison of nonnull %select{function call|parameter}0 '%1' "
    "%select{not |}2equal to a null pointer is '%select{true|false}2' on first "
    "encounter">,
    InGroup<TautologicalPointerCompare>;
def warn_this_null_compare : Warning<
  "'this' pointer cannot be null in well-defined C++ code; comparison may be "
  "assumed to always evaluate to %select{true|false}0">,
  InGroup<TautologicalUndefinedCompare>;
def warn_address_of_reference_null_compare : Warning<
  "reference cannot be bound to dereferenced null pointer in well-defined C++ "
  "code; comparison may be assumed to always evaluate to "
  "%select{true|false}0">,
  InGroup<TautologicalUndefinedCompare>;
def note_reference_is_return_value : Note<"%0 returns a reference">;

def note_function_warning_silence : Note<
    "prefix with the address-of operator to silence this warning">;
def note_function_to_function_call : Note<
    "suffix with parentheses to turn this into a function call">;
def warn_impcast_objective_c_literal_to_bool : Warning<
    "implicit boolean conversion of Objective-C object literal always "
    "evaluates to true">,
    InGroup<ObjCLiteralConversion>;

def warn_cast_align : Warning<
  "cast from %0 to %1 increases required alignment from %2 to %3">,
  InGroup<CastAlign>, DefaultIgnore;
def warn_old_style_cast : Warning<
  "use of old-style cast">, InGroup<OldStyleCast>, DefaultIgnore;

// Separate between casts to void* and non-void* pointers.
// Some APIs use (abuse) void* for something like a user context,
// and often that value is an integer even if it isn't a pointer itself.
// Having a separate warning flag allows users to control the warning
// for their workflow.
def warn_int_to_pointer_cast : Warning<
  "cast to %1 from smaller integer type %0">,
  InGroup<IntToPointerCast>;
def warn_int_to_void_pointer_cast : Warning<
  "cast to %1 from smaller integer type %0">,
  InGroup<IntToVoidPointerCast>;

def warn_no_underlying_type_specified_for_enum_bitfield : Warning<
  "enums in the Microsoft ABI are signed integers by default; consider giving "
  "the enum %0 an unsigned underlying type to make this code portable">,
  InGroup<SignedEnumBitfield>, DefaultIgnore;
def warn_attribute_packed_for_bitfield : Warning<
  "'packed' attribute was ignored on bit-fields with single-byte alignment "
  "in older versions of GCC and Clang">,
  InGroup<DiagGroup<"attribute-packed-for-bitfield">>;
def warn_transparent_union_attribute_field_size_align : Warning<
  "%select{alignment|size}0 of field %1 (%2 bits) does not match the "
  "%select{alignment|size}0 of the first field in transparent union; "
  "transparent_union attribute ignored">,
  InGroup<IgnoredAttributes>;
def note_transparent_union_first_field_size_align : Note<
  "%select{alignment|size}0 of first field is %1 bits">;
def warn_transparent_union_attribute_not_definition : Warning<
  "transparent_union attribute can only be applied to a union definition; "
  "attribute ignored">,
  InGroup<IgnoredAttributes>;
def warn_transparent_union_attribute_floating : Warning<
  "first field of a transparent union cannot have %select{floating point|"
  "vector}0 type %1; transparent_union attribute ignored">,
  InGroup<IgnoredAttributes>;
def warn_transparent_union_attribute_zero_fields : Warning<
  "transparent union definition must contain at least one field; "
  "transparent_union attribute ignored">,
  InGroup<IgnoredAttributes>;
def warn_attribute_type_not_supported : Warning<
  "%0 attribute argument not supported: %1">,
  InGroup<IgnoredAttributes>;
def warn_attribute_unknown_visibility : Warning<"unknown visibility %0">,
  InGroup<IgnoredAttributes>;
def warn_attribute_protected_visibility :
  Warning<"target does not support 'protected' visibility; using 'default'">,
  InGroup<DiagGroup<"unsupported-visibility">>;
def err_mismatched_visibility: Error<"visibility does not match previous declaration">;
def note_previous_attribute : Note<"previous attribute is here">;
def note_conflicting_attribute : Note<"conflicting attribute is here">;
def note_attribute : Note<"attribute is here">;
def err_mismatched_ms_inheritance : Error<
  "inheritance model does not match %select{definition|previous declaration}0">;
def warn_ignored_ms_inheritance : Warning<
  "inheritance model ignored on %select{primary template|partial specialization}0">,
  InGroup<IgnoredAttributes>;
def note_previous_ms_inheritance : Note<
  "previous inheritance model specified here">;
def err_machine_mode : Error<"%select{unknown|unsupported}0 machine mode %1">;
def err_mode_not_primitive : Error<
  "mode attribute only supported for integer and floating-point types">;
def err_mode_wrong_type : Error<
  "type of machine mode does not match type of base type">;
def warn_vector_mode_deprecated : Warning<
  "specifying vector types with the 'mode' attribute is deprecated; "
  "use the 'vector_size' attribute instead">,
  InGroup<DeprecatedAttributes>;
def err_complex_mode_vector_type : Error<
  "type of machine mode does not support base vector types">;
def err_enum_mode_vector_type : Error<
  "mode %0 is not supported for enumeration types">;
def warn_attribute_nonnull_no_pointers : Warning<
  "'nonnull' attribute applied to function with no pointer arguments">,
  InGroup<IgnoredAttributes>;
def warn_attribute_nonnull_parm_no_args : Warning<
  "'nonnull' attribute when used on parameters takes no arguments">,
  InGroup<IgnoredAttributes>;
def note_declared_nonnull : Note<
  "declared %select{'returns_nonnull'|'nonnull'}0 here">;
def warn_attribute_sentinel_named_arguments : Warning<
  "'sentinel' attribute requires named arguments">,
  InGroup<IgnoredAttributes>;
def warn_attribute_sentinel_not_variadic : Warning<
  "'sentinel' attribute only supported for variadic %select{functions|blocks}0">,
  InGroup<IgnoredAttributes>;
def err_attribute_sentinel_less_than_zero : Error<
  "'sentinel' parameter 1 less than zero">;
def err_attribute_sentinel_not_zero_or_one : Error<
  "'sentinel' parameter 2 not 0 or 1">;
def warn_cleanup_ext : Warning<
  "GCC does not allow the 'cleanup' attribute argument to be anything other "
  "than a simple identifier">, 
  InGroup<GccCompat>;
def err_attribute_cleanup_arg_not_function : Error<
  "'cleanup' argument %select{|%1 |%1 }0is not a %select{||single }0function">;
def err_attribute_cleanup_func_must_take_one_arg : Error<
  "'cleanup' function %0 must take 1 parameter">;
def err_attribute_cleanup_func_arg_incompatible_type : Error<
  "'cleanup' function %0 parameter has "
  "%diff{type $ which is incompatible with type $|incompatible type}1,2">;
def err_attribute_regparm_wrong_platform : Error<
  "'regparm' is not valid on this platform">;
def err_attribute_regparm_invalid_number : Error<
  "'regparm' parameter must be between 0 and %0 inclusive">;
def err_attribute_not_supported_in_lang : Error<
  "%0 attribute is not supported in %select{C|C++|Objective-C}1">;
def err_attribute_not_supported_on_arch
    : Error<"%0 attribute is not supported on '%1'">;

// Clang-Specific Attributes
def warn_attribute_iboutlet : Warning<
  "%0 attribute can only be applied to instance variables or properties">,
  InGroup<IgnoredAttributes>;
def err_iboutletcollection_type : Error<
  "invalid type %0 as argument of iboutletcollection attribute">;
def err_iboutletcollection_builtintype : Error<
  "type argument of iboutletcollection attribute cannot be a builtin type">;
def warn_iboutlet_object_type : Warning<
  "%select{instance variable|property}2 with %0 attribute must "
  "be an object type (invalid %1)">, InGroup<ObjCInvalidIBOutletProperty>;
def warn_iboutletcollection_property_assign : Warning<
  "IBOutletCollection properties should be copy/strong and not assign">,
  InGroup<ObjCInvalidIBOutletProperty>;
  
def err_attribute_overloadable_mismatch : Error<
  "redeclaration of %0 must %select{not |}1have the 'overloadable' attribute">;
def note_attribute_overloadable_prev_overload : Note<
  "previous %select{unmarked |}0overload of function is here">;
def err_attribute_overloadable_no_prototype : Error<
  "'overloadable' function %0 must have a prototype">;
def err_attribute_overloadable_multiple_unmarked_overloads : Error<
  "at most one overload for a given name may lack the 'overloadable' "
  "attribute">;
def warn_ns_attribute_wrong_return_type : Warning<
  "%0 attribute only applies to %select{functions|methods|properties}1 that "
  "return %select{an Objective-C object|a pointer|a non-retainable pointer}2">,
  InGroup<IgnoredAttributes>;
def err_ns_attribute_wrong_parameter_type : Error<
  "%0 attribute only applies to "
  "%select{Objective-C object|pointer|pointer-to-CF-pointer}1 parameters">;
def warn_ns_attribute_wrong_parameter_type : Warning<
  "%0 attribute only applies to "
  "%select{Objective-C object|pointer|pointer-to-CF-pointer}1 parameters">,
  InGroup<IgnoredAttributes>;
def warn_objc_requires_super_protocol : Warning<
  "%0 attribute cannot be applied to %select{methods in protocols|dealloc}1">,
  InGroup<DiagGroup<"requires-super-attribute">>;
def note_protocol_decl : Note<
  "protocol is declared here">;
def note_protocol_decl_undefined : Note<
  "protocol %0 has no definition">;

// objc_designated_initializer attribute diagnostics.
def warn_objc_designated_init_missing_super_call : Warning<
  "designated initializer missing a 'super' call to a designated initializer of the super class">,
  InGroup<ObjCDesignatedInit>;
def note_objc_designated_init_marked_here : Note<
  "method marked as designated initializer of the class here">;
def warn_objc_designated_init_non_super_designated_init_call : Warning<
  "designated initializer should only invoke a designated initializer on 'super'">,
  InGroup<ObjCDesignatedInit>;
def warn_objc_designated_init_non_designated_init_call : Warning<
  "designated initializer invoked a non-designated initializer">,
  InGroup<ObjCDesignatedInit>;
def warn_objc_secondary_init_super_init_call : Warning<
  "convenience initializer should not invoke an initializer on 'super'">,
  InGroup<ObjCDesignatedInit>;
def warn_objc_secondary_init_missing_init_call : Warning<
  "convenience initializer missing a 'self' call to another initializer">,
  InGroup<ObjCDesignatedInit>;
def warn_objc_implementation_missing_designated_init_override : Warning<
  "method override for the designated initializer of the superclass %objcinstance0 not found">,
  InGroup<ObjCDesignatedInit>;

// objc_bridge attribute diagnostics.
def err_objc_attr_not_id : Error<
  "parameter of %0 attribute must be a single name of an Objective-C %select{class|protocol}1">;
def err_objc_attr_typedef_not_id : Error<
  "parameter of %0 attribute must be 'id' when used on a typedef">;
def err_objc_attr_typedef_not_void_pointer : Error<
  "'objc_bridge(id)' is only allowed on structs and typedefs of void pointers">;
def err_objc_cf_bridged_not_interface : Error<
  "CF object of type %0 is bridged to %1, which is not an Objective-C class">;
def err_objc_ns_bridged_invalid_cfobject : Error<
  "ObjectiveC object of type %0 is bridged to %1, which is not valid CF object">;
def warn_objc_invalid_bridge : Warning<
  "%0 bridges to %1, not %2">, InGroup<ObjCBridge>;
def warn_objc_invalid_bridge_to_cf : Warning<
  "%0 cannot bridge to %1">, InGroup<ObjCBridge>;

// objc_bridge_related attribute diagnostics.
def err_objc_bridged_related_invalid_class : Error<
  "could not find Objective-C class %0 to convert %1 to %2">;
def err_objc_bridged_related_invalid_class_name : Error<
  "%0 must be name of an Objective-C class to be able to convert %1 to %2">;
def err_objc_bridged_related_known_method : Error<
 "%0 must be explicitly converted to %1; use %select{%objcclass2|%objcinstance2}3 "
 "method for this conversion">;

def err_objc_attr_protocol_requires_definition : Error<
  "attribute %0 can only be applied to @protocol definitions, not forward declarations">;

// Function Parameter Semantic Analysis.
def err_param_with_void_type : Error<"argument may not have 'void' type">;
def err_void_only_param : Error<
  "'void' must be the first and only parameter if specified">;
def err_void_param_qualified : Error<
  "'void' as parameter must not have type qualifiers">;
def err_ident_list_in_fn_declaration : Error<
  "a parameter list without types is only allowed in a function definition">;
def ext_param_not_declared : Extension<
  "parameter %0 was not declared, defaulting to type 'int'">;
def err_param_default_argument : Error<
  "C does not support default arguments">;
def err_param_default_argument_redefinition : Error<
  "redefinition of default argument">;
def ext_param_default_argument_redefinition : ExtWarn<
  err_param_default_argument_redefinition.Text>,
  InGroup<MicrosoftDefaultArgRedefinition>;
def err_param_default_argument_missing : Error<
  "missing default argument on parameter">;
def err_param_default_argument_missing_name : Error<
  "missing default argument on parameter %0">;
def err_param_default_argument_references_param : Error<
  "default argument references parameter %0">;
def err_param_default_argument_references_local : Error<
  "default argument references local variable %0 of enclosing function">;
def err_param_default_argument_references_this : Error<
  "default argument references 'this'">;
def err_param_default_argument_nonfunc : Error<
  "default arguments can only be specified for parameters in a function "
  "declaration">;
def err_param_default_argument_template_redecl : Error<
  "default arguments cannot be added to a function template that has already "
  "been declared">;
def err_param_default_argument_member_template_redecl : Error<
  "default arguments cannot be added to an out-of-line definition of a member "
  "of a %select{class template|class template partial specialization|nested "
  "class in a template}0">;
def err_param_default_argument_on_parameter_pack : Error<
  "parameter pack cannot have a default argument">;
def err_uninitialized_member_for_assign : Error<
  "cannot define the implicit copy assignment operator for %0, because "
  "non-static %select{reference|const}1 member %2 cannot use copy "
  "assignment operator">;
def err_uninitialized_member_in_ctor : Error<
  "%select{constructor for %1|"
  "implicit default constructor for %1|"
  "cannot use constructor inherited from %1:}0 must explicitly "
  "initialize the %select{reference|const}2 member %3">;
def err_default_arg_makes_ctor_special : Error<
  "addition of default argument on redeclaration makes this constructor a "
  "%select{default|copy|move}0 constructor">;

def err_use_of_default_argument_to_function_declared_later : Error<
  "use of default argument to function %0 that is declared later in class %1">;
def note_default_argument_declared_here : Note<
  "default argument declared here">;
def err_recursive_default_argument : Error<"recursive evaluation of default argument">;

def ext_param_promoted_not_compatible_with_prototype : ExtWarn<
  "%diff{promoted type $ of K&R function parameter is not compatible with the "
  "parameter type $|promoted type of K&R function parameter is not compatible "
  "with parameter type}0,1 declared in a previous prototype">,
  InGroup<KNRPromotedParameter>;


// C++ Overloading Semantic Analysis.
def err_ovl_diff_return_type : Error<
  "functions that differ only in their return type cannot be overloaded">;
def err_ovl_static_nonstatic_member : Error<
  "static and non-static member functions with the same parameter types "
  "cannot be overloaded">;

def err_ovl_no_viable_function_in_call : Error<
  "no matching function for call to %0">;
def err_ovl_no_viable_member_function_in_call : Error<
  "no matching member function for call to %0">;
def err_ovl_ambiguous_call : Error<
  "call to %0 is ambiguous">;
def err_ovl_deleted_call : Error<
  "call to %select{unavailable|deleted}0 function %1%2">;
def err_ovl_ambiguous_member_call : Error<
  "call to member function %0 is ambiguous">;
def err_ovl_deleted_member_call : Error<
  "call to %select{unavailable|deleted}0 member function %1%2">;
def note_ovl_too_many_candidates : Note<
    "remaining %0 candidate%s0 omitted; "
    "pass -fshow-overloads=all to show them">;
def note_ovl_candidate : Note<"candidate "
    "%select{function|function|constructor|"
    "function |function |constructor |"
    "is the implicit default constructor|"
    "is the implicit copy constructor|"
    "is the implicit move constructor|"
    "is the implicit copy assignment operator|"
    "is the implicit move assignment operator|"
    "inherited constructor|"
    "inherited constructor }0%2"
    "%select{| has different class%diff{ (expected $ but has $)|}4,5"
    "| has different number of parameters (expected %4 but has %5)"
    "| has type mismatch at %ordinal4 parameter"
    "%diff{ (expected $ but has $)|}5,6"
    "| has different return type%diff{ ($ expected but has $)|}4,5"
    "| has different qualifiers (expected "
    "%select{none|const|restrict|const and restrict|volatile|const and volatile"
    "|volatile and restrict|const, volatile, and restrict}4 but found "
    "%select{none|const|restrict|const and restrict|volatile|const and volatile"
    "|volatile and restrict|const, volatile, and restrict}5)"
    "| has different exception specification}3">;

def note_ovl_candidate_inherited_constructor : Note<
    "constructor from base class %0 inherited here">;
def note_ovl_candidate_inherited_constructor_slice : Note<
    "candidate %select{constructor|template}0 ignored: "
    "inherited constructor cannot be used to %select{copy|move}1 object">;
def note_ovl_candidate_illegal_constructor : Note<
    "candidate %select{constructor|template}0 ignored: "
    "instantiation %select{takes|would take}0 its own class type by value">;
def note_ovl_candidate_bad_deduction : Note<
    "candidate template ignored: failed template argument deduction">;
def note_ovl_candidate_incomplete_deduction : Note<"candidate template ignored: "
    "couldn't infer template argument %0">;
def note_ovl_candidate_inconsistent_deduction : Note<
    "candidate template ignored: deduced conflicting %select{types|values|"
    "templates}0 for parameter %1%diff{ ($ vs. $)|}2,3">;
def note_ovl_candidate_inconsistent_deduction_types : Note<
    "candidate template ignored: deduced values %diff{"
    "of conflicting types for parameter %0 (%1 of type $ vs. %3 of type $)|"
    "%1 and %3 of conflicting types for parameter %0}2,4">;
def note_ovl_candidate_explicit_arg_mismatch_named : Note<
    "candidate template ignored: invalid explicitly-specified argument "
    "for template parameter %0">;
def note_ovl_candidate_explicit_arg_mismatch_unnamed : Note<
    "candidate template ignored: invalid explicitly-specified argument "
    "for %ordinal0 template parameter">;
def note_ovl_candidate_instantiation_depth : Note<
    "candidate template ignored: substitution exceeded maximum template "
    "instantiation depth">;
def note_ovl_candidate_underqualified : Note<
    "candidate template ignored: cannot deduce a type for %0 that would "
    "make %2 equal %1">;
def note_ovl_candidate_substitution_failure : Note<
    "candidate template ignored: substitution failure%0%1">;
def note_ovl_candidate_disabled_by_enable_if : Note<
    "candidate template ignored: disabled by %0%1">;
def note_ovl_candidate_disabled_by_requirement : Note<
    "candidate template ignored: requirement '%0' was not satisfied%1">;
def note_ovl_candidate_has_pass_object_size_params: Note<
    "candidate address cannot be taken because parameter %0 has "
    "pass_object_size attribute">;
def err_diagnose_if_succeeded : Error<"%0">;
def warn_diagnose_if_succeeded : Warning<"%0">, InGroup<UserDefinedWarnings>,
    ShowInSystemHeader;
def note_ovl_candidate_disabled_by_function_cond_attr : Note<
    "candidate disabled: %0">;
def note_ovl_candidate_disabled_by_extension : Note<
    "candidate disabled due to OpenCL extension">;
def err_addrof_function_disabled_by_enable_if_attr : Error<
    "cannot take address of function %0 because it has one or more "
    "non-tautological enable_if conditions">;
def note_addrof_ovl_candidate_disabled_by_enable_if_attr : Note<
    "candidate function made ineligible by enable_if">;
def note_ovl_candidate_deduced_mismatch : Note<
    "candidate template ignored: deduced type "
    "%diff{$ of %select{|element of }4%ordinal0 parameter does not match "
    "adjusted type $ of %select{|element of }4argument"
    "|of %select{|element of }4%ordinal0 parameter does not match "
    "adjusted type of %select{|element of }4argument}1,2%3">;
def note_ovl_candidate_non_deduced_mismatch : Note<
    "candidate template ignored: could not match %diff{$ against $|types}0,1">;
// This note is needed because the above note would sometimes print two
// different types with the same name.  Remove this note when the above note
// can handle that case properly.
def note_ovl_candidate_non_deduced_mismatch_qualified : Note<
    "candidate template ignored: could not match %q0 against %q1">;

// Note that we don't treat templates differently for this diagnostic.
def note_ovl_candidate_arity : Note<"candidate "
    "%select{function|function|constructor|function|function|constructor|"
    "constructor (the implicit default constructor)|"
    "constructor (the implicit copy constructor)|"
    "constructor (the implicit move constructor)|"
    "function (the implicit copy assignment operator)|"
    "function (the implicit move assignment operator)|"
    "inherited constructor|"
    "inherited constructor}0 %select{|template }1"
    "not viable: requires%select{ at least| at most|}2 %3 argument%s3, but %4 "
    "%plural{1:was|:were}4 provided">;

def note_ovl_candidate_arity_one : Note<"candidate "
    "%select{function|function|constructor|function|function|constructor|"
    "constructor (the implicit default constructor)|"
    "constructor (the implicit copy constructor)|"
    "constructor (the implicit move constructor)|"
    "function (the implicit copy assignment operator)|"
    "function (the implicit move assignment operator)|"
    "inherited constructor|"
    "inherited constructor}0 %select{|template }1not viable: "
    "%select{requires at least|allows at most single|requires single}2 "
    "argument %3, but %plural{0:no|:%4}4 arguments were provided">;

def note_ovl_candidate_deleted : Note<
    "candidate %select{function|function|constructor|"
    "function |function |constructor |"
    "constructor (the implicit default constructor)|"
    "constructor (the implicit copy constructor)|"
    "constructor (the implicit move constructor)|"
    "function (the implicit copy assignment operator)|"
    "function (the implicit move assignment operator)|"
    "inherited constructor|"
    "inherited constructor }0%1 has been "
    "%select{explicitly made unavailable|explicitly deleted|"
    "implicitly deleted}2">;

// Giving the index of the bad argument really clutters this message, and
// it's relatively unimportant because 1) it's generally obvious which
// argument(s) are of the given object type and 2) the fix is usually
// to complete the type, which doesn't involve changes to the call line
// anyway.  If people complain, we can change it.
def note_ovl_candidate_bad_conv_incomplete : Note<"candidate "
    "%select{function|function|constructor|"
    "function |function |constructor |"
    "constructor (the implicit default constructor)|"
    "constructor (the implicit copy constructor)|"
    "constructor (the implicit move constructor)|"
    "function (the implicit copy assignment operator)|"
    "function (the implicit move assignment operator)|"
    "inherited constructor|"
    "inherited constructor }0%1 "
    "not viable: cannot convert argument of incomplete type "
    "%diff{$ to $|to parameter type}2,3 for "
    "%select{%ordinal5 argument|object argument}4"
    "%select{|; dereference the argument with *|"
    "; take the address of the argument with &|"
    "; remove *|"
    "; remove &}6">;
def note_ovl_candidate_bad_list_argument : Note<"candidate "
    "%select{function|function|constructor|"
    "function |function |constructor |"
    "constructor (the implicit default constructor)|"
    "constructor (the implicit copy constructor)|"
    "constructor (the implicit move constructor)|"
    "function (the implicit copy assignment operator)|"
    "function (the implicit move assignment operator)|"
    "inherited constructor|"
    "inherited constructor }0%1 "
    "not viable: cannot convert initializer list argument to %3">;
def note_ovl_candidate_bad_overload : Note<"candidate "
    "%select{function|function|constructor|"
    "function |function |constructor |"
    "constructor (the implicit default constructor)|"
    "constructor (the implicit copy constructor)|"
    "constructor (the implicit move constructor)|"
    "function (the implicit copy assignment operator)|"
    "function (the implicit move assignment operator)|"
    "inherited constructor|"
    "inherited constructor }0%1"
    " not viable: no overload of %3 matching %2 for %ordinal4 argument">;
def note_ovl_candidate_bad_conv : Note<"candidate "
    "%select{function|function|constructor|"
    "function |function |constructor |"
    "constructor (the implicit default constructor)|"
    "constructor (the implicit copy constructor)|"
    "constructor (the implicit move constructor)|"
    "function (the implicit copy assignment operator)|"
    "function (the implicit move assignment operator)|"
    "inherited constructor|"
    "inherited constructor }0%1"
    " not viable: no known conversion "
    "%diff{from $ to $|from argument type to parameter type}2,3 for "
    "%select{%ordinal5 argument|object argument}4"
    "%select{|; dereference the argument with *|"
    "; take the address of the argument with &|"
    "; remove *|"
    "; remove &}6">;
def note_ovl_candidate_bad_arc_conv : Note<"candidate "
    "%select{function|function|constructor|"
    "function |function |constructor |"
    "constructor (the implicit default constructor)|"
    "constructor (the implicit copy constructor)|"
    "constructor (the implicit move constructor)|"
    "function (the implicit copy assignment operator)|"
    "function (the implicit move assignment operator)|"
    "inherited constructor|"
    "inherited constructor }0%1"
    " not viable: cannot implicitly convert argument "
    "%diff{of type $ to $|type to parameter type}2,3 for "
    "%select{%ordinal5 argument|object argument}4 under ARC">;
def note_ovl_candidate_bad_lvalue : Note<"candidate "
    "%select{function|function|constructor|"
    "function |function |constructor |"
    "constructor (the implicit default constructor)|"
    "constructor (the implicit copy constructor)|"
    "constructor (the implicit move constructor)|"
    "function (the implicit copy assignment operator)|"
    "function (the implicit move assignment operator)|"
    "inherited constructor|"
    "inherited constructor }0%1"
    " not viable: expects an l-value for "
    "%select{%ordinal3 argument|object argument}2">;
def note_ovl_candidate_bad_addrspace : Note<"candidate "
    "%select{function|function|constructor|"
    "function |function |constructor |"
    "constructor (the implicit default constructor)|"
    "constructor (the implicit copy constructor)|"
    "constructor (the implicit move constructor)|"
    "function (the implicit copy assignment operator)|"
    "function (the implicit move assignment operator)|"
    "inherited constructor|"
    "inherited constructor }0%1 not viable: "
    "%select{%ordinal6|'this'}5 argument (%2) is in "
    "address space %3, but parameter must be in address space %4">;
def note_ovl_candidate_bad_gc : Note<"candidate "
    "%select{function|function|constructor|"
    "function |function |constructor |"
    "constructor (the implicit default constructor)|"
    "constructor (the implicit copy constructor)|"
    "constructor (the implicit move constructor)|"
    "function (the implicit copy assignment operator)|"
    "function (the implicit move assignment operator)|"
    "inherited constructor|"
    "inherited constructor }0%1 not viable: "
    "%select{%ordinal6|'this'}5 argument (%2) has %select{no|__weak|__strong}3 "
    "ownership, but parameter has %select{no|__weak|__strong}4 ownership">;
def note_ovl_candidate_bad_ownership : Note<"candidate "
    "%select{function|function|constructor|"
    "function |function |constructor |"
    "constructor (the implicit default constructor)|"
    "constructor (the implicit copy constructor)|"
    "constructor (the implicit move constructor)|"
    "function (the implicit copy assignment operator)|"
    "function (the implicit move assignment operator)|"
    "inherited constructor|"
    "inherited constructor }0%1 not viable: "
    "%select{%ordinal6|'this'}5 argument (%2) has "
    "%select{no|__unsafe_unretained|__strong|__weak|__autoreleasing}3 ownership,"
    " but parameter has %select{no|__unsafe_unretained|__strong|__weak|"
    "__autoreleasing}4 ownership">;
def note_ovl_candidate_bad_cvr_this : Note<"candidate "
    "%select{|function|||function|||||"
    "function (the implicit copy assignment operator)|"
    "function (the implicit move assignment operator)||}0 not viable: "
    "'this' argument has type %2, but method is not marked "
    "%select{const|restrict|const or restrict|volatile|const or volatile|"
    "volatile or restrict|const, volatile, or restrict}3">;
def note_ovl_candidate_bad_cvr : Note<"candidate "
    "%select{function|function|constructor|"
    "function |function |constructor |"
    "constructor (the implicit default constructor)|"
    "constructor (the implicit copy constructor)|"
    "constructor (the implicit move constructor)|"
    "function (the implicit copy assignment operator)|"
    "function (the implicit move assignment operator)|"
    "inherited constructor|"
    "inherited constructor }0%1 not viable: "
    "%ordinal4 argument (%2) would lose "
    "%select{const|restrict|const and restrict|volatile|const and volatile|"
    "volatile and restrict|const, volatile, and restrict}3 qualifier"
    "%select{||s||s|s|s}3">;
def note_ovl_candidate_bad_unaligned : Note<"candidate "
    "%select{function|function|constructor|"
    "function |function |constructor |"
    "constructor (the implicit default constructor)|"
    "constructor (the implicit copy constructor)|"
    "constructor (the implicit move constructor)|"
    "function (the implicit copy assignment operator)|"
    "function (the implicit move assignment operator)|"
    "inherited constructor|"
    "inherited constructor }0%1 not viable: "
    "%ordinal4 argument (%2) would lose __unaligned qualifier">;
def note_ovl_candidate_bad_base_to_derived_conv : Note<"candidate "
    "%select{function|function|constructor|"
    "function |function |constructor |"
    "constructor (the implicit default constructor)|"
    "constructor (the implicit copy constructor)|"
    "constructor (the implicit move constructor)|"
    "function (the implicit copy assignment operator)|"
    "function (the implicit move assignment operator)|"
    "inherited constructor|"
    "inherited constructor }0%1 not viable: "
    "cannot %select{convert from|convert from|bind}2 "
    "%select{base class pointer|superclass|base class object of type}2 %3 to "
    "%select{derived class pointer|subclass|derived class reference}2 %4 for "
    "%ordinal5 argument">;
def note_ovl_candidate_bad_target : Note<
    "candidate %select{function|function|constructor|"
    "function|function|constructor|"
    "constructor (the implicit default constructor)|"
    "constructor (the implicit copy constructor)|"
    "constructor (the implicit move constructor)|"
    "function (the implicit copy assignment operator)|"
    "function (the implicit move assignment operator)|"
    "inherited constructor|"
    "inherited constructor}0 not viable: "
    "call to "
    "%select{__device__|__global__|__host__|__host__ __device__|invalid}1 function from"
    " %select{__device__|__global__|__host__|__host__ __device__|invalid}2 function">;
def note_implicit_member_target_infer_collision : Note<
    "implicit %select{"
    "default constructor|"
    "copy constructor|"
    "move constructor|"
    "copy assignment operator|"
    "move assignment operator|"
    "destructor}0 inferred target collision: call to both "
    "%select{__device__|__global__|__host__|__host__ __device__}1 and "
    "%select{__device__|__global__|__host__|__host__ __device__}2 members">;

def note_ambiguous_type_conversion: Note<
    "because of ambiguity in conversion %diff{of $ to $|between types}0,1">;
def note_ovl_builtin_binary_candidate : Note<
    "built-in candidate %0">;
def note_ovl_builtin_unary_candidate : Note<
    "built-in candidate %0">;
def err_ovl_no_viable_function_in_init : Error<
  "no matching constructor for initialization of %0">;
def err_ovl_no_conversion_in_cast : Error<
  "cannot convert %1 to %2 without a conversion operator">;
def err_ovl_no_viable_conversion_in_cast : Error<
  "no matching conversion for %select{|static_cast|reinterpret_cast|"
  "dynamic_cast|C-style cast|functional-style cast}0 from %1 to %2">;
def err_ovl_ambiguous_conversion_in_cast : Error<
  "ambiguous conversion for %select{|static_cast|reinterpret_cast|"
  "dynamic_cast|C-style cast|functional-style cast}0 from %1 to %2">;
def err_ovl_deleted_conversion_in_cast : Error<
  "%select{|static_cast|reinterpret_cast|dynamic_cast|C-style cast|"
  "functional-style cast}0 from %1 to %2 uses deleted function">;
def err_ovl_ambiguous_init : Error<"call to constructor of %0 is ambiguous">;
def err_ref_init_ambiguous : Error<
  "reference initialization of type %0 with initializer of type %1 is ambiguous">;
def err_ovl_deleted_init : Error<
  "call to %select{unavailable|deleted}0 constructor of %1">;
def err_ovl_deleted_special_init : Error<
  "call to implicitly-deleted %select{default constructor|copy constructor|"
  "move constructor|copy assignment operator|move assignment operator|"
  "destructor|function}0 of %1">;
def err_ovl_ambiguous_oper_unary : Error<
  "use of overloaded operator '%0' is ambiguous (operand type %1)">;
def err_ovl_ambiguous_oper_binary : Error<
  "use of overloaded operator '%0' is ambiguous (with operand types %1 and %2)">;
def err_ovl_no_viable_oper : Error<"no viable overloaded '%0'">;
def note_assign_lhs_incomplete : Note<"type %0 is incomplete">;
def err_ovl_deleted_oper : Error<
  "overload resolution selected %select{unavailable|deleted}0 operator '%1'%2">;
def err_ovl_deleted_special_oper : Error<
  "object of type %0 cannot be %select{constructed|copied|moved|assigned|"
  "assigned|destroyed}1 because its %select{default constructor|"
  "copy constructor|move constructor|copy assignment operator|"
  "move assignment operator|destructor}1 is implicitly deleted">;
def err_ovl_no_viable_subscript :
    Error<"no viable overloaded operator[] for type %0">;
def err_ovl_no_oper :
    Error<"type %0 does not provide a %select{subscript|call}1 operator">;
def err_ovl_unresolvable : Error<
  "reference to overloaded function could not be resolved; "
  "did you mean to call it%select{| with no arguments}0?">;
def err_bound_member_function : Error<
  "reference to non-static member function must be called"
  "%select{|; did you mean to call it with no arguments?}0">;
def note_possible_target_of_call : Note<"possible target for call">;

def err_ovl_no_viable_object_call : Error<
  "no matching function for call to object of type %0">;
def err_ovl_ambiguous_object_call : Error<
  "call to object of type %0 is ambiguous">;
def err_ovl_deleted_object_call : Error<
  "call to %select{unavailable|deleted}0 function call operator in type %1%2">;
def note_ovl_surrogate_cand : Note<"conversion candidate of type %0">;
def err_member_call_without_object : Error<
  "call to non-static member function without an object argument">;

// C++ Address of Overloaded Function
def err_addr_ovl_no_viable : Error<
  "address of overloaded function %0 does not match required type %1">;
def err_addr_ovl_ambiguous : Error<
  "address of overloaded function %0 is ambiguous">;
def err_addr_ovl_not_func_ptrref : Error<
  "address of overloaded function %0 cannot be converted to type %1">;
def err_addr_ovl_no_qualifier : Error<
  "cannot form member pointer of type %0 without '&' and class name">;

// C++11 Literal Operators
def err_ovl_no_viable_literal_operator : Error<
  "no matching literal operator for call to %0"
  "%select{| with argument of type %2| with arguments of types %2 and %3}1"
  "%select{| or 'const char *'}4"
  "%select{|, and no matching literal operator template}5">;

// C++ Template Declarations
def err_template_param_shadow : Error<
  "declaration of %0 shadows template parameter">;
def note_template_param_here : Note<"template parameter is declared here">;
def warn_template_export_unsupported : Warning<
  "exported templates are unsupported">;
def err_template_outside_namespace_or_class_scope : Error<
  "templates can only be declared in namespace or class scope">;
def err_template_inside_local_class : Error<
  "templates cannot be declared inside of a local class">;
def err_template_linkage : Error<"templates must have C++ linkage">;
def err_template_typedef : Error<"a typedef cannot be a template">;
def err_template_unnamed_class : Error<
  "cannot declare a class template with no name">;
def err_template_param_list_different_arity : Error<
  "%select{too few|too many}0 template parameters in template "
  "%select{|template parameter }1redeclaration">;
def note_template_param_list_different_arity : Note<
  "%select{too few|too many}0 template parameters in template template "
  "argument">;
def note_template_prev_declaration : Note<
  "previous template %select{declaration|template parameter}0 is here">;
def err_template_param_different_kind : Error<
  "template parameter has a different kind in template "
  "%select{|template parameter }0redeclaration">;
def note_template_param_different_kind : Note<
  "template parameter has a different kind in template argument">;
  
def err_template_nontype_parm_different_type : Error<
  "template non-type parameter has a different type %0 in template "
  "%select{|template parameter }1redeclaration">;

def note_template_nontype_parm_different_type : Note<
  "template non-type parameter has a different type %0 in template argument">;
def note_template_nontype_parm_prev_declaration : Note<
  "previous non-type template parameter with type %0 is here">;
def err_template_nontype_parm_bad_type : Error<
  "a non-type template parameter cannot have type %0">;
def warn_cxx14_compat_template_nontype_parm_auto_type : Warning<
  "non-type template parameters declared with %0 are incompatible with C++ "
  "standards before C++17">,
  DefaultIgnore, InGroup<CXXPre1zCompat>;
def err_template_param_default_arg_redefinition : Error<
  "template parameter redefines default argument">;
def note_template_param_prev_default_arg : Note<
  "previous default template argument defined here">;
def err_template_param_default_arg_missing : Error<
  "template parameter missing a default argument">;
def ext_template_parameter_default_in_function_template : ExtWarn<
  "default template arguments for a function template are a C++11 extension">,
  InGroup<CXX11>;
def warn_cxx98_compat_template_parameter_default_in_function_template : Warning<
  "default template arguments for a function template are incompatible with C++98">,
  InGroup<CXX98Compat>, DefaultIgnore;
def err_template_parameter_default_template_member : Error<
  "cannot add a default template argument to the definition of a member of a "
  "class template">;
def err_template_parameter_default_friend_template : Error<
  "default template argument not permitted on a friend template">;
def err_template_template_parm_no_parms : Error<
  "template template parameter must have its own template parameters">;

def ext_variable_template : ExtWarn<"variable templates are a C++14 extension">,
  InGroup<CXX14>;
def warn_cxx11_compat_variable_template : Warning<
  "variable templates are incompatible with C++ standards before C++14">,
  InGroup<CXXPre14Compat>, DefaultIgnore;
def err_template_variable_noparams : Error<
  "extraneous 'template<>' in declaration of variable %0">;
def err_template_member : Error<"member %0 declared as a template">;
def err_template_member_noparams : Error<
  "extraneous 'template<>' in declaration of member %0">;
def err_template_tag_noparams : Error<
  "extraneous 'template<>' in declaration of %0 %1">;
def err_template_decl_ref : Error<
  "cannot refer to %select{class|variable}0 template %1 without a template argument list">;

// C++ Template Argument Lists
def err_template_missing_args : Error<
  "use of "
  "%select{class template|function template|variable template|alias template|"
  "template template parameter|template}0 %1 requires template arguments">;
def err_template_arg_list_different_arity : Error<
  "%select{too few|too many}0 template arguments for "
  "%select{class template|function template|variable template|alias template|"
  "template template parameter|template}1 %2">;
def note_template_decl_here : Note<"template is declared here">;
def err_template_arg_must_be_type : Error<
  "template argument for template type parameter must be a type">;
def err_template_arg_must_be_type_suggest : Error<
  "template argument for template type parameter must be a type; "
  "did you forget 'typename'?">;
def ext_ms_template_type_arg_missing_typename : ExtWarn<
  "template argument for template type parameter must be a type; "
  "omitted 'typename' is a Microsoft extension">,
  InGroup<MicrosoftTemplate>;
def err_template_arg_must_be_expr : Error<
  "template argument for non-type template parameter must be an expression">;
def err_template_arg_nontype_ambig : Error<
  "template argument for non-type template parameter is treated as function type %0">;
def err_template_arg_must_be_template : Error<
  "template argument for template template parameter must be a class template%select{| or type alias template}0">;
def ext_template_arg_local_type : ExtWarn<
  "template argument uses local type %0">, InGroup<LocalTypeTemplateArgs>;
def ext_template_arg_unnamed_type : ExtWarn<
  "template argument uses unnamed type">, InGroup<UnnamedTypeTemplateArgs>;
def warn_cxx98_compat_template_arg_local_type : Warning<
  "local type %0 as template argument is incompatible with C++98">,
  InGroup<CXX98CompatLocalTypeTemplateArgs>, DefaultIgnore;
def warn_cxx98_compat_template_arg_unnamed_type : Warning<
  "unnamed type as template argument is incompatible with C++98">,
  InGroup<CXX98CompatUnnamedTypeTemplateArgs>, DefaultIgnore;
def note_template_unnamed_type_here : Note<
  "unnamed type used in template argument was declared here">;
def err_template_arg_overload_type : Error<
  "template argument is the type of an unresolved overloaded function">;
def err_template_arg_not_valid_template : Error<
  "template argument does not refer to a class or alias template, or template "
  "template parameter">;
def note_template_arg_refers_here_func : Note<
  "template argument refers to function template %0, here">;
def err_template_arg_template_params_mismatch : Error<
  "template template argument has different template parameters than its "
  "corresponding template template parameter">;
def err_template_arg_not_integral_or_enumeral : Error<
  "non-type template argument of type %0 must have an integral or enumeration"
  " type">;
def err_template_arg_not_ice : Error<
  "non-type template argument of type %0 is not an integral constant "
  "expression">;
def err_template_arg_not_address_constant : Error<
  "non-type template argument of type %0 is not a constant expression">;
def warn_cxx98_compat_template_arg_null : Warning<
  "use of null pointer as non-type template argument is incompatible with "
  "C++98">, InGroup<CXX98Compat>, DefaultIgnore;
def err_template_arg_untyped_null_constant : Error<
  "null non-type template argument must be cast to template parameter type %0">;
def err_template_arg_wrongtype_null_constant : Error<
  "null non-type template argument of type %0 does not match template parameter "
  "of type %1">;
def err_non_type_template_parm_type_deduction_failure : Error<
  "non-type template parameter %0 with type %1 has incompatible initializer of type %2">;
def err_deduced_non_type_template_arg_type_mismatch : Error<
  "deduced non-type template argument does not have the same type as the "
  "corresponding template parameter%diff{ ($ vs $)|}0,1">;
def err_non_type_template_arg_subobject : Error<
  "non-type template argument refers to subobject '%0'">;
def err_non_type_template_arg_addr_label_diff : Error<
  "template argument / label address difference / what did you expect?">;
def err_template_arg_not_convertible : Error<
  "non-type template argument of type %0 cannot be converted to a value "
  "of type %1">;
def warn_template_arg_negative : Warning<
  "non-type template argument with value '%0' converted to '%1' for unsigned "
  "template parameter of type %2">, InGroup<Conversion>, DefaultIgnore;
def warn_template_arg_too_large : Warning<
  "non-type template argument value '%0' truncated to '%1' for "
  "template parameter of type %2">, InGroup<Conversion>, DefaultIgnore;
def err_template_arg_no_ref_bind : Error<
  "non-type template parameter of reference type "
  "%diff{$ cannot bind to template argument of type $"
  "|cannot bind to template of incompatible argument type}0,1">;
def err_template_arg_ref_bind_ignores_quals : Error<
  "reference binding of non-type template parameter "
  "%diff{of type $ to template argument of type $|to template argument}0,1 "
  "ignores qualifiers">;
def err_template_arg_not_decl_ref : Error<
  "non-type template argument does not refer to any declaration">;
def err_template_arg_not_address_of : Error<
  "non-type template argument for template parameter of pointer type %0 must "
  "have its address taken">;
def err_template_arg_address_of_non_pointer : Error<
  "address taken in non-type template argument for template parameter of "
  "reference type %0">;
def err_template_arg_reference_var : Error<
  "non-type template argument of reference type %0 is not an object">;
def err_template_arg_field : Error<
  "non-type template argument refers to non-static data member %0">;
def err_template_arg_method : Error<
  "non-type template argument refers to non-static member function %0">;
def err_template_arg_object_no_linkage : Error<
  "non-type template argument refers to %select{function|object}0 %1 that "
  "does not have linkage">;
def warn_cxx98_compat_template_arg_object_internal : Warning<
  "non-type template argument referring to %select{function|object}0 %1 with "
  "internal linkage is incompatible with C++98">,
  InGroup<CXX98Compat>, DefaultIgnore;
def ext_template_arg_object_internal : ExtWarn<
  "non-type template argument referring to %select{function|object}0 %1 with "
  "internal linkage is a C++11 extension">, InGroup<CXX11>;
def err_template_arg_thread_local : Error<
  "non-type template argument refers to thread-local object">;
def note_template_arg_internal_object : Note<
  "non-type template argument refers to %select{function|object}0 here">;
def note_template_arg_refers_here : Note<
  "non-type template argument refers here">;
def err_template_arg_not_object_or_func : Error<
  "non-type template argument does not refer to an object or function">;
def err_template_arg_not_pointer_to_member_form : Error<
  "non-type template argument is not a pointer to member constant">;
def err_template_arg_member_ptr_base_derived_not_supported : Error<
  "sorry, non-type template argument of pointer-to-member type %1 that refers "
  "to member %q0 of a different class is not supported yet">;
def ext_template_arg_extra_parens : ExtWarn<
  "address non-type template argument cannot be surrounded by parentheses">;
def warn_cxx98_compat_template_arg_extra_parens : Warning<
  "redundant parentheses surrounding address non-type template argument are "
  "incompatible with C++98">, InGroup<CXX98Compat>, DefaultIgnore;
def err_pointer_to_member_type : Error<
  "invalid use of pointer to member type after %select{.*|->*}0">;
def err_pointer_to_member_call_drops_quals : Error<
  "call to pointer to member function of type %0 drops '%1' qualifier%s2">;
def err_pointer_to_member_oper_value_classify: Error<
  "pointer-to-member function type %0 can only be called on an "
  "%select{rvalue|lvalue}1">;
def ext_ms_deref_template_argument: ExtWarn<
  "non-type template argument containing a dereference operation is a "
  "Microsoft extension">, InGroup<MicrosoftTemplate>;
def ext_ms_delayed_template_argument: ExtWarn<
  "using the undeclared type %0 as a default template argument is a "
  "Microsoft extension">, InGroup<MicrosoftTemplate>;
def err_template_arg_deduced_incomplete_pack : Error<
  "deduced incomplete pack %0 for template parameter %1">;

// C++ template specialization
def err_template_spec_unknown_kind : Error<
  "can only provide an explicit specialization for a class template, function "
  "template, variable template, or a member function, static data member, "
  "%select{or member class|member class, or member enumeration}0 of a "
  "class template">;
def note_specialized_entity : Note<
  "explicitly specialized declaration is here">;
def note_explicit_specialization_declared_here : Note<
  "explicit specialization declared here">;
def err_template_spec_decl_function_scope : Error<
  "explicit specialization of %0 in function scope">;
def err_template_spec_decl_class_scope : Error<
  "explicit specialization of %0 in class scope">;
def err_template_spec_decl_friend : Error<
  "cannot declare an explicit specialization in a friend">;
def err_template_spec_decl_out_of_scope_global : Error<
  "%select{class template|class template partial|variable template|"
  "variable template partial|function template|member function|"
  "static data member|member class|member enumeration}0 "
  "specialization of %1 must originally be declared in the global scope">;
def err_template_spec_decl_out_of_scope : Error<
  "%select{class template|class template partial|variable template|"
  "variable template partial|function template|member "
  "function|static data member|member class|member enumeration}0 "
  "specialization of %1 must originally be declared in namespace %2">;
def ext_template_spec_decl_out_of_scope : ExtWarn<
  "first declaration of %select{class template|class template partial|"
  "variable template|variable template partial|"
  "function template|member function|static data member|member class|"
  "member enumeration}0 specialization of %1 outside namespace %2 is a "
  "C++11 extension">, InGroup<CXX11>;
def warn_cxx98_compat_template_spec_decl_out_of_scope : Warning<
  "%select{class template|class template partial|variable template|"
  "variable template partial|function template|member "
  "function|static data member|member class|member enumeration}0 "
  "specialization of %1 outside namespace %2 is incompatible with C++98">,
  InGroup<CXX98Compat>, DefaultIgnore;
def err_template_spec_redecl_out_of_scope : Error<
  "%select{class template|class template partial|variable template|"
  "variable template partial|function template|member "
  "function|static data member|member class|member enumeration}0 "
  "specialization of %1 not in a namespace enclosing %2">;
def ext_ms_template_spec_redecl_out_of_scope: ExtWarn<
  "%select{class template|class template partial|variable template|"
  "variable template partial|function template|member "
  "function|static data member|member class|member enumeration}0 "
  "specialization of %1 outside namespace enclosing %2 "
  "is a Microsoft extension">, InGroup<MicrosoftTemplate>;
def err_template_spec_redecl_global_scope : Error<
  "%select{class template|class template partial|variable template|"
  "variable template partial|function template|member "
  "function|static data member|member class|member enumeration}0 "
  "specialization of %1 must occur at global scope">;
def err_spec_member_not_instantiated : Error<
  "specialization of member %q0 does not specialize an instantiated member">;
def note_specialized_decl : Note<"attempt to specialize declaration here">;
def err_specialization_after_instantiation : Error<
  "explicit specialization of %0 after instantiation">;
def note_instantiation_required_here : Note<
  "%select{implicit|explicit}0 instantiation first required here">;
def err_template_spec_friend : Error<
  "template specialization declaration cannot be a friend">;
def err_template_spec_default_arg : Error<
  "default argument not permitted on an explicit "
  "%select{instantiation|specialization}0 of function %1">;
def err_not_class_template_specialization : Error<
  "cannot specialize a %select{dependent template|template template "
  "parameter}0">;
def err_function_specialization_in_class : Error<
  "cannot specialize a function %0 within class scope">;
def ext_function_specialization_in_class : ExtWarn<
  "explicit specialization of %0 within class scope is a Microsoft extension">,
  InGroup<MicrosoftTemplate>;
def ext_explicit_specialization_storage_class : ExtWarn<
  "explicit specialization cannot have a storage class">;
def err_explicit_specialization_inconsistent_storage_class : Error<
  "explicit specialization has extraneous, inconsistent storage class "
  "'%select{none|extern|static|__private_extern__|auto|register}0'">;

// C++ class template specializations and out-of-line definitions
def err_template_spec_needs_header : Error<
  "template specialization requires 'template<>'">;
def err_template_spec_needs_template_parameters : Error<
  "template specialization or definition requires a template parameter list "
  "corresponding to the nested type %0">;
def err_template_param_list_matches_nontemplate : Error<
  "template parameter list matching the non-templated nested type %0 should "
  "be empty ('template<>')">;
def err_alias_template_extra_headers : Error<
  "extraneous template parameter list in alias template declaration">;
def err_template_spec_extra_headers : Error<
  "extraneous template parameter list in template specialization or "
  "out-of-line template definition">;
def warn_template_spec_extra_headers : Warning<
  "extraneous template parameter list in template specialization">;
def note_explicit_template_spec_does_not_need_header : Note<
  "'template<>' header not required for explicitly-specialized class %0 "
  "declared here">;
def err_template_qualified_declarator_no_match : Error<
  "nested name specifier '%0' for declaration does not refer into a class, "
  "class template or class template partial specialization">;
def err_specialize_member_of_template : Error<
  "cannot specialize %select{|(with 'template<>') }0a member of an "
  "unspecialized template">;

// C++ Class Template Partial Specialization
def err_default_arg_in_partial_spec : Error<
    "default template argument in a class template partial specialization">;
def err_dependent_non_type_arg_in_partial_spec : Error<
    "type of specialized non-type template argument depends on a template "
    "parameter of the partial specialization">;
def note_dependent_non_type_default_arg_in_partial_spec : Note<
    "template parameter is used in default argument declared here">;
def err_dependent_typed_non_type_arg_in_partial_spec : Error<
    "non-type template argument specializes a template parameter with "
    "dependent type %0">;
def err_partial_spec_args_match_primary_template : Error<
    "%select{class|variable}0 template partial specialization does not "
    "specialize any template argument; to %select{declare|define}1 the "
    "primary template, remove the template argument list">; 
def ext_partial_spec_not_more_specialized_than_primary : ExtWarn<
    "%select{class|variable}0 template partial specialization is not "
    "more specialized than the primary template">, DefaultError,
    InGroup<DiagGroup<"invalid-partial-specialization">>;
def note_partial_spec_not_more_specialized_than_primary : Note<"%0">;
def ext_partial_specs_not_deducible : ExtWarn<
    "%select{class|variable}0 template partial specialization contains "
    "%select{a template parameter|template parameters}1 that cannot be "
    "deduced; this partial specialization will never be used">,
    DefaultError, InGroup<DiagGroup<"unusable-partial-specialization">>;
def note_non_deducible_parameter : Note<
    "non-deducible template parameter %0">;
def err_partial_spec_ordering_ambiguous : Error<
    "ambiguous partial specializations of %0">;
def note_partial_spec_match : Note<"partial specialization matches %0">;
def err_partial_spec_redeclared : Error<
  "class template partial specialization %0 cannot be redeclared">;
def note_partial_specialization_declared_here : Note<
  "explicit specialization declared here">;
def note_prev_partial_spec_here : Note<
  "previous declaration of class template partial specialization %0 is here">;
def err_partial_spec_fully_specialized : Error<
  "partial specialization of %0 does not use any of its template parameters">;

// C++ Variable Template Partial Specialization
def err_var_partial_spec_redeclared : Error<
  "variable template partial specialization %0 cannot be redefined">;
def note_var_prev_partial_spec_here : Note<
  "previous declaration of variable template partial specialization is here">;
def err_var_spec_no_template : Error<
  "no variable template matches%select{| partial}0 specialization">;
def err_var_spec_no_template_but_method : Error<
  "no variable template matches specialization; "
  "did you mean to use %0 as function template instead?">;
  
// C++ Function template specializations
def err_function_template_spec_no_match : Error<
    "no function template matches function template specialization %0">;
def err_function_template_spec_ambiguous : Error<
    "function template specialization %0 ambiguously refers to more than one "
    "function template; explicitly specify%select{| additional}1 template "
    "arguments to identify a particular function template">;
def note_function_template_spec_matched : Note<
    "function template %q0 matches specialization %1">;
def err_function_template_partial_spec : Error<
    "function template partial specialization is not allowed">;

// C++ Template Instantiation
def err_template_recursion_depth_exceeded : Error<
  "recursive template instantiation exceeded maximum depth of %0">,
  DefaultFatal, NoSFINAE;
def note_template_recursion_depth : Note<
  "use -ftemplate-depth=N to increase recursive template instantiation depth">;

def err_template_instantiate_within_definition : Error<
  "%select{implicit|explicit}0 instantiation of template %1 within its"
  " own definition">;
def err_template_instantiate_undefined : Error<
  "%select{implicit|explicit}0 instantiation of undefined template %1">;
def err_implicit_instantiate_member_undefined : Error<
  "implicit instantiation of undefined member %0">;
def note_template_class_instantiation_was_here : Note<
  "class template %0 was instantiated here">;
def note_template_class_explicit_specialization_was_here : Note<
  "class template %0 was explicitly specialized here">;
def note_template_class_instantiation_here : Note<
  "in instantiation of template class %q0 requested here">;
def note_template_member_class_here : Note<
  "in instantiation of member class %q0 requested here">;
def note_template_member_function_here : Note<
  "in instantiation of member function %q0 requested here">;
def note_function_template_spec_here : Note<
  "in instantiation of function template specialization %q0 requested here">;
def note_template_static_data_member_def_here : Note<
  "in instantiation of static data member %q0 requested here">;
def note_template_variable_def_here : Note<
  "in instantiation of variable template specialization %q0 requested here">;
def note_template_enum_def_here : Note<
  "in instantiation of enumeration %q0 requested here">;
def note_template_nsdmi_here : Note<
  "in instantiation of default member initializer %q0 requested here">;
def note_template_type_alias_instantiation_here : Note<
  "in instantiation of template type alias %0 requested here">;
def note_template_exception_spec_instantiation_here : Note<
  "in instantiation of exception specification for %0 requested here">;
def warn_var_template_missing : Warning<"instantiation of variable %q0 "
  "required here, but no definition is available">,
  InGroup<UndefinedVarTemplate>;
def warn_func_template_missing : Warning<"instantiation of function %q0 "
  "required here, but no definition is available">,
  InGroup<UndefinedFuncTemplate>, DefaultIgnore;
def note_forward_template_decl : Note<
  "forward declaration of template entity is here">;
def note_inst_declaration_hint : Note<"add an explicit instantiation "
  "declaration to suppress this warning if %q0 is explicitly instantiated in "
  "another translation unit">;

def note_default_arg_instantiation_here : Note<
  "in instantiation of default argument for '%0' required here">;
def note_default_function_arg_instantiation_here : Note<
  "in instantiation of default function argument expression "
  "for '%0' required here">;
def note_explicit_template_arg_substitution_here : Note<
  "while substituting explicitly-specified template arguments into function "
  "template %0 %1">;
def note_function_template_deduction_instantiation_here : Note<
  "while substituting deduced template arguments into function template %0 "
  "%1">;
def note_deduced_template_arg_substitution_here : Note<
  "during template argument deduction for %select{class|variable}0 template "
  "%select{partial specialization |}1%2 %3">;
def note_prior_template_arg_substitution : Note<
  "while substituting prior template arguments into %select{non-type|template}0"
  " template parameter%1 %2">;
def note_template_default_arg_checking : Note<
  "while checking a default template argument used here">;
def note_instantiation_contexts_suppressed : Note<
  "(skipping %0 context%s0 in backtrace; use -ftemplate-backtrace-limit=0 to "
  "see all)">;

def err_field_instantiates_to_function : Error<
  "data member instantiated with function type %0">;
def err_variable_instantiates_to_function : Error<
  "%select{variable|static data member}0 instantiated with function type %1">;
def err_nested_name_spec_non_tag : Error<
  "type %0 cannot be used prior to '::' because it has no members">;

def err_using_pack_expansion_empty : Error<
  "%select{|member}0 using declaration %1 instantiates to an empty pack">;

// C++ Explicit Instantiation
def err_explicit_instantiation_duplicate : Error<
    "duplicate explicit instantiation of %0">;
def ext_explicit_instantiation_duplicate : ExtWarn<
    "duplicate explicit instantiation of %0 ignored as a Microsoft extension">,
    InGroup<MicrosoftTemplate>;
def note_previous_explicit_instantiation : Note<
    "previous explicit instantiation is here">;
def warn_explicit_instantiation_after_specialization : Warning<
  "explicit instantiation of %0 that occurs after an explicit "
  "specialization has no effect">,
  InGroup<DiagGroup<"instantiation-after-specialization">>;
def note_previous_template_specialization : Note<
    "previous template specialization is here">;
def err_explicit_instantiation_nontemplate_type : Error<
    "explicit instantiation of non-templated type %0">;
def note_nontemplate_decl_here : Note<
    "non-templated declaration is here">;
def err_explicit_instantiation_in_class : Error<
  "explicit instantiation of %0 in class scope">;
def err_explicit_instantiation_out_of_scope : Error<
  "explicit instantiation of %0 not in a namespace enclosing %1">;
def err_explicit_instantiation_must_be_global : Error<
  "explicit instantiation of %0 must occur at global scope">;
def warn_explicit_instantiation_out_of_scope_0x : Warning<
  "explicit instantiation of %0 not in a namespace enclosing %1">, 
  InGroup<CXX11Compat>, DefaultIgnore;
def warn_explicit_instantiation_must_be_global_0x : Warning<
  "explicit instantiation of %0 must occur at global scope">, 
  InGroup<CXX11Compat>, DefaultIgnore;
  
def err_explicit_instantiation_requires_name : Error<
  "explicit instantiation declaration requires a name">;
def err_explicit_instantiation_of_typedef : Error<
  "explicit instantiation of typedef %0">;
def err_explicit_instantiation_storage_class : Error<
  "explicit instantiation cannot have a storage class">;
def err_explicit_instantiation_not_known : Error<
  "explicit instantiation of %0 does not refer to a function template, "
  "variable template, member function, member class, or static data member">;
def note_explicit_instantiation_here : Note<
  "explicit instantiation refers here">;
def err_explicit_instantiation_data_member_not_instantiated : Error<
  "explicit instantiation refers to static data member %q0 that is not an "
  "instantiation">;
def err_explicit_instantiation_member_function_not_instantiated : Error<
  "explicit instantiation refers to member function %q0 that is not an "
  "instantiation">;
def err_explicit_instantiation_ambiguous : Error<
  "partial ordering for explicit instantiation of %0 is ambiguous">;
def note_explicit_instantiation_candidate : Note<
  "explicit instantiation candidate function %q0 template here %1">;
def err_explicit_instantiation_inline : Error<
  "explicit instantiation cannot be 'inline'">;
def warn_explicit_instantiation_inline_0x : Warning<
  "explicit instantiation cannot be 'inline'">, InGroup<CXX11Compat>,
  DefaultIgnore;
def err_explicit_instantiation_constexpr : Error<
  "explicit instantiation cannot be 'constexpr'">;
def ext_explicit_instantiation_without_qualified_id : Extension<
  "qualifier in explicit instantiation of %q0 requires a template-id "
  "(a typedef is not permitted)">;
def err_explicit_instantiation_without_template_id : Error<
  "explicit instantiation of %q0 must specify a template argument list">;
def err_explicit_instantiation_unqualified_wrong_namespace : Error<
  "explicit instantiation of %q0 must occur in namespace %1">;
def warn_explicit_instantiation_unqualified_wrong_namespace_0x : Warning<
  "explicit instantiation of %q0 must occur in namespace %1">,
  InGroup<CXX11Compat>, DefaultIgnore;
def err_explicit_instantiation_undefined_member : Error<
  "explicit instantiation of undefined %select{member class|member function|"
  "static data member}0 %1 of class template %2">;
def err_explicit_instantiation_undefined_func_template : Error<
  "explicit instantiation of undefined function template %0">;
def err_explicit_instantiation_undefined_var_template : Error<
  "explicit instantiation of undefined variable template %q0">;
def err_explicit_instantiation_declaration_after_definition : Error<
  "explicit instantiation declaration (with 'extern') follows explicit "
  "instantiation definition (without 'extern')">;
def note_explicit_instantiation_definition_here : Note<
  "explicit instantiation definition is here">;
def err_invalid_var_template_spec_type : Error<"type %2 "
  "of %select{explicit instantiation|explicit specialization|"
  "partial specialization|redeclaration}0 of %1 does not match"
  " expected type %3">;
def err_mismatched_exception_spec_explicit_instantiation : Error<
  "exception specification in explicit instantiation does not match "
  "instantiated one">;
def ext_mismatched_exception_spec_explicit_instantiation : ExtWarn<
  err_mismatched_exception_spec_explicit_instantiation.Text>,
  InGroup<MicrosoftExceptionSpec>;
  
// C++ typename-specifiers
def err_typename_nested_not_found : Error<"no type named %0 in %1">;
def err_typename_nested_not_found_enable_if : Error<
  "no type named 'type' in %0; 'enable_if' cannot be used to disable "
  "this declaration">;
def err_typename_nested_not_found_requirement : Error<
  "failed requirement '%0'; 'enable_if' cannot be used to disable this "
  "declaration">;
def err_typename_nested_not_type : Error<
    "typename specifier refers to non-type member %0 in %1">;
def note_typename_refers_here : Note<
    "referenced member %0 is declared here">;
def err_typename_missing : Error<
  "missing 'typename' prior to dependent type name '%0%1'">;
def err_typename_missing_template : Error<
  "missing 'typename' prior to dependent type template name '%0%1'">;
def ext_typename_missing : ExtWarn<
  "missing 'typename' prior to dependent type name '%0%1'">,
  InGroup<DiagGroup<"typename-missing">>;
def ext_typename_outside_of_template : ExtWarn<
  "'typename' occurs outside of a template">, InGroup<CXX11>;
def warn_cxx98_compat_typename_outside_of_template : Warning<
  "use of 'typename' outside of a template is incompatible with C++98">,
  InGroup<CXX98Compat>, DefaultIgnore;
def err_typename_refers_to_using_value_decl : Error<
  "typename specifier refers to a dependent using declaration for a value "
  "%0 in %1">;
def note_using_value_decl_missing_typename : Note<
  "add 'typename' to treat this using declaration as a type">;

def err_template_kw_refers_to_non_template : Error<
  "%0 following the 'template' keyword does not refer to a template">;
def err_template_kw_refers_to_class_template : Error<
  "'%0%1' instantiated to a class template, not a function template">;
def note_referenced_class_template : Note<
  "class template declared here">;
def err_template_kw_missing : Error<
  "missing 'template' keyword prior to dependent template name '%0%1'">;
def ext_template_outside_of_template : ExtWarn<
  "'template' keyword outside of a template">, InGroup<CXX11>;
def warn_cxx98_compat_template_outside_of_template : Warning<
  "use of 'template' keyword outside of a template is incompatible with C++98">,
  InGroup<CXX98Compat>, DefaultIgnore;

def err_non_type_template_in_nested_name_specifier : Error<
  "qualified name refers into a specialization of %select{function|variable}0 "
  "template %1">;
def err_template_id_not_a_type : Error<
  "template name refers to non-type template %0">;
def note_template_declared_here : Note<
  "%select{function template|class template|variable template"
  "|type alias template|template template parameter}0 "
  "%1 declared here">;
def err_alias_template_expansion_into_fixed_list : Error<
  "pack expansion used as argument for non-pack parameter of alias template">;
def note_parameter_type : Note<
  "parameter of type %0 is declared here">;

// C++11 Variadic Templates
def err_template_param_pack_default_arg : Error<
  "template parameter pack cannot have a default argument">;
def err_template_param_pack_must_be_last_template_parameter : Error<
  "template parameter pack must be the last template parameter">;

def err_template_parameter_pack_non_pack : Error<
  "%select{template type|non-type template|template template}0 parameter"
  "%select{| pack}1 conflicts with previous %select{template type|"
  "non-type template|template template}0 parameter%select{ pack|}1">;
def note_template_parameter_pack_non_pack : Note<
  "%select{template type|non-type template|template template}0 parameter"
  "%select{| pack}1 does not match %select{template type|non-type template"
  "|template template}0 parameter%select{ pack|}1 in template argument">;
def note_template_parameter_pack_here : Note<
  "previous %select{template type|non-type template|template template}0 "
  "parameter%select{| pack}1 declared here">;
  
def err_unexpanded_parameter_pack : Error<
  "%select{expression|base type|declaration type|data member type|bit-field "
  "size|static assertion|fixed underlying type|enumerator value|"
  "using declaration|friend declaration|qualifier|initializer|default argument|"
  "non-type template parameter type|exception type|partial specialization|"
  "__if_exists name|__if_not_exists name|lambda|block}0 contains"
  "%plural{0: an|:}1 unexpanded parameter pack"
  "%plural{0:|1: %2|2:s %2 and %3|:s %2, %3, ...}1">;

def err_pack_expansion_without_parameter_packs : Error<
  "pack expansion does not contain any unexpanded parameter packs">;
def err_pack_expansion_length_conflict : Error<
  "pack expansion contains parameter packs %0 and %1 that have different "
  "lengths (%2 vs. %3)">;
def err_pack_expansion_length_conflict_multilevel : Error<
  "pack expansion contains parameter pack %0 that has a different "
  "length (%1 vs. %2) from outer parameter packs">;
def err_pack_expansion_member_init : Error<
  "pack expansion for initialization of member %0">;

def err_function_parameter_pack_without_parameter_packs : Error<
  "type %0 of function parameter pack does not contain any unexpanded "
  "parameter packs">;
def err_ellipsis_in_declarator_not_parameter : Error<
  "only function and template parameters can be parameter packs">;

def err_sizeof_pack_no_pack_name : Error<
  "%0 does not refer to the name of a parameter pack">;

def err_fold_expression_packs_both_sides : Error<
  "binary fold expression has unexpanded parameter packs in both operands">;
def err_fold_expression_empty : Error<
  "unary fold expression has empty expansion for operator '%0' "
  "with no fallback value">;
def err_fold_expression_bad_operand : Error<
  "expression not permitted as operand of fold expression">;

def err_unexpected_typedef : Error<
  "unexpected type name %0: expected expression">;
def err_unexpected_namespace : Error<
  "unexpected namespace name %0: expected expression">;
def err_undeclared_var_use : Error<"use of undeclared identifier %0">;
def ext_undeclared_unqual_id_with_dependent_base : ExtWarn<
  "use of undeclared identifier %0; "
  "unqualified lookup into dependent bases of class template %1 is a Microsoft extension">,
  InGroup<MicrosoftTemplate>;
def ext_found_via_dependent_bases_lookup : ExtWarn<"use of identifier %0 "
  "found via unqualified lookup into dependent bases of class templates is a "
  "Microsoft extension">, InGroup<MicrosoftTemplate>;
def note_dependent_var_use : Note<"must qualify identifier to find this "
    "declaration in dependent base class">;
def err_not_found_by_two_phase_lookup : Error<"call to function %0 that is neither "
    "visible in the template definition nor found by argument-dependent lookup">;
def note_not_found_by_two_phase_lookup : Note<"%0 should be declared prior to the "
    "call site%select{| or in %2| or in an associated namespace of one of its arguments}1">;
def err_undeclared_use : Error<"use of undeclared %0">;
def warn_deprecated : Warning<"%0 is deprecated">,
    InGroup<DeprecatedDeclarations>;
def note_from_diagnose_if : Note<"from 'diagnose_if' attribute on %0:">;
def warn_property_method_deprecated :
    Warning<"property access is using %0 method which is deprecated">,
    InGroup<DeprecatedDeclarations>;
def warn_deprecated_message : Warning<"%0 is deprecated: %1">,
    InGroup<DeprecatedDeclarations>;
def warn_deprecated_anonymous_namespace : Warning<
  "'deprecated' attribute on anonymous namespace ignored">,
  InGroup<IgnoredAttributes>;
def warn_deprecated_fwdclass_message : Warning<
    "%0 may be deprecated because the receiver type is unknown">,
    InGroup<DeprecatedDeclarations>;
def warn_deprecated_def : Warning<
  "implementing deprecated %select{method|class|category}0">,
  InGroup<DeprecatedImplementations>, DefaultIgnore;
def warn_unavailable_def : Warning<
  "implementing unavailable method">,
  InGroup<DeprecatedImplementations>, DefaultIgnore;
def err_unavailable : Error<"%0 is unavailable">;
def err_property_method_unavailable :
    Error<"property access is using %0 method which is unavailable">;
def err_unavailable_message : Error<"%0 is unavailable: %1">;
def warn_unavailable_fwdclass_message : Warning<
    "%0 may be unavailable because the receiver type is unknown">,
    InGroup<UnavailableDeclarations>;
def note_availability_specified_here : Note<
  "%0 has been explicitly marked "
  "%select{unavailable|deleted|deprecated|partial}1 here">;
def note_implicitly_deleted : Note<
  "explicitly defaulted function was implicitly deleted here">;
def warn_not_enough_argument : Warning<
  "not enough variable arguments in %0 declaration to fit a sentinel">,
  InGroup<Sentinel>;
def warn_missing_sentinel : Warning <
  "missing sentinel in %select{function call|method dispatch|block call}0">,
  InGroup<Sentinel>;
def note_sentinel_here : Note<
  "%select{function|method|block}0 has been explicitly marked sentinel here">;
def warn_missing_prototype : Warning<
  "no previous prototype for function %0">,
  InGroup<DiagGroup<"missing-prototypes">>, DefaultIgnore;
def note_declaration_not_a_prototype : Note<
  "this declaration is not a prototype; add 'void' to make it a prototype for a zero-parameter function">; 
def warn_strict_prototypes : Warning<
  "this %select{function declaration is not|block declaration is not|"
  "old-style function definition is not preceded by}0 a prototype">,
  InGroup<DiagGroup<"strict-prototypes">>, DefaultIgnore;
def warn_missing_variable_declarations : Warning<
  "no previous extern declaration for non-static variable %0">,
  InGroup<DiagGroup<"missing-variable-declarations">>, DefaultIgnore;
def err_static_data_member_reinitialization :
  Error<"static data member %0 already has an initializer">;
def err_redefinition : Error<"redefinition of %0">;
def err_alias_after_tentative :
  Error<"alias definition of %0 after tentative definition">;
def err_alias_is_definition :
  Error<"definition %0 cannot also be an %select{alias|ifunc}1">;
def err_definition_of_implicitly_declared_member : Error<
  "definition of implicitly declared %select{default constructor|copy "
  "constructor|move constructor|copy assignment operator|move assignment "
  "operator|destructor|function}1">;
def err_definition_of_explicitly_defaulted_member : Error<
  "definition of explicitly defaulted %select{default constructor|copy "
  "constructor|move constructor|copy assignment operator|move assignment "
  "operator|destructor|function}0">;
def err_redefinition_extern_inline : Error<
  "redefinition of a 'extern inline' function %0 is not supported in "
  "%select{C99 mode|C++}1">;
def warn_attr_abi_tag_namespace : Warning<
  "'abi_tag' attribute on %select{non-inline|anonymous}0 namespace ignored">,
  InGroup<IgnoredAttributes>;
def err_abi_tag_on_redeclaration : Error<
  "cannot add 'abi_tag' attribute in a redeclaration">;
def err_new_abi_tag_on_redeclaration : Error<
  "'abi_tag' %0 missing in original declaration">;
def note_use_ifdef_guards : Note<
  "unguarded header; consider using #ifdef guards or #pragma once">;

def note_deleted_dtor_no_operator_delete : Note<
  "virtual destructor requires an unambiguous, accessible 'operator delete'">;
def note_deleted_special_member_class_subobject : Note<
  "%select{default constructor of|copy constructor of|move constructor of|"
  "copy assignment operator of|move assignment operator of|destructor of|"
  "constructor inherited by}0 "
  "%1 is implicitly deleted because "
  "%select{base class %3|%select{||||variant }4field %3}2 has "
  "%select{no|a deleted|multiple|an inaccessible|a non-trivial}4 "
  "%select{%select{default constructor|copy constructor|move constructor|copy "
  "assignment operator|move assignment operator|destructor|"
  "%select{default|corresponding|default|default|default}4 constructor}0|"
  "destructor}5"
  "%select{||s||}4">;
def note_deleted_default_ctor_uninit_field : Note<
  "%select{default constructor of|constructor inherited by}0 "
  "%1 is implicitly deleted because field %2 of "
  "%select{reference|const-qualified}4 type %3 would not be initialized">;
def note_deleted_default_ctor_all_const : Note<
  "%select{default constructor of|constructor inherited by}0 "
  "%1 is implicitly deleted because all "
  "%select{data members|data members of an anonymous union member}2"
  " are const-qualified">;
def note_deleted_copy_ctor_rvalue_reference : Note<
  "copy constructor of %0 is implicitly deleted because field %1 is of "
  "rvalue reference type %2">;
def note_deleted_copy_user_declared_move : Note<
  "copy %select{constructor|assignment operator}0 is implicitly deleted because"
  " %1 has a user-declared move %select{constructor|assignment operator}2">;
def note_deleted_assign_field : Note<
  "%select{copy|move}0 assignment operator of %1 is implicitly deleted "
  "because field %2 is of %select{reference|const-qualified}4 type %3">;

// These should be errors.
def warn_undefined_internal : Warning<
  "%select{function|variable}0 %q1 has internal linkage but is not defined">,
  InGroup<DiagGroup<"undefined-internal">>;
def warn_undefined_inline : Warning<"inline function %q0 is not defined">,
  InGroup<DiagGroup<"undefined-inline">>;
def err_undefined_inline_var : Error<"inline variable %q0 is not defined">;
def note_used_here : Note<"used here">;

def err_internal_linkage_redeclaration : Error<
  "'internal_linkage' attribute does not appear on the first declaration of %0">;
def warn_internal_linkage_local_storage : Warning<
  "'internal_linkage' attribute on a non-static local variable is ignored">,
  InGroup<IgnoredAttributes>;

def ext_internal_in_extern_inline : ExtWarn<
  "static %select{function|variable}0 %1 is used in an inline function with "
  "external linkage">, InGroup<StaticInInline>;
def ext_internal_in_extern_inline_quiet : Extension<
  "static %select{function|variable}0 %1 is used in an inline function with "
  "external linkage">, InGroup<StaticInInline>;
def warn_static_local_in_extern_inline : Warning<
  "non-constant static local variable in inline function may be different "
  "in different files">, InGroup<StaticLocalInInline>;
def note_convert_inline_to_static : Note<
  "use 'static' to give inline function %0 internal linkage">;

def ext_redefinition_of_typedef : ExtWarn<
  "redefinition of typedef %0 is a C11 feature">,
  InGroup<DiagGroup<"typedef-redefinition"> >;
def err_redefinition_variably_modified_typedef : Error<
  "redefinition of %select{typedef|type alias}0 for variably-modified type %1">;

def err_inline_decl_follows_def : Error<
  "inline declaration of %0 follows non-inline definition">;
def err_inline_declaration_block_scope : Error<
  "inline declaration of %0 not allowed in block scope">;
def err_static_non_static : Error<
  "static declaration of %0 follows non-static declaration">;
def err_different_language_linkage : Error<
  "declaration of %0 has a different language linkage">;
def ext_retained_language_linkage : Extension<
  "friend function %0 retaining previous language linkage is an extension">,
  InGroup<DiagGroup<"retained-language-linkage">>;
def err_extern_c_global_conflict : Error<
  "declaration of %1 %select{with C language linkage|in global scope}0 "
  "conflicts with declaration %select{in global scope|with C language linkage}0">;
def note_extern_c_global_conflict : Note<
  "declared %select{in global scope|with C language linkage}0 here">;
def note_extern_c_begins_here : Note<
  "extern \"C\" language linkage specification begins here">;
def warn_weak_import : Warning <
  "an already-declared variable is made a weak_import declaration %0">;
def ext_static_non_static : Extension<
  "redeclaring non-static %0 as static is a Microsoft extension">,
  InGroup<MicrosoftRedeclareStatic>;
def err_non_static_static : Error<
  "non-static declaration of %0 follows static declaration">;
def err_extern_non_extern : Error<
  "extern declaration of %0 follows non-extern declaration">;
def err_non_extern_extern : Error<
  "non-extern declaration of %0 follows extern declaration">;
def err_non_thread_thread : Error<
  "non-thread-local declaration of %0 follows thread-local declaration">;
def err_thread_non_thread : Error<
  "thread-local declaration of %0 follows non-thread-local declaration">;
def err_thread_thread_different_kind : Error<
  "thread-local declaration of %0 with %select{static|dynamic}1 initialization "
  "follows declaration with %select{dynamic|static}1 initialization">;
def err_redefinition_different_type : Error<
  "redefinition of %0 with a different type%diff{: $ vs $|}1,2">;
def err_redefinition_different_kind : Error<
  "redefinition of %0 as different kind of symbol">;
def err_redefinition_different_namespace_alias : Error<
  "redefinition of %0 as an alias for a different namespace">;
def note_previous_namespace_alias : Note<
  "previously defined as an alias for %0">;
def warn_forward_class_redefinition : Warning<
  "redefinition of forward class %0 of a typedef name of an object type is ignored">,
  InGroup<DiagGroup<"objc-forward-class-redefinition">>;
def err_redefinition_different_typedef : Error<
  "%select{typedef|type alias|type alias template}0 "
  "redefinition with different types%diff{ ($ vs $)|}1,2">;
def err_tag_reference_non_tag : Error<
  "%select{non-struct type|non-class type|non-union type|non-enum "
  "type|typedef|type alias|template|type alias template|template "
  "template argument}1 %0 cannot be referenced with a "
  "%select{struct|interface|union|class|enum}2 specifier">;
def err_tag_reference_conflict : Error<
  "implicit declaration introduced by elaborated type conflicts with a "
  "%select{non-struct type|non-class type|non-union type|non-enum "
  "type|typedef|type alias|template|type alias template|template "
  "template argument}0 of the same name">;
def err_dependent_tag_decl : Error<
  "%select{declaration|definition}0 of "
  "%select{struct|interface|union|class|enum}1 in a dependent scope">;
def err_tag_definition_of_typedef : Error<
  "definition of type %0 conflicts with %select{typedef|type alias}1 of the same name">;
def err_conflicting_types : Error<"conflicting types for %0">;
def err_different_pass_object_size_params : Error<
  "conflicting pass_object_size attributes on parameters">;
def err_late_asm_label_name : Error<
  "cannot apply asm label to %select{variable|function}0 after its first use">;
def err_different_asm_label : Error<"conflicting asm label">;
def err_nested_redefinition : Error<"nested redefinition of %0">;
def err_use_with_wrong_tag : Error<
  "use of %0 with tag type that does not match previous declaration">;
def warn_struct_class_tag_mismatch : Warning<
    "%select{struct|interface|class}0%select{| template}1 %2 was previously "
    "declared as a %select{struct|interface|class}3%select{| template}1">,
    InGroup<MismatchedTags>, DefaultIgnore;
def warn_struct_class_previous_tag_mismatch : Warning<
    "%2 defined as %select{a struct|an interface|a class}0%select{| template}1 "
    "here but previously declared as "
    "%select{a struct|an interface|a class}3%select{| template}1">,
     InGroup<MismatchedTags>, DefaultIgnore;
def note_struct_class_suggestion : Note<
    "did you mean %select{struct|interface|class}0 here?">;
def ext_forward_ref_enum : Extension<
  "ISO C forbids forward references to 'enum' types">;
def err_forward_ref_enum : Error<
  "ISO C++ forbids forward references to 'enum' types">;
def ext_ms_forward_ref_enum : ExtWarn<
  "forward references to 'enum' types are a Microsoft extension">,
  InGroup<MicrosoftEnumForwardReference>;
def ext_forward_ref_enum_def : Extension<
  "redeclaration of already-defined enum %0 is a GNU extension">,
  InGroup<GNURedeclaredEnum>;
  
def err_redefinition_of_enumerator : Error<"redefinition of enumerator %0">;
def err_duplicate_member : Error<"duplicate member %0">;
def err_misplaced_ivar : Error<
  "instance variables may not be placed in %select{categories|class extension}0">;
def warn_ivars_in_interface : Warning<
  "declaration of instance variables in the interface is deprecated">,
  InGroup<DiagGroup<"objc-interface-ivars">>, DefaultIgnore;
def ext_enum_value_not_int : Extension<
  "ISO C restricts enumerator values to range of 'int' (%0 is too "
  "%select{small|large}1)">;
def ext_enum_too_large : ExtWarn<
  "enumeration values exceed range of largest integer">, InGroup<EnumTooLarge>;
def ext_enumerator_increment_too_large : ExtWarn<
  "incremented enumerator value %0 is not representable in the "
  "largest integer type">, InGroup<EnumTooLarge>;
def warn_flag_enum_constant_out_of_range : Warning<
  "enumeration value %0 is out of range of flags in enumeration type %1">,
  InGroup<FlagEnum>;
  
def warn_illegal_constant_array_size : Extension<
  "size of static array must be an integer constant expression">;
def err_vm_decl_in_file_scope : Error<
  "variably modified type declaration not allowed at file scope">;
def err_vm_decl_has_extern_linkage : Error<
  "variably modified type declaration cannot have 'extern' linkage">;
def err_typecheck_field_variable_size : Error<
  "fields must have a constant size: 'variable length array in structure' "
  "extension will never be supported">;
def err_vm_func_decl : Error<
  "function declaration cannot have variably modified type">;
def err_array_too_large : Error<
  "array is too large (%0 elements)">;

// -Wpadded, -Wpacked
def warn_padded_struct_field : Warning<
  "padding %select{struct|interface|class}0 %1 with %2 "
  "%select{byte|bit}3%s2 to align %4">,
  InGroup<Padded>, DefaultIgnore;
def warn_padded_struct_anon_field : Warning<
  "padding %select{struct|interface|class}0 %1 with %2 "
  "%select{byte|bit}3%s2 to align anonymous bit-field">,
  InGroup<Padded>, DefaultIgnore;
def warn_padded_struct_size : Warning<
  "padding size of %0 with %1 %select{byte|bit}2%s1 to alignment boundary">,
  InGroup<Padded>, DefaultIgnore;
def warn_unnecessary_packed : Warning<
  "packed attribute is unnecessary for %0">, InGroup<Packed>, DefaultIgnore;

def err_typecheck_negative_array_size : Error<"array size is negative">;
def warn_typecheck_function_qualifiers_ignored : Warning<
  "'%0' qualifier on function type %1 has no effect">,
  InGroup<IgnoredQualifiers>;
def warn_typecheck_function_qualifiers_unspecified : Warning<
  "'%0' qualifier on function type %1 has unspecified behavior">;
def warn_typecheck_reference_qualifiers : Warning<
  "'%0' qualifier on reference type %1 has no effect">,
  InGroup<IgnoredQualifiers>;
def err_typecheck_invalid_restrict_not_pointer : Error<
  "restrict requires a pointer or reference (%0 is invalid)">;
def err_typecheck_invalid_restrict_not_pointer_noarg : Error<
  "restrict requires a pointer or reference">;
def err_typecheck_invalid_restrict_invalid_pointee : Error<
  "pointer to function type %0 may not be 'restrict' qualified">;
def ext_typecheck_zero_array_size : Extension<
  "zero size arrays are an extension">, InGroup<ZeroLengthArray>;
def err_typecheck_zero_array_size : Error<
  "zero-length arrays are not permitted in C++">;
def warn_typecheck_zero_static_array_size : Warning<
  "'static' has no effect on zero-length arrays">,
  InGroup<ArrayBounds>;
def err_array_size_non_int : Error<"size of array has non-integer type %0">;
def err_init_element_not_constant : Error<
  "initializer element is not a compile-time constant">;
def ext_aggregate_init_not_constant : Extension<
  "initializer for aggregate is not a compile-time constant">, InGroup<C99>;
def err_local_cant_init : Error<
  "'__local' variable cannot have an initializer">;
def err_block_extern_cant_init : Error<
  "'extern' variable cannot have an initializer">;
def warn_extern_init : Warning<"'extern' variable has an initializer">,
  InGroup<DiagGroup<"extern-initializer">>;
def err_variable_object_no_init : Error<
  "variable-sized object may not be initialized">;
def err_excess_initializers : Error<
  "excess elements in %select{array|vector|scalar|union|struct}0 initializer">;
def ext_excess_initializers : ExtWarn<
  "excess elements in %select{array|vector|scalar|union|struct}0 initializer">;
def err_excess_initializers_in_char_array_initializer : Error<
  "excess elements in char array initializer">;
def ext_excess_initializers_in_char_array_initializer : ExtWarn<
  "excess elements in char array initializer">;
def err_initializer_string_for_char_array_too_long : Error<
  "initializer-string for char array is too long">;
def ext_initializer_string_for_char_array_too_long : ExtWarn<
  "initializer-string for char array is too long">;
def warn_missing_field_initializers : Warning<
  "missing field %0 initializer">,
  InGroup<MissingFieldInitializers>, DefaultIgnore;
def warn_braces_around_scalar_init : Warning<
  "braces around scalar initializer">, InGroup<DiagGroup<"braced-scalar-init">>;
def ext_many_braces_around_scalar_init : ExtWarn<
  "too many braces around scalar initializer">,
  InGroup<DiagGroup<"many-braces-around-scalar-init">>;
def ext_complex_component_init : Extension<
  "complex initialization specifying real and imaginary components "
  "is an extension">, InGroup<DiagGroup<"complex-component-init">>;
def err_empty_scalar_initializer : Error<"scalar initializer cannot be empty">;
def warn_cxx98_compat_empty_scalar_initializer : Warning<
  "scalar initialized from empty initializer list is incompatible with C++98">,
  InGroup<CXX98Compat>, DefaultIgnore;
def warn_cxx98_compat_reference_list_init : Warning<
  "reference initialized from initializer list is incompatible with C++98">,
  InGroup<CXX98Compat>, DefaultIgnore;
def warn_cxx98_compat_initializer_list_init : Warning<
  "initialization of initializer_list object is incompatible with C++98">,
  InGroup<CXX98Compat>, DefaultIgnore;
def warn_cxx98_compat_ctor_list_init : Warning<
  "constructor call from initializer list is incompatible with C++98">,
  InGroup<CXX98Compat>, DefaultIgnore;
def err_illegal_initializer : Error<
  "illegal initializer (only variables can be initialized)">;
def err_illegal_initializer_type : Error<"illegal initializer type %0">;
def ext_init_list_type_narrowing : ExtWarn<
  "type %0 cannot be narrowed to %1 in initializer list">, 
  InGroup<CXX11Narrowing>, DefaultError, SFINAEFailure;
def ext_init_list_variable_narrowing : ExtWarn<
  "non-constant-expression cannot be narrowed from type %0 to %1 in "
  "initializer list">, InGroup<CXX11Narrowing>, DefaultError, SFINAEFailure;
def ext_init_list_constant_narrowing : ExtWarn<
  "constant expression evaluates to %0 which cannot be narrowed to type %1">,
  InGroup<CXX11Narrowing>, DefaultError, SFINAEFailure;
def warn_init_list_type_narrowing : Warning<
  "type %0 cannot be narrowed to %1 in initializer list in C++11">,
  InGroup<CXX11Narrowing>, DefaultIgnore;
def warn_init_list_variable_narrowing : Warning<
  "non-constant-expression cannot be narrowed from type %0 to %1 in "
  "initializer list in C++11">,
  InGroup<CXX11Narrowing>, DefaultIgnore;
def warn_init_list_constant_narrowing : Warning<
  "constant expression evaluates to %0 which cannot be narrowed to type %1 in "
  "C++11">,
  InGroup<CXX11Narrowing>, DefaultIgnore;
def note_init_list_narrowing_silence : Note<
  "insert an explicit cast to silence this issue">;
def err_init_objc_class : Error<
  "cannot initialize Objective-C class type %0">;
def err_implicit_empty_initializer : Error<
  "initializer for aggregate with no elements requires explicit braces">;
def err_bitfield_has_negative_width : Error<
  "bit-field %0 has negative width (%1)">;
def err_anon_bitfield_has_negative_width : Error<
  "anonymous bit-field has negative width (%0)">;
def err_bitfield_has_zero_width : Error<"named bit-field %0 has zero width">;
def err_bitfield_width_exceeds_type_width : Error<
  "width of bit-field %0 (%1 bits) exceeds %select{width|size}2 "
  "of its type (%3 bit%s3)">;
def err_anon_bitfield_width_exceeds_type_width : Error<
  "width of anonymous bit-field (%0 bits) exceeds %select{width|size}1 "
  "of its type (%2 bit%s2)">;
def err_incorrect_number_of_vector_initializers : Error<
  "number of elements must be either one or match the size of the vector">;

// Used by C++ which allows bit-fields that are wider than the type.
def warn_bitfield_width_exceeds_type_width: Warning<
  "width of bit-field %0 (%1 bits) exceeds the width of its type; value will "
  "be truncated to %2 bit%s2">, InGroup<BitFieldWidth>;
def warn_anon_bitfield_width_exceeds_type_width : Warning<
  "width of anonymous bit-field (%0 bits) exceeds width of its type; value "
  "will be truncated to %1 bit%s1">, InGroup<BitFieldWidth>;
def warn_bitfield_too_small_for_enum : Warning<
  "bit-field %0 is not wide enough to store all enumerators of %1">,
  InGroup<BitFieldEnumConversion>, DefaultIgnore;
def note_widen_bitfield : Note<
  "widen this field to %0 bits to store all values of %1">;
def warn_unsigned_bitfield_assigned_signed_enum : Warning<
  "assigning value of signed enum type %1 to unsigned bit-field %0; "
  "negative enumerators of enum %1 will be converted to positive values">,
  InGroup<BitFieldEnumConversion>, DefaultIgnore;
def warn_signed_bitfield_enum_conversion : Warning<
  "signed bit-field %0 needs an extra bit to represent the largest positive "
  "enumerators of %1">,
  InGroup<BitFieldEnumConversion>, DefaultIgnore;
def note_change_bitfield_sign : Note<
  "consider making the bitfield type %select{unsigned|signed}0">;

def warn_missing_braces : Warning<
  "suggest braces around initialization of subobject">,
  InGroup<MissingBraces>, DefaultIgnore;

def err_redefinition_of_label : Error<"redefinition of label %0">;
def err_undeclared_label_use : Error<"use of undeclared label %0">;
def err_goto_ms_asm_label : Error<
  "cannot jump from this goto statement to label %0 inside an inline assembly block">;
def note_goto_ms_asm_label : Note<
  "inline assembly label %0 declared here">;
def warn_unused_label : Warning<"unused label %0">,
  InGroup<UnusedLabel>, DefaultIgnore;

def err_goto_into_protected_scope : Error<
  "cannot jump from this goto statement to its label">;
def ext_goto_into_protected_scope : ExtWarn<
  "jump from this goto statement to its label is a Microsoft extension">,
  InGroup<MicrosoftGoto>;
def warn_cxx98_compat_goto_into_protected_scope : Warning<
  "jump from this goto statement to its label is incompatible with C++98">,
  InGroup<CXX98Compat>, DefaultIgnore;
def err_switch_into_protected_scope : Error<
  "cannot jump from switch statement to this case label">;
def warn_cxx98_compat_switch_into_protected_scope : Warning<
  "jump from switch statement to this case label is incompatible with C++98">,
  InGroup<CXX98Compat>, DefaultIgnore;
def err_indirect_goto_without_addrlabel : Error<
  "indirect goto in function with no address-of-label expressions">;
def err_indirect_goto_in_protected_scope : Error<
  "cannot jump from this indirect goto statement to one of its possible targets">;
def warn_cxx98_compat_indirect_goto_in_protected_scope : Warning<
  "jump from this indirect goto statement to one of its possible targets "
  "is incompatible with C++98">, InGroup<CXX98Compat>, DefaultIgnore;
def note_indirect_goto_target : Note<
  "possible target of indirect goto statement">;
def note_protected_by_variable_init : Note<
  "jump bypasses variable initialization">;
def note_protected_by_variable_nontriv_destructor : Note<
  "jump bypasses variable with a non-trivial destructor">;
def note_protected_by_variable_non_pod : Note<
  "jump bypasses initialization of non-POD variable">;
def note_protected_by_cleanup : Note<
  "jump bypasses initialization of variable with __attribute__((cleanup))">;
def note_protected_by_vla_typedef : Note<
  "jump bypasses initialization of VLA typedef">;
def note_protected_by_vla_type_alias : Note<
  "jump bypasses initialization of VLA type alias">;
def note_protected_by_constexpr_if : Note<
  "jump enters controlled statement of constexpr if">;
def note_protected_by_if_available : Note<
  "jump enters controlled statement of if available">;
def note_protected_by_vla : Note<
  "jump bypasses initialization of variable length array">;
def note_protected_by_objc_fast_enumeration : Note<
  "jump enters Objective-C fast enumeration loop">;
def note_protected_by_objc_try : Note<
  "jump bypasses initialization of @try block">;
def note_protected_by_objc_catch : Note<
  "jump bypasses initialization of @catch block">;
def note_protected_by_objc_finally : Note<
  "jump bypasses initialization of @finally block">;
def note_protected_by_objc_synchronized : Note<
  "jump bypasses initialization of @synchronized block">;
def note_protected_by_objc_autoreleasepool : Note<
  "jump bypasses auto release push of @autoreleasepool block">;
def note_protected_by_cxx_try : Note<
  "jump bypasses initialization of try block">;
def note_protected_by_cxx_catch : Note<
  "jump bypasses initialization of catch block">;
def note_protected_by_seh_try : Note<
  "jump bypasses initialization of __try block">;
def note_protected_by_seh_except : Note<
  "jump bypasses initialization of __except block">;
def note_protected_by_seh_finally : Note<
  "jump bypasses initialization of __finally block">;
def note_protected_by___block : Note<
  "jump bypasses setup of __block variable">;
def note_protected_by_objc_strong_init : Note<
  "jump bypasses initialization of __strong variable">;
def note_protected_by_objc_weak_init : Note<
  "jump bypasses initialization of __weak variable">;
def note_enters_block_captures_cxx_obj : Note<
  "jump enters lifetime of block which captures a destructible C++ object">;
def note_enters_block_captures_strong : Note<
  "jump enters lifetime of block which strongly captures a variable">;
def note_enters_block_captures_weak : Note<
  "jump enters lifetime of block which weakly captures a variable">;

def note_exits_cleanup : Note<
  "jump exits scope of variable with __attribute__((cleanup))">;
def note_exits_dtor : Note<
  "jump exits scope of variable with non-trivial destructor">;
def note_exits_temporary_dtor : Note<
  "jump exits scope of lifetime-extended temporary with non-trivial "
  "destructor">;
def note_exits___block : Note<
  "jump exits scope of __block variable">;
def note_exits_objc_try : Note<
  "jump exits @try block">;
def note_exits_objc_catch : Note<
  "jump exits @catch block">;
def note_exits_objc_finally : Note<
  "jump exits @finally block">;
def note_exits_objc_synchronized : Note<
  "jump exits @synchronized block">;
def note_exits_cxx_try : Note<
  "jump exits try block">;
def note_exits_cxx_catch : Note<
  "jump exits catch block">;
def note_exits_seh_try : Note<
  "jump exits __try block">;
def note_exits_seh_except : Note<
  "jump exits __except block">;
def note_exits_seh_finally : Note<
  "jump exits __finally block">;
def note_exits_objc_autoreleasepool : Note<
  "jump exits autoreleasepool block">;
def note_exits_objc_strong : Note<
  "jump exits scope of __strong variable">;
def note_exits_objc_weak : Note<
  "jump exits scope of __weak variable">;
def note_exits_block_captures_cxx_obj : Note<
  "jump exits lifetime of block which captures a destructible C++ object">;
def note_exits_block_captures_strong : Note<
  "jump exits lifetime of block which strongly captures a variable">;
def note_exits_block_captures_weak : Note<
  "jump exits lifetime of block which weakly captures a variable">;

def err_func_returning_qualified_void : ExtWarn<
  "function cannot return qualified void type %0">,
  InGroup<DiagGroup<"qualified-void-return-type">>;
def err_func_returning_array_function : Error<
  "function cannot return %select{array|function}0 type %1">;
def err_field_declared_as_function : Error<"field %0 declared as a function">;
def err_field_incomplete : Error<"field has incomplete type %0">;
def ext_variable_sized_type_in_struct : ExtWarn<
  "field %0 with variable sized type %1 not at the end of a struct or class is"
  " a GNU extension">, InGroup<GNUVariableSizedTypeNotAtEnd>;

def ext_c99_flexible_array_member : Extension<
  "flexible array members are a C99 feature">, InGroup<C99>;
def err_flexible_array_virtual_base : Error<
  "flexible array member %0 not allowed in "
  "%select{struct|interface|union|class|enum}1 which has a virtual base class">;
def err_flexible_array_empty_aggregate : Error<
  "flexible array member %0 not allowed in otherwise empty "
  "%select{struct|interface|union|class|enum}1">;
def err_flexible_array_has_nontrivial_dtor : Error<
  "flexible array member %0 of type %1 with non-trivial destruction">;
def ext_flexible_array_in_struct : Extension<
  "%0 may not be nested in a struct due to flexible array member">,
  InGroup<FlexibleArrayExtensions>;
def ext_flexible_array_in_array : Extension<
  "%0 may not be used as an array element due to flexible array member">,
  InGroup<FlexibleArrayExtensions>;
def err_flexible_array_init : Error<
  "initialization of flexible array member is not allowed">;
def ext_flexible_array_empty_aggregate_ms : Extension<
  "flexible array member %0 in otherwise empty "
  "%select{struct|interface|union|class|enum}1 is a Microsoft extension">,
  InGroup<MicrosoftFlexibleArray>;
def err_flexible_array_union : Error<
  "flexible array member %0 in a union is not allowed">;
def ext_flexible_array_union_ms : Extension<
  "flexible array member %0 in a union is a Microsoft extension">,
  InGroup<MicrosoftFlexibleArray>;
def ext_flexible_array_empty_aggregate_gnu : Extension<
  "flexible array member %0 in otherwise empty "
  "%select{struct|interface|union|class|enum}1 is a GNU extension">,
  InGroup<GNUEmptyStruct>;
def ext_flexible_array_union_gnu : Extension<
  "flexible array member %0 in a union is a GNU extension">, InGroup<GNUFlexibleArrayUnionMember>;

let CategoryName = "ARC Semantic Issue" in {

// ARC-mode diagnostics.

let CategoryName = "ARC Weak References" in {

def err_arc_weak_no_runtime : Error<
  "cannot create __weak reference because the current deployment target "
  "does not support weak references">;
def err_arc_weak_disabled : Error<
  "cannot create __weak reference in file using manual reference counting">;
def err_synthesizing_arc_weak_property_disabled : Error<
  "cannot synthesize weak property in file using manual reference counting">;
def err_synthesizing_arc_weak_property_no_runtime : Error<
  "cannot synthesize weak property because the current deployment target "
  "does not support weak references">;
def err_arc_unsupported_weak_class : Error<
  "class is incompatible with __weak references">;
def err_arc_weak_unavailable_assign : Error<
  "assignment of a weak-unavailable object to a __weak object">;
def err_arc_weak_unavailable_property : Error<
  "synthesizing __weak instance variable of type %0, which does not "
  "support weak references">;
def note_implemented_by_class : Note<
  "when implemented by class %0">;
def err_arc_convesion_of_weak_unavailable : Error<
  "%select{implicit conversion|cast}0 of weak-unavailable object of type %1 to"
  " a __weak object of type %2">;

} // end "ARC Weak References" category

let CategoryName = "ARC Restrictions" in {

def err_unavailable_in_arc : Error<
  "%0 is unavailable in ARC">;
def note_arc_forbidden_type : Note<
  "declaration uses type that is ill-formed in ARC">;
def note_performs_forbidden_arc_conversion : Note<
  "inline function performs a conversion which is forbidden in ARC">;
def note_arc_init_returns_unrelated : Note<
  "init method must return a type related to its receiver type">;
def note_arc_weak_disabled : Note<
  "declaration uses __weak, but ARC is disabled">;
def note_arc_weak_no_runtime : Note<"declaration uses __weak, which "
  "the current deployment target does not support">;
def note_arc_field_with_ownership : Note<
  "field has non-trivial ownership qualification">;

def err_arc_illegal_explicit_message : Error<
  "ARC forbids explicit message send of %0">;
def err_arc_unused_init_message : Error<
  "the result of a delegate init call must be immediately returned "
  "or assigned to 'self'">;
def err_arc_mismatched_cast : Error<
  "%select{implicit conversion|cast}0 of "
  "%select{%2|a non-Objective-C pointer type %2|a block pointer|"
  "an Objective-C pointer|an indirect pointer to an Objective-C pointer}1"
  " to %3 is disallowed with ARC">;
def err_arc_nolifetime_behavior : Error<
  "explicit ownership qualifier on cast result has no effect">;
def err_arc_objc_object_in_tag : Error<
  "ARC forbids %select{Objective-C objects|blocks}0 in "
  "%select{struct|interface|union|<<ERROR>>|enum}1">;
def err_arc_objc_property_default_assign_on_object : Error<
  "ARC forbids synthesizing a property of an Objective-C object "
  "with unspecified ownership or storage attribute">;
def err_arc_illegal_selector : Error<
  "ARC forbids use of %0 in a @selector">;
def err_arc_illegal_method_def : Error<
  "ARC forbids %select{implementation|synthesis}0 of %1">;
def warn_arc_strong_pointer_objc_pointer : Warning<
  "method parameter of type %0 with no explicit ownership">,
  InGroup<DiagGroup<"explicit-ownership-type">>, DefaultIgnore;
  
} // end "ARC Restrictions" category
  
def err_arc_lost_method_convention : Error<
  "method was declared as %select{an 'alloc'|a 'copy'|an 'init'|a 'new'}0 "
  "method, but its implementation doesn't match because %select{"
  "its result type is not an object pointer|"
  "its result type is unrelated to its receiver type}1">;
def note_arc_lost_method_convention : Note<"declaration in interface">;
def err_arc_gained_method_convention : Error<
  "method implementation does not match its declaration">;
def note_arc_gained_method_convention : Note<
  "declaration in interface is not in the '%select{alloc|copy|init|new}0' "
  "family because %select{its result type is not an object pointer|"
  "its result type is unrelated to its receiver type}1">;
def err_typecheck_arc_assign_self : Error<
  "cannot assign to 'self' outside of a method in the init family">;
def err_typecheck_arc_assign_self_class_method : Error<
  "cannot assign to 'self' in a class method">;
def err_typecheck_arr_assign_enumeration : Error<
  "fast enumeration variables cannot be modified in ARC by default; "
  "declare the variable __strong to allow this">;
def warn_arc_retained_assign : Warning<
  "assigning retained object to %select{weak|unsafe_unretained}0 "
  "%select{property|variable}1"
  "; object will be released after assignment">,
  InGroup<ARCUnsafeRetainedAssign>;
def warn_arc_retained_property_assign : Warning<
  "assigning retained object to unsafe property"
  "; object will be released after assignment">,
  InGroup<ARCUnsafeRetainedAssign>;
def warn_arc_literal_assign : Warning<
  "assigning %select{array literal|dictionary literal|numeric literal|boxed expression|<should not happen>|block literal}0"
  " to a weak %select{property|variable}1"
  "; object will be released after assignment">,
  InGroup<ARCUnsafeRetainedAssign>;
def err_arc_new_array_without_ownership : Error<
  "'new' cannot allocate an array of %0 with no explicit ownership">;
def err_arc_autoreleasing_var : Error<
  "%select{__block variables|global variables|fields|instance variables}0 cannot have "
  "__autoreleasing ownership">;
def err_arc_autoreleasing_capture : Error<
  "cannot capture __autoreleasing variable in a "
  "%select{block|lambda by copy}0">;
def err_arc_thread_ownership : Error<
  "thread-local variable has non-trivial ownership: type is %0">;
def err_arc_indirect_no_ownership : Error<
  "%select{pointer|reference}1 to non-const type %0 with no explicit ownership">;
def err_arc_array_param_no_ownership : Error<
  "must explicitly describe intended ownership of an object array parameter">;
def err_arc_pseudo_dtor_inconstant_quals : Error<
  "pseudo-destructor destroys object of type %0 with inconsistently-qualified "
  "type %1">;
def err_arc_init_method_unrelated_result_type : Error<
  "init methods must return a type related to the receiver type">;
def err_arc_nonlocal_writeback : Error<
  "passing address of %select{non-local|non-scalar}0 object to "
  "__autoreleasing parameter for write-back">;
def err_arc_method_not_found : Error<
  "no known %select{instance|class}1 method for selector %0">;
def err_arc_receiver_forward_class : Error<
  "receiver %0 for class message is a forward declaration">;
def err_arc_may_not_respond : Error<
  "no visible @interface for %0 declares the selector %1">;
def err_arc_receiver_forward_instance : Error<
  "receiver type %0 for instance message is a forward declaration">;
def warn_receiver_forward_instance : Warning<
  "receiver type %0 for instance message is a forward declaration">,
  InGroup<ForwardClassReceiver>, DefaultIgnore;
def err_arc_collection_forward : Error<
  "collection expression type %0 is a forward declaration">;
def err_arc_multiple_method_decl : Error< 
  "multiple methods named %0 found with mismatched result, "
  "parameter type or attributes">;
def warn_arc_lifetime_result_type : Warning<
  "ARC %select{unused|__unsafe_unretained|__strong|__weak|__autoreleasing}0 "
  "lifetime qualifier on return type is ignored">,
  InGroup<IgnoredQualifiers>;

let CategoryName = "ARC Retain Cycle" in {

def warn_arc_retain_cycle : Warning<
  "capturing %0 strongly in this block is likely to lead to a retain cycle">,
  InGroup<ARCRetainCycles>;
def note_arc_retain_cycle_owner : Note<
  "block will be retained by %select{the captured object|an object strongly "
  "retained by the captured object}0">;

} // end "ARC Retain Cycle" category

def warn_arc_object_memaccess : Warning<
  "%select{destination for|source of}0 this %1 call is a pointer to "
  "ownership-qualified type %2">, InGroup<ARCNonPodMemAccess>;

let CategoryName = "ARC and @properties" in {

def err_arc_strong_property_ownership : Error<
  "existing instance variable %1 for strong property %0 may not be "
  "%select{|__unsafe_unretained||__weak}2">;
def err_arc_assign_property_ownership : Error<
  "existing instance variable %1 for property %0 with %select{unsafe_unretained|assign}2 "
  "attribute must be __unsafe_unretained">;
def err_arc_inconsistent_property_ownership : Error<
  "%select{|unsafe_unretained|strong|weak}1 property %0 may not also be "
  "declared %select{|__unsafe_unretained|__strong|__weak|__autoreleasing}2">;

} // end "ARC and @properties" category

def warn_block_capture_autoreleasing : Warning<
  "block captures an autoreleasing out-parameter, which may result in "
  "use-after-free bugs">,
  InGroup<BlockCaptureAutoReleasing>;
def note_declare_parameter_autoreleasing : Note<
  "declare the parameter __autoreleasing explicitly to suppress this warning">;
def note_declare_parameter_strong : Note<
  "declare the parameter __strong or capture a __block __strong variable to "
  "keep values alive across autorelease pools">;

def err_arc_atomic_ownership : Error<
  "cannot perform atomic operation on a pointer to type %0: type has "
  "non-trivial ownership">;

let CategoryName = "ARC Casting Rules" in {

def err_arc_bridge_cast_incompatible : Error<
  "incompatible types casting %0 to %1 with a %select{__bridge|"
  "__bridge_transfer|__bridge_retained}2 cast">;
def err_arc_bridge_cast_wrong_kind : Error<
  "cast of %select{Objective-C|block|C}0 pointer type %1 to "
  "%select{Objective-C|block|C}2 pointer type %3 cannot use %select{__bridge|"
  "__bridge_transfer|__bridge_retained}4">;
def err_arc_cast_requires_bridge : Error<
  "%select{cast|implicit conversion}0 of %select{Objective-C|block|C}1 "
  "pointer type %2 to %select{Objective-C|block|C}3 pointer type %4 "
  "requires a bridged cast">;
def note_arc_bridge : Note<
  "use __bridge to convert directly (no change in ownership)">;
def note_arc_cstyle_bridge : Note<
  "use __bridge with C-style cast to convert directly (no change in ownership)">;
def note_arc_bridge_transfer : Note<
  "use %select{__bridge_transfer|CFBridgingRelease call}1 to transfer "
  "ownership of a +1 %0 into ARC">;
def note_arc_cstyle_bridge_transfer : Note<
  "use __bridge_transfer with C-style cast to transfer "
  "ownership of a +1 %0 into ARC">;
def note_arc_bridge_retained : Note<
  "use %select{__bridge_retained|CFBridgingRetain call}1 to make an "
  "ARC object available as a +1 %0">;
def note_arc_cstyle_bridge_retained : Note<
  "use __bridge_retained with C-style cast to make an "
  "ARC object available as a +1 %0">;

} // ARC Casting category

} // ARC category name

def err_flexible_array_init_needs_braces : Error<
  "flexible array requires brace-enclosed initializer">;
def err_illegal_decl_array_of_functions : Error<
  "'%0' declared as array of functions of type %1">;
def err_illegal_decl_array_incomplete_type : Error<
  "array has incomplete element type %0">;
def err_illegal_message_expr_incomplete_type : Error<
  "Objective-C message has incomplete result type %0">;
def err_illegal_decl_array_of_references : Error<
  "'%0' declared as array of references of type %1">;
def err_decl_negative_array_size : Error<
  "'%0' declared as an array with a negative size">;
def err_array_static_outside_prototype : Error<
  "%0 used in array declarator outside of function prototype">;
def err_array_static_not_outermost : Error<
  "%0 used in non-outermost array type derivation">;
def err_array_star_outside_prototype : Error<
  "star modifier used outside of function prototype">;
def err_illegal_decl_pointer_to_reference : Error<
  "'%0' declared as a pointer to a reference of type %1">;
def err_illegal_decl_mempointer_to_reference : Error<
  "'%0' declared as a member pointer to a reference of type %1">;
def err_illegal_decl_mempointer_to_void : Error<
  "'%0' declared as a member pointer to void">;
def err_illegal_decl_mempointer_in_nonclass : Error<
  "'%0' does not point into a class">;
def err_mempointer_in_nonclass_type : Error<
  "member pointer refers into non-class type %0">;
def err_reference_to_void : Error<"cannot form a reference to 'void'">;
def err_nonfunction_block_type : Error<
  "block pointer to non-function type is invalid">;
def err_return_block_has_expr : Error<"void block should not return a value">;
def err_block_return_missing_expr : Error<
  "non-void block should return a value">;
def err_func_def_incomplete_result : Error<
  "incomplete result type %0 in function definition">;
def err_atomic_specifier_bad_type : Error<
  "_Atomic cannot be applied to "
  "%select{incomplete |array |function |reference |atomic |qualified |}0type "
  "%1 %select{||||||which is not trivially copyable}0">;

// Expressions.
def ext_sizeof_alignof_function_type : Extension<
  "invalid application of '%select{sizeof|alignof|vec_step}0' to a "
  "function type">, InGroup<PointerArith>;
def ext_sizeof_alignof_void_type : Extension<
  "invalid application of '%select{sizeof|alignof|vec_step}0' to a void "
  "type">, InGroup<PointerArith>;
def err_opencl_sizeof_alignof_type : Error<
  "invalid application of '%select{sizeof|alignof|vec_step|__builtin_omp_required_simd_align}0' to a void type">;
def err_sizeof_alignof_incomplete_type : Error<
  "invalid application of '%select{sizeof|alignof|vec_step|__builtin_omp_required_simd_align}0' to an "
  "incomplete type %1">;
def err_sizeof_alignof_function_type : Error<
  "invalid application of '%select{sizeof|alignof|vec_step|__builtin_omp_required_simd_align}0' to a "
  "function type">;
def err_openmp_default_simd_align_expr : Error<
  "invalid application of '__builtin_omp_required_simd_align' to an expression, only type is allowed">;
def err_sizeof_alignof_typeof_bitfield : Error<
  "invalid application of '%select{sizeof|alignof|typeof}0' to bit-field">;
def err_alignof_member_of_incomplete_type : Error<
  "invalid application of 'alignof' to a field of a class still being defined">;
def err_vecstep_non_scalar_vector_type : Error<
  "'vec_step' requires built-in scalar or vector type, %0 invalid">;
def err_offsetof_incomplete_type : Error<
  "offsetof of incomplete type %0">;
def err_offsetof_record_type : Error<
  "offsetof requires struct, union, or class type, %0 invalid">;
def err_offsetof_array_type : Error<"offsetof requires array type, %0 invalid">;
def ext_offsetof_extended_field_designator : Extension<
  "using extended field designator is an extension">,
  InGroup<DiagGroup<"extended-offsetof">>;
def ext_offsetof_non_pod_type : ExtWarn<"offset of on non-POD type %0">,
  InGroup<InvalidOffsetof>;
def ext_offsetof_non_standardlayout_type : ExtWarn<
  "offset of on non-standard-layout type %0">, InGroup<InvalidOffsetof>;
def err_offsetof_bitfield : Error<"cannot compute offset of bit-field %0">;
def err_offsetof_field_of_virtual_base : Error<
  "invalid application of 'offsetof' to a field of a virtual base">;
def warn_sub_ptr_zero_size_types : Warning<
  "subtraction of pointers to type %0 of zero size has undefined behavior">,
  InGroup<PointerArith>;

def warn_floatingpoint_eq : Warning<
  "comparing floating point with == or != is unsafe">,
  InGroup<DiagGroup<"float-equal">>, DefaultIgnore;

def warn_remainder_division_by_zero : Warning<
  "%select{remainder|division}0 by zero is undefined">,
  InGroup<DivZero>;
def warn_shift_lhs_negative : Warning<"shifting a negative signed value is undefined">,
  InGroup<DiagGroup<"shift-negative-value">>;
def warn_shift_negative : Warning<"shift count is negative">,
  InGroup<DiagGroup<"shift-count-negative">>;
def warn_shift_gt_typewidth : Warning<"shift count >= width of type">,
  InGroup<DiagGroup<"shift-count-overflow">>;
def warn_shift_result_gt_typewidth : Warning<
  "signed shift result (%0) requires %1 bits to represent, but %2 only has "
  "%3 bits">, InGroup<DiagGroup<"shift-overflow">>;
def warn_shift_result_sets_sign_bit : Warning<
  "signed shift result (%0) sets the sign bit of the shift expression's "
  "type (%1) and becomes negative">,
  InGroup<DiagGroup<"shift-sign-overflow">>, DefaultIgnore;

def warn_precedence_bitwise_rel : Warning<
  "%0 has lower precedence than %1; %1 will be evaluated first">,
  InGroup<Parentheses>;
def note_precedence_bitwise_first : Note<
  "place parentheses around the %0 expression to evaluate it first">;
def note_precedence_silence : Note<
  "place parentheses around the '%0' expression to silence this warning">;

def warn_precedence_conditional : Warning<
  "operator '?:' has lower precedence than '%0'; '%0' will be evaluated first">,
  InGroup<Parentheses>;
def note_precedence_conditional_first : Note<
  "place parentheses around the '?:' expression to evaluate it first">;

def warn_logical_instead_of_bitwise : Warning<
  "use of logical '%0' with constant operand">,
  InGroup<DiagGroup<"constant-logical-operand">>;
def note_logical_instead_of_bitwise_change_operator : Note<
  "use '%0' for a bitwise operation">;
def note_logical_instead_of_bitwise_remove_constant : Note<
  "remove constant to silence this warning">;

def warn_bitwise_op_in_bitwise_op : Warning<
  "'%0' within '%1'">, InGroup<BitwiseOpParentheses>;

def warn_logical_and_in_logical_or : Warning<
  "'&&' within '||'">, InGroup<LogicalOpParentheses>;

def warn_overloaded_shift_in_comparison :Warning<
  "overloaded operator %select{>>|<<}0 has higher precedence than "
  "comparison operator">,
  InGroup<OverloadedShiftOpParentheses>;
def note_evaluate_comparison_first :Note<
  "place parentheses around comparison expression to evaluate it first">;

def warn_addition_in_bitshift : Warning<
  "operator '%0' has lower precedence than '%1'; "
  "'%1' will be evaluated first">, InGroup<ShiftOpParentheses>;

def warn_self_assignment : Warning<
  "explicitly assigning value of variable of type %0 to itself">,
  InGroup<SelfAssignment>, DefaultIgnore;
def warn_self_move : Warning<
  "explicitly moving variable of type %0 to itself">,
  InGroup<SelfMove>, DefaultIgnore;

def warn_redundant_move_on_return : Warning<
  "redundant move in return statement">,
  InGroup<RedundantMove>, DefaultIgnore;
def warn_pessimizing_move_on_return : Warning<
  "moving a local object in a return statement prevents copy elision">,
  InGroup<PessimizingMove>, DefaultIgnore;
def warn_pessimizing_move_on_initialization : Warning<
  "moving a temporary object prevents copy elision">,
  InGroup<PessimizingMove>, DefaultIgnore;
def note_remove_move : Note<"remove std::move call here">;

def warn_string_plus_int : Warning<
  "adding %0 to a string does not append to the string">,
  InGroup<StringPlusInt>;
def warn_string_plus_char : Warning<
  "adding %0 to a string pointer does not append to the string">,
  InGroup<StringPlusChar>;
def note_string_plus_scalar_silence : Note<
  "use array indexing to silence this warning">;

def warn_sizeof_array_param : Warning<
  "sizeof on array function parameter will return size of %0 instead of %1">,
  InGroup<SizeofArrayArgument>;

def warn_sizeof_array_decay : Warning<
  "sizeof on pointer operation will return size of %0 instead of %1">,
  InGroup<SizeofArrayDecay>;

def err_sizeof_nonfragile_interface : Error<
  "application of '%select{alignof|sizeof}1' to interface %0 is "
  "not supported on this architecture and platform">;
def err_atdef_nonfragile_interface : Error<
  "use of @defs is not supported on this architecture and platform">;
def err_subscript_nonfragile_interface : Error<
  "subscript requires size of interface %0, which is not constant for "
  "this architecture and platform">;

def err_arithmetic_nonfragile_interface : Error<
  "arithmetic on pointer to interface %0, which is not a constant size for "
  "this architecture and platform">;


def ext_subscript_non_lvalue : Extension<
  "ISO C90 does not allow subscripting non-lvalue array">;
def err_typecheck_subscript_value : Error<
  "subscripted value is not an array, pointer, or vector">;
def err_typecheck_subscript_not_integer : Error<
  "array subscript is not an integer">;
def err_subscript_function_type : Error<
  "subscript of pointer to function type %0">;
def err_subscript_incomplete_type : Error<
  "subscript of pointer to incomplete type %0">;
def err_dereference_incomplete_type : Error<
  "dereference of pointer to incomplete type %0">;
def ext_gnu_subscript_void_type : Extension<
  "subscript of a pointer to void is a GNU extension">, InGroup<PointerArith>;
def err_typecheck_member_reference_struct_union : Error<
  "member reference base type %0 is not a structure or union">;
def err_typecheck_member_reference_ivar : Error<
  "%0 does not have a member named %1">;
def err_arc_weak_ivar_access : Error<
  "dereferencing a __weak pointer is not allowed due to possible "
  "null value caused by race condition, assign it to strong variable first">;
def err_typecheck_member_reference_arrow : Error<
  "member reference type %0 is not a pointer">;
def err_typecheck_member_reference_suggestion : Error<
  "member reference type %0 is %select{a|not a}1 pointer; did you mean to use '%select{->|.}1'?">;
def note_typecheck_member_reference_suggestion : Note<
  "did you mean to use '.' instead?">;
def note_member_reference_arrow_from_operator_arrow : Note<
  "'->' applied to return value of the operator->() declared here">;
def err_typecheck_member_reference_type : Error<
  "cannot refer to type member %0 in %1 with '%select{.|->}2'">;
def err_typecheck_member_reference_unknown : Error<
  "cannot refer to member %0 in %1 with '%select{.|->}2'">;
def err_member_reference_needs_call : Error<
  "base of member reference is a function; perhaps you meant to call "
  "it%select{| with no arguments}0?">;
def warn_subscript_is_char : Warning<"array subscript is of type 'char'">,
  InGroup<CharSubscript>, DefaultIgnore;

def err_typecheck_incomplete_tag : Error<"incomplete definition of type %0">;
def err_no_member : Error<"no member named %0 in %1">;
def err_no_member_overloaded_arrow : Error<
  "no member named %0 in %1; did you mean to use '->' instead of '.'?">;

def err_member_not_yet_instantiated : Error<
  "no member %0 in %1; it has not yet been instantiated">;
def note_non_instantiated_member_here : Note<
  "not-yet-instantiated member is declared here">;

def err_enumerator_does_not_exist : Error<
  "enumerator %0 does not exist in instantiation of %1">;
def note_enum_specialized_here : Note<
  "enum %0 was explicitly specialized here">;

def err_specialization_not_primary_template : Error<
  "cannot reference member of primary template because deduced class "
  "template specialization %0 is %select{instantiated from a partial|"
  "an explicit}1 specialization">;

def err_member_redeclared : Error<"class member cannot be redeclared">;
def ext_member_redeclared : ExtWarn<"class member cannot be redeclared">,
  InGroup<RedeclaredClassMember>;
def err_member_redeclared_in_instantiation : Error<
  "multiple overloads of %0 instantiate to the same signature %1">;
def err_member_name_of_class : Error<"member %0 has the same name as its class">;
def err_member_def_undefined_record : Error<
  "out-of-line definition of %0 from class %1 without definition">;
def err_member_decl_does_not_match : Error<
  "out-of-line %select{declaration|definition}2 of %0 "
  "does not match any declaration in %1">;
def err_friend_decl_with_def_arg_must_be_def : Error<
  "friend declaration specifying a default argument must be a definition">;
def err_friend_decl_with_def_arg_redeclared : Error<
  "friend declaration specifying a default argument must be the only declaration">;
def err_friend_decl_does_not_match : Error<
  "friend declaration of %0 does not match any declaration in %1">;
def err_member_decl_does_not_match_suggest : Error<
  "out-of-line %select{declaration|definition}2 of %0 "
  "does not match any declaration in %1; did you mean %3?">;
def err_member_def_does_not_match_ret_type : Error<
  "return type of out-of-line definition of %q0 differs from "
  "that in the declaration">;
def err_nonstatic_member_out_of_line : Error<
  "non-static data member defined out-of-line">;
def err_qualified_typedef_declarator : Error<
  "typedef declarator cannot be qualified">;
def err_qualified_param_declarator : Error<
  "parameter declarator cannot be qualified">;
def ext_out_of_line_declaration : ExtWarn<
  "out-of-line declaration of a member must be a definition">,
  InGroup<OutOfLineDeclaration>, DefaultError;
def err_member_extra_qualification : Error<
  "extra qualification on member %0">;
def warn_member_extra_qualification : Warning<
  err_member_extra_qualification.Text>, InGroup<MicrosoftExtraQualification>;
def warn_namespace_member_extra_qualification : Warning<
  "extra qualification on member %0">,
  InGroup<DiagGroup<"extra-qualification">>;
def err_member_qualification : Error<
  "non-friend class member %0 cannot have a qualified name">;  
def note_member_def_close_match : Note<"member declaration nearly matches">;
def note_member_def_close_const_match : Note<
  "member declaration does not match because "
  "it %select{is|is not}0 const qualified">;
def note_member_def_close_param_match : Note<
  "type of %ordinal0 parameter of member declaration does not match definition"
  "%diff{ ($ vs $)|}1,2">;
def note_local_decl_close_match : Note<"local declaration nearly matches">;
def note_local_decl_close_param_match : Note<
  "type of %ordinal0 parameter of local declaration does not match definition"
  "%diff{ ($ vs $)|}1,2">;
def err_typecheck_ivar_variable_size : Error<
  "instance variables must have a constant size">;
def err_ivar_reference_type : Error<
  "instance variables cannot be of reference type">;
def err_typecheck_illegal_increment_decrement : Error<
  "cannot %select{decrement|increment}1 value of type %0">;
def err_typecheck_expect_int : Error<
  "used type %0 where integer is required">;
def err_typecheck_arithmetic_incomplete_type : Error<
  "arithmetic on a pointer to an incomplete type %0">;
def err_typecheck_pointer_arith_function_type : Error<
  "arithmetic on%select{ a|}0 pointer%select{|s}0 to%select{ the|}2 "
  "function type%select{|s}2 %1%select{| and %3}2">;
def err_typecheck_pointer_arith_void_type : Error<
  "arithmetic on%select{ a|}0 pointer%select{|s}0 to void">;
def err_typecheck_decl_incomplete_type : Error<
  "variable has incomplete type %0">;
def ext_typecheck_decl_incomplete_type : ExtWarn<
  "tentative definition of variable with internal linkage has incomplete non-array type %0">,
  InGroup<DiagGroup<"tentative-definition-incomplete-type">>;
def err_tentative_def_incomplete_type : Error<
  "tentative definition has type %0 that is never completed">;
def warn_tentative_incomplete_array : Warning<
  "tentative array definition assumed to have one element">;
def err_typecheck_incomplete_array_needs_initializer : Error<
  "definition of variable with array type needs an explicit size "
  "or an initializer">;
def err_array_init_not_init_list : Error<
  "array initializer must be an initializer "
  "list%select{| or string literal| or wide string literal}0">;
def err_array_init_narrow_string_into_wchar : Error<
  "initializing wide char array with non-wide string literal">;
def err_array_init_wide_string_into_char : Error<
  "initializing char array with wide string literal">;
def err_array_init_incompat_wide_string_into_wchar : Error<
  "initializing wide char array with incompatible wide string literal">;
def err_array_init_different_type : Error<
  "cannot initialize array %diff{of type $ with array of type $|"
  "with different type of array}0,1">;
def err_array_init_non_constant_array : Error<
  "cannot initialize array %diff{of type $ with non-constant array of type $|"
  "with different type of array}0,1">;
def ext_array_init_copy : Extension<
  "initialization of an array "
  "%diff{of type $ from a compound literal of type $|"
  "from a compound literal}0,1 is a GNU extension">, InGroup<GNUCompoundLiteralInitializer>;
// This is intentionally not disabled by -Wno-gnu.
def ext_array_init_parens : ExtWarn<
  "parenthesized initialization of a member array is a GNU extension">,
  InGroup<DiagGroup<"gnu-array-member-paren-init">>, DefaultError;
def warn_deprecated_string_literal_conversion : Warning<
  "conversion from string literal to %0 is deprecated">,
  InGroup<CXX11CompatDeprecatedWritableStr>;
def ext_deprecated_string_literal_conversion : ExtWarn<
  "ISO C++11 does not allow conversion from string literal to %0">,
  InGroup<WritableStrings>, SFINAEFailure;
def err_realimag_invalid_type : Error<"invalid type %0 to %1 operator">;
def err_typecheck_sclass_fscope : Error<
  "illegal storage class on file-scoped variable">;
def warn_standalone_specifier : Warning<"'%0' ignored on this declaration">,
  InGroup<MissingDeclarations>;
def ext_standalone_specifier : ExtWarn<"'%0' is not permitted on a declaration "
  "of a type">, InGroup<MissingDeclarations>;
def err_standalone_class_nested_name_specifier : Error<
  "forward declaration of %select{class|struct|interface|union|enum}0 cannot "
  "have a nested name specifier">;
def err_typecheck_sclass_func : Error<"illegal storage class on function">;
def err_static_block_func : Error<
  "function declared in block scope cannot have 'static' storage class">;
def err_typecheck_address_of : Error<"address of %select{bit-field"
  "|vector element|property expression|register variable}0 requested">;
def ext_typecheck_addrof_void : Extension<
  "ISO C forbids taking the address of an expression of type 'void'">;
def err_unqualified_pointer_member_function : Error<
  "must explicitly qualify name of member function when taking its address">;
def err_invalid_form_pointer_member_function : Error<
  "cannot create a non-constant pointer to member function">;
def err_address_of_function_with_pass_object_size_params: Error<
  "cannot take address of function %0 because parameter %1 has "
  "pass_object_size attribute">;
def err_parens_pointer_member_function : Error<
  "cannot parenthesize the name of a method when forming a member pointer">;
def err_typecheck_invalid_lvalue_addrof_addrof_function : Error<
  "extra '&' taking address of overloaded function">;
def err_typecheck_invalid_lvalue_addrof : Error<
  "cannot take the address of an rvalue of type %0">;
def ext_typecheck_addrof_temporary : ExtWarn<
  "taking the address of a temporary object of type %0">, 
  InGroup<AddressOfTemporary>, DefaultError;
def err_typecheck_addrof_temporary : Error<
  "taking the address of a temporary object of type %0">;
def err_typecheck_addrof_dtor : Error<
  "taking the address of a destructor">;
def err_typecheck_unary_expr : Error<
  "invalid argument type %0 to unary expression">;
def err_typecheck_indirection_requires_pointer : Error<
  "indirection requires pointer operand (%0 invalid)">;
def ext_typecheck_indirection_through_void_pointer : ExtWarn<
  "ISO C++ does not allow indirection on operand of type %0">,
  InGroup<DiagGroup<"void-ptr-dereference">>;
def warn_indirection_through_null : Warning<
  "indirection of non-volatile null pointer will be deleted, not trap">,
  InGroup<NullDereference>;
def warn_binding_null_to_reference : Warning<
  "binding dereferenced null pointer to reference has undefined behavior">,
  InGroup<NullDereference>;
def note_indirection_through_null : Note<
  "consider using __builtin_trap() or qualifying pointer with 'volatile'">;
def warn_pointer_indirection_from_incompatible_type : Warning<
  "dereference of type %1 that was reinterpret_cast from type %0 has undefined "
  "behavior">,
  InGroup<UndefinedReinterpretCast>, DefaultIgnore;
def warn_taking_address_of_packed_member : Warning<
  "taking address of packed member %0 of class or structure %q1 may result in an unaligned pointer value">,
  InGroup<DiagGroup<"address-of-packed-member">>;

def err_objc_object_assignment : Error<
  "cannot assign to class object (%0 invalid)">;
def err_typecheck_invalid_operands : Error<
  "invalid operands to binary expression (%0 and %1)">;
def err_typecheck_logical_vector_expr_gnu_cpp_restrict : Error<
  "logical expression with vector %select{type %1 and non-vector type %2|types"
  " %1 and %2}0 is only supported in C++">;
def err_typecheck_sub_ptr_compatible : Error<
  "%diff{$ and $ are not pointers to compatible types|"
  "pointers to incompatible types}0,1">;
def ext_typecheck_ordered_comparison_of_pointer_integer : ExtWarn<
  "ordered comparison between pointer and integer (%0 and %1)">;
def ext_typecheck_ordered_comparison_of_pointer_and_zero : Extension<
  "ordered comparison between pointer and zero (%0 and %1) is an extension">;
def err_typecheck_ordered_comparison_of_pointer_and_zero : Error<
  "ordered comparison between pointer and zero (%0 and %1)">;
def ext_typecheck_ordered_comparison_of_function_pointers : ExtWarn<
  "ordered comparison of function pointers (%0 and %1)">;
def ext_typecheck_comparison_of_fptr_to_void : Extension<
  "equality comparison between function pointer and void pointer (%0 and %1)">;
def err_typecheck_comparison_of_fptr_to_void : Error<
  "equality comparison between function pointer and void pointer (%0 and %1)">;
def ext_typecheck_comparison_of_pointer_integer : ExtWarn<
  "comparison between pointer and integer (%0 and %1)">;
def err_typecheck_comparison_of_pointer_integer : Error<
  "comparison between pointer and integer (%0 and %1)">;
def ext_typecheck_comparison_of_distinct_pointers : ExtWarn<
  "comparison of distinct pointer types%diff{ ($ and $)|}0,1">,
  InGroup<CompareDistinctPointerType>;
def ext_typecheck_cond_incompatible_operands : ExtWarn<
  "incompatible operand types (%0 and %1)">;
def err_cond_voidptr_arc : Error <
  "operands to conditional of types%diff{ $ and $|}0,1 are incompatible "
  "in ARC mode">;
def err_typecheck_comparison_of_distinct_pointers : Error<
  "comparison of distinct pointer types%diff{ ($ and $)|}0,1">;
def err_typecheck_op_on_nonoverlapping_address_space_pointers : Error<
  "%select{comparison between %diff{ ($ and $)|}0,1"
  "|arithmetic operation with operands of type %diff{ ($ and $)|}0,1"
  "|conditional operator with the second and third operands of type "
  "%diff{ ($ and $)|}0,1}2"
  " which are pointers to non-overlapping address spaces">;

def err_typecheck_assign_const : Error<
  "%select{"
  "cannot assign to return value because function %1 returns a const value|"
  "cannot assign to variable %1 with const-qualified type %2|"
  "cannot assign to %select{non-|}1static data member %2 "
  "with const-qualified type %3|"
  "cannot assign to non-static data member within const member function %1|"
  "read-only variable is not assignable}0">;

def note_typecheck_assign_const : Note<
  "%select{"
  "function %1 which returns const-qualified type %2 declared here|"
  "variable %1 declared const here|"
  "%select{non-|}1static data member %2 declared const here|"
  "member function %q1 is declared const here}0">;

def warn_mixed_sign_comparison : Warning<
  "comparison of integers of different signs: %0 and %1">,
  InGroup<SignCompare>, DefaultIgnore;
def warn_lunsigned_always_true_comparison : Warning<
  "comparison of unsigned%select{| enum}2 expression %0 is always %1">,
  InGroup<TautologicalCompare>;
def warn_out_of_range_compare : Warning<
  "comparison of %select{constant %0|true|false}1 with " 
  "%select{expression of type %2|boolean expression}3 is always "
  "%select{false|true}4">, InGroup<TautologicalOutOfRangeCompare>;
def warn_runsigned_always_true_comparison : Warning<
  "comparison of %0 unsigned%select{| enum}2 expression is always %1">,
  InGroup<TautologicalCompare>;
def warn_comparison_of_mixed_enum_types : Warning<
  "comparison of two values with different enumeration types"
  "%diff{ ($ and $)|}0,1">,
  InGroup<DiagGroup<"enum-compare">>;
def warn_null_in_arithmetic_operation : Warning<
  "use of NULL in arithmetic operation">,
  InGroup<NullArithmetic>;
def warn_null_in_comparison_operation : Warning<
  "comparison between NULL and non-pointer "
  "%select{(%1 and NULL)|(NULL and %1)}0">,
  InGroup<NullArithmetic>;
def err_shift_rhs_only_vector : Error<
  "requested shift is a vector of type %0 but the first operand is not a "
  "vector (%1)">;

def warn_logical_not_on_lhs_of_check : Warning<
  "logical not is only applied to the left hand side of this "
  "%select{comparison|bitwise operator}0">,
  InGroup<LogicalNotParentheses>;
def note_logical_not_fix : Note<
  "add parentheses after the '!' to evaluate the "
  "%select{comparison|bitwise operator}0 first">;
def note_logical_not_silence_with_parens : Note<
  "add parentheses around left hand side expression to silence this warning">;

def err_invalid_this_use : Error<
  "invalid use of 'this' outside of a non-static member function">;
def err_this_static_member_func : Error<
  "'this' cannot be%select{| implicitly}0 used in a static member function "
  "declaration">;
def err_invalid_member_use_in_static_method : Error<
  "invalid use of member %0 in static member function">;
def err_invalid_qualified_function_type : Error<
  "%select{non-member function|static member function|deduction guide}0 "
  "%select{of type %2 |}1cannot have '%3' qualifier">;
def err_compound_qualified_function_type : Error<
  "%select{block pointer|pointer|reference}0 to function type %select{%2 |}1"
  "cannot have '%3' qualifier">;

def err_ref_qualifier_overload : Error<
  "cannot overload a member function %select{without a ref-qualifier|with "
  "ref-qualifier '&'|with ref-qualifier '&&'}0 with a member function %select{"
  "without a ref-qualifier|with ref-qualifier '&'|with ref-qualifier '&&'}1">;

def err_invalid_non_static_member_use : Error<
  "invalid use of non-static data member %0">;
def err_nested_non_static_member_use : Error<
  "%select{call to non-static member function|use of non-static data member}0 "
  "%2 of %1 from nested type %3">;
def warn_cxx98_compat_non_static_member_use : Warning<
  "use of non-static data member %0 in an unevaluated context is "
  "incompatible with C++98">, InGroup<CXX98Compat>, DefaultIgnore;
def err_invalid_incomplete_type_use : Error<
  "invalid use of incomplete type %0">;
def err_builtin_func_cast_more_than_one_arg : Error<
  "function-style cast to a builtin type can only take one argument">;
def err_value_init_for_array_type : Error<
  "array types cannot be value-initialized">;
def err_init_for_function_type : Error<
  "cannot create object of function type %0">;
def warn_format_nonliteral_noargs : Warning<
  "format string is not a string literal (potentially insecure)">,
  InGroup<FormatSecurity>;
def warn_format_nonliteral : Warning<
  "format string is not a string literal">,
  InGroup<FormatNonLiteral>, DefaultIgnore;

def err_unexpected_interface : Error<
  "unexpected interface name %0: expected expression">;
def err_ref_non_value : Error<"%0 does not refer to a value">;
def err_ref_vm_type : Error<
  "cannot refer to declaration with a variably modified type inside block">;
def err_ref_flexarray_type : Error<
  "cannot refer to declaration of structure variable with flexible array member "
  "inside block">;
def err_ref_array_type : Error<
  "cannot refer to declaration with an array type inside block">;
def err_property_not_found : Error<
  "property %0 not found on object of type %1">;
def err_invalid_property_name : Error<
  "%0 is not a valid property name (accessing an object of type %1)">;
def err_getter_not_found : Error<
  "no getter method for read from property">;
def err_objc_subscript_method_not_found : Error<
  "expected method to %select{read|write}1 %select{dictionary|array}2 element not "
  "found on object of type %0">;
def err_objc_subscript_index_type : Error<
  "method index parameter type %0 is not integral type">;
def err_objc_subscript_key_type : Error<
  "method key parameter type %0 is not object type">;
def err_objc_subscript_dic_object_type : Error<
  "method object parameter type %0 is not object type">;
def err_objc_subscript_object_type : Error<
  "cannot assign to this %select{dictionary|array}1 because assigning method's "
  "2nd parameter of type %0 is not an Objective-C pointer type">;
def err_objc_subscript_base_type : Error<
  "%select{dictionary|array}1 subscript base type %0 is not an Objective-C object">;
def err_objc_multiple_subscript_type_conversion : Error<
  "indexing expression is invalid because subscript type %0 has "
  "multiple type conversion functions">;
def err_objc_subscript_type_conversion : Error<
  "indexing expression is invalid because subscript type %0 is not an integral"
  " or Objective-C pointer type">;
def err_objc_subscript_pointer : Error<
  "indexing expression is invalid because subscript type %0 is not an"
  " Objective-C pointer">;
def err_objc_indexing_method_result_type : Error<
  "method for accessing %select{dictionary|array}1 element must have Objective-C"
  " object return type instead of %0">;
def err_objc_index_incomplete_class_type : Error<
  "Objective-C index expression has incomplete class type %0">;
def err_illegal_container_subscripting_op : Error<
  "illegal operation on Objective-C container subscripting">;
def err_property_not_found_forward_class : Error<
  "property %0 cannot be found in forward class object %1">;
def err_property_not_as_forward_class : Error<
  "property %0 refers to an incomplete Objective-C class %1 "
  "(with no @interface available)">;
def note_forward_class : Note<
  "forward declaration of class here">;
def err_duplicate_property : Error<
  "property has a previous declaration">;
def ext_gnu_void_ptr : Extension<
  "arithmetic on%select{ a|}0 pointer%select{|s}0 to void is a GNU extension">,
  InGroup<PointerArith>;
def ext_gnu_ptr_func_arith : Extension<
  "arithmetic on%select{ a|}0 pointer%select{|s}0 to%select{ the|}2 function "
  "type%select{|s}2 %1%select{| and %3}2 is a GNU extension">,
  InGroup<PointerArith>;
def err_readonly_message_assignment : Error<
  "assigning to 'readonly' return result of an Objective-C message not allowed">;
def ext_integer_increment_complex : Extension<
  "ISO C does not support '++'/'--' on complex integer type %0">;
def ext_integer_complement_complex : Extension<
  "ISO C does not support '~' for complex conjugation of %0">;
def err_nosetter_property_assignment : Error<
  "%select{assignment to readonly property|"
  "no setter method %1 for assignment to property}0">;
def err_nosetter_property_incdec : Error<
  "%select{%select{increment|decrement}1 of readonly property|"
  "no setter method %2 for %select{increment|decrement}1 of property}0">;
def err_nogetter_property_compound_assignment : Error<
  "a getter method is needed to perform a compound assignment on a property">;
def err_nogetter_property_incdec : Error<
  "no getter method %1 for %select{increment|decrement}0 of property">;
def err_no_subobject_property_setting : Error<
  "expression is not assignable">;
def err_qualified_objc_access : Error<
  "%select{property|instance variable}0 access cannot be qualified with '%1'">;
  
def ext_freestanding_complex : Extension<
  "complex numbers are an extension in a freestanding C99 implementation">;

// FIXME: Remove when we support imaginary.
def err_imaginary_not_supported : Error<"imaginary types are not supported">;

// Obj-c expressions
def warn_root_inst_method_not_found : Warning<
  "instance method %0 is being used on 'Class' which is not in the root class">,
  InGroup<MethodAccess>;
def warn_class_method_not_found : Warning<
  "class method %objcclass0 not found (return type defaults to 'id')">,
  InGroup<MethodAccess>;
def warn_instance_method_on_class_found : Warning<
  "instance method %0 found instead of class method %1">,
  InGroup<MethodAccess>;
def warn_inst_method_not_found : Warning<
  "instance method %objcinstance0 not found (return type defaults to 'id')">,
  InGroup<MethodAccess>;
def warn_instance_method_not_found_with_typo : Warning<
  "instance method %objcinstance0 not found (return type defaults to 'id')"
  "; did you mean %objcinstance2?">, InGroup<MethodAccess>;
def warn_class_method_not_found_with_typo : Warning<
  "class method %objcclass0 not found (return type defaults to 'id')"
  "; did you mean %objcclass2?">, InGroup<MethodAccess>;
def err_method_not_found_with_typo : Error<
  "%select{instance|class}1 method %0 not found "
  "; did you mean %2?">;
def err_no_super_class_message : Error<
  "no @interface declaration found in class messaging of %0">;
def err_root_class_cannot_use_super : Error<
  "%0 cannot use 'super' because it is a root class">;
def err_invalid_receiver_to_message_super : Error<
  "'super' is only valid in a method body">;
def err_invalid_receiver_class_message : Error<
  "receiver type %0 is not an Objective-C class">;
def err_missing_open_square_message_send : Error<
  "missing '[' at start of message send expression">;
def warn_bad_receiver_type : Warning<
  "receiver type %0 is not 'id' or interface pointer, consider "
  "casting it to 'id'">,InGroup<ObjCReceiver>;
def err_bad_receiver_type : Error<"bad receiver type %0">;
def err_incomplete_receiver_type : Error<"incomplete receiver type %0">;
def err_unknown_receiver_suggest : Error<
  "unknown receiver %0; did you mean %1?">;
def err_objc_throw_expects_object : Error<
  "@throw requires an Objective-C object type (%0 invalid)">;
def err_objc_synchronized_expects_object : Error<
  "@synchronized requires an Objective-C object type (%0 invalid)">;
def err_rethrow_used_outside_catch : Error<
  "@throw (rethrow) used outside of a @catch block">;
def err_attribute_multiple_objc_gc : Error<
  "multiple garbage collection attributes specified for type">;
def err_catch_param_not_objc_type : Error<
  "@catch parameter is not a pointer to an interface type">;
def err_illegal_qualifiers_on_catch_parm : Error<
  "illegal qualifiers on @catch parameter">;
def err_storage_spec_on_catch_parm : Error<
  "@catch parameter cannot have storage specifier '%0'">;
def warn_register_objc_catch_parm : Warning<
  "'register' storage specifier on @catch parameter will be ignored">;
def err_qualified_objc_catch_parm : Error<
  "@catch parameter declarator cannot be qualified">;
def warn_objc_pointer_cxx_catch_fragile : Warning<
  "cannot catch an exception thrown with @throw in C++ in the non-unified "
  "exception model">, InGroup<ObjCNonUnifiedException>;
def err_objc_object_catch : Error<
  "cannot catch an Objective-C object by value">;
def err_incomplete_type_objc_at_encode : Error<
  "'@encode' of incomplete type %0">;
def warn_objc_circular_container : Warning<
  "adding '%0' to '%1' might cause circular dependency in container">,
  InGroup<DiagGroup<"objc-circular-container">>;
def note_objc_circular_container_declared_here : Note<"'%0' declared here">;
def warn_objc_unsafe_perform_selector : Warning<
  "%0 is incompatible with selectors that return a "
  "%select{struct|union|vector}1 type">,
  InGroup<DiagGroup<"objc-unsafe-perform-selector">>;
def note_objc_unsafe_perform_selector_method_declared_here :  Note<
  "method %0 that returns %1 declared here">;

def warn_setter_getter_impl_required : Warning<
  "property %0 requires method %1 to be defined - "
  "use @synthesize, @dynamic or provide a method implementation "
  "in this class implementation">,
  InGroup<ObjCPropertyImpl>;
def warn_setter_getter_impl_required_in_category : Warning<
  "property %0 requires method %1 to be defined - "
  "use @dynamic or provide a method implementation in this category">,
  InGroup<ObjCPropertyImpl>;
def note_parameter_named_here : Note<
  "passing argument to parameter %0 here">;
def note_parameter_here : Note<
  "passing argument to parameter here">;
def note_method_return_type_change : Note<
  "compiler has implicitly changed method %0 return type">;

def warn_impl_required_for_class_property : Warning<
  "class property %0 requires method %1 to be defined - "
  "use @dynamic or provide a method implementation "
  "in this class implementation">,
  InGroup<ObjCPropertyImpl>;
def warn_impl_required_in_category_for_class_property : Warning<
  "class property %0 requires method %1 to be defined - "
  "use @dynamic or provide a method implementation in this category">,
  InGroup<ObjCPropertyImpl>;

// C++ casts
// These messages adhere to the TryCast pattern: %0 is an int specifying the
// cast type, %1 is the source type, %2 is the destination type.
def err_bad_reinterpret_cast_overload : Error<
  "reinterpret_cast cannot resolve overloaded function %0 to type %1">;

def warn_reinterpret_different_from_static : Warning<
  "'reinterpret_cast' %select{from|to}3 class %0 %select{to|from}3 its "
  "%select{virtual base|base at non-zero offset}2 %1 behaves differently from "
  "'static_cast'">, InGroup<ReinterpretBaseClass>;
def note_reinterpret_updowncast_use_static: Note<
  "use 'static_cast' to adjust the pointer correctly while "
  "%select{upcasting|downcasting}0">;

def err_bad_static_cast_overload : Error<
  "address of overloaded function %0 cannot be static_cast to type %1">;

def err_bad_cstyle_cast_overload : Error<
  "address of overloaded function %0 cannot be cast to type %1">;


def err_bad_cxx_cast_generic : Error<
  "%select{const_cast|static_cast|reinterpret_cast|dynamic_cast|C-style cast|"
  "functional-style cast}0 from %1 to %2 is not allowed">;
def err_bad_cxx_cast_unrelated_class : Error<
  "%select{const_cast|static_cast|reinterpret_cast|dynamic_cast|C-style cast|"
  "functional-style cast}0 from %1 to %2, which are not related by "
  "inheritance, is not allowed">;
def note_type_incomplete : Note<"%0 is incomplete">;
def err_bad_cxx_cast_rvalue : Error<
  "%select{const_cast|static_cast|reinterpret_cast|dynamic_cast|C-style cast|"
  "functional-style cast}0 from rvalue to reference type %2">;
def err_bad_cxx_cast_bitfield : Error<
  "%select{const_cast|static_cast|reinterpret_cast|dynamic_cast|C-style cast|"
  "functional-style cast}0 from bit-field lvalue to reference type %2">;
def err_bad_cxx_cast_qualifiers_away : Error<
  "%select{const_cast|static_cast|reinterpret_cast|dynamic_cast|C-style cast|"
  "functional-style cast}0 from %1 to %2 casts away qualifiers">;
def err_bad_const_cast_dest : Error<
  "%select{const_cast||||C-style cast|functional-style cast}0 to %2, "
  "which is not a reference, pointer-to-object, or pointer-to-data-member">;
def ext_cast_fn_obj : Extension<
  "cast between pointer-to-function and pointer-to-object is an extension">;
def ext_ms_cast_fn_obj : ExtWarn<
  "static_cast between pointer-to-function and pointer-to-object is a "
  "Microsoft extension">, InGroup<MicrosoftCast>;
def warn_cxx98_compat_cast_fn_obj : Warning<
  "cast between pointer-to-function and pointer-to-object is incompatible with C++98">,
  InGroup<CXX98CompatPedantic>, DefaultIgnore;
def err_bad_reinterpret_cast_small_int : Error<
  "cast from pointer to smaller type %2 loses information">;
def err_bad_cxx_cast_vector_to_scalar_different_size : Error<
  "%select{||reinterpret_cast||C-style cast|}0 from vector %1 " 
  "to scalar %2 of different size">;
def err_bad_cxx_cast_scalar_to_vector_different_size : Error<
  "%select{||reinterpret_cast||C-style cast|}0 from scalar %1 " 
  "to vector %2 of different size">;
def err_bad_cxx_cast_vector_to_vector_different_size : Error<
  "%select{||reinterpret_cast||C-style cast|}0 from vector %1 " 
  "to vector %2 of different size">;
def err_bad_lvalue_to_rvalue_cast : Error<
  "cannot cast from lvalue of type %1 to rvalue reference type %2; types are "
  "not compatible">;
def err_bad_rvalue_to_rvalue_cast : Error<
  "cannot cast from rvalue of type %1 to rvalue reference type %2; types are "
  "not compatible">;
def err_bad_static_cast_pointer_nonpointer : Error<
  "cannot cast from type %1 to pointer type %2">;
def err_bad_static_cast_member_pointer_nonmp : Error<
  "cannot cast from type %1 to member pointer type %2">;
def err_bad_cxx_cast_member_pointer_size : Error<
  "cannot %select{||reinterpret_cast||C-style cast|}0 from member pointer "
  "type %1 to member pointer type %2 of different size">;
def err_bad_reinterpret_cast_reference : Error<
  "reinterpret_cast of a %0 to %1 needs its address, which is not allowed">;
def warn_undefined_reinterpret_cast : Warning<
  "reinterpret_cast from %0 to %1 has undefined behavior">,
  InGroup<UndefinedReinterpretCast>, DefaultIgnore;

// These messages don't adhere to the pattern.
// FIXME: Display the path somehow better.
def err_ambiguous_base_to_derived_cast : Error<
  "ambiguous cast from base %0 to derived %1:%2">;
def err_static_downcast_via_virtual : Error<
  "cannot cast %0 to %1 via virtual base %2">;
def err_downcast_from_inaccessible_base : Error<
  "cannot cast %select{private|protected}2 base class %1 to %0">;
def err_upcast_to_inaccessible_base : Error<
  "cannot cast %0 to its %select{private|protected}2 base class %1">;
def err_bad_dynamic_cast_not_ref_or_ptr : Error<
  "%0 is not a reference or pointer">;
def err_bad_dynamic_cast_not_class : Error<"%0 is not a class">;
def err_bad_dynamic_cast_incomplete : Error<"%0 is an incomplete type">;
def err_bad_dynamic_cast_not_ptr : Error<"%0 is not a pointer">;
def err_bad_dynamic_cast_not_polymorphic : Error<"%0 is not polymorphic">;

// Other C++ expressions
def err_need_header_before_typeid : Error<
  "you need to include <typeinfo> before using the 'typeid' operator">;
def err_need_header_before_ms_uuidof : Error<
  "you need to include <guiddef.h> before using the '__uuidof' operator">;
def err_ms___leave_not_in___try : Error<
  "'__leave' statement not in __try block">;
def err_uuidof_without_guid : Error<
  "cannot call operator __uuidof on a type with no GUID">;
def err_uuidof_with_multiple_guids : Error<
  "cannot call operator __uuidof on a type with multiple GUIDs">;
def err_incomplete_typeid : Error<"'typeid' of incomplete type %0">;
def err_variably_modified_typeid : Error<"'typeid' of variably modified type %0">;
def err_static_illegal_in_new : Error<
  "the 'static' modifier for the array size is not legal in new expressions">;
def err_array_new_needs_size : Error<
  "array size must be specified in new expressions">;
def err_bad_new_type : Error<
  "cannot allocate %select{function|reference}1 type %0 with new">;
def err_new_incomplete_type : Error<
  "allocation of incomplete type %0">;
def err_new_array_nonconst : Error<
  "only the first dimension of an allocated array may have dynamic size">;
def err_new_array_init_args : Error<
  "array 'new' cannot have initialization arguments">;
def ext_new_paren_array_nonconst : ExtWarn<
  "when type is in parentheses, array cannot have dynamic size">;
def err_placement_new_non_placement_delete : Error<
  "'new' expression with placement arguments refers to non-placement "
  "'operator delete'">;
def err_array_size_not_integral : Error<
  "array size expression must have integral or %select{|unscoped }0"
  "enumeration type, not %1">;
def err_array_size_incomplete_type : Error<
  "array size expression has incomplete class type %0">;
def err_array_size_explicit_conversion : Error<
  "array size expression of type %0 requires explicit conversion to type %1">;
def note_array_size_conversion : Note<
  "conversion to %select{integral|enumeration}0 type %1 declared here">;
def err_array_size_ambiguous_conversion : Error<
  "ambiguous conversion of array size expression of type %0 to an integral or "
  "enumeration type">;
def ext_array_size_conversion : Extension<
  "implicit conversion from array size expression of type %0 to "
  "%select{integral|enumeration}1 type %2 is a C++11 extension">,
  InGroup<CXX11>;
def warn_cxx98_compat_array_size_conversion : Warning<
  "implicit conversion from array size expression of type %0 to "
  "%select{integral|enumeration}1 type %2 is incompatible with C++98">,
  InGroup<CXX98CompatPedantic>, DefaultIgnore;
def err_address_space_qualified_new : Error<
  "'new' cannot allocate objects of type %0 in address space '%1'">;
def err_address_space_qualified_delete : Error<
  "'delete' cannot delete objects of type %0 in address space '%1'">;

def err_default_init_const : Error<
  "default initialization of an object of const type %0"
  "%select{| without a user-provided default constructor}1">;
def ext_default_init_const : ExtWarn<
  "default initialization of an object of const type %0"
  "%select{| without a user-provided default constructor}1 "
  "is a Microsoft extension">,
  InGroup<MicrosoftConstInit>;
def err_delete_operand : Error<"cannot delete expression of type %0">;
def ext_delete_void_ptr_operand : ExtWarn<
  "cannot delete expression with pointer-to-'void' type %0">,
  InGroup<DeleteIncomplete>;
def err_ambiguous_delete_operand : Error<
  "ambiguous conversion of delete expression of type %0 to a pointer">;
def warn_delete_incomplete : Warning<
  "deleting pointer to incomplete type %0 may cause undefined behavior">,
  InGroup<DeleteIncomplete>;
def err_delete_incomplete_class_type : Error<
  "deleting incomplete class type %0; no conversions to pointer type">;
def err_delete_explicit_conversion : Error<
  "converting delete expression from type %0 to type %1 invokes an explicit "
  "conversion function">;
def note_delete_conversion : Note<"conversion to pointer type %0">;
def warn_delete_array_type : Warning<
  "'delete' applied to a pointer-to-array type %0 treated as 'delete[]'">;
def warn_mismatched_delete_new : Warning<
  "'delete%select{|[]}0' applied to a pointer that was allocated with "
  "'new%select{[]|}0'; did you mean 'delete%select{[]|}0'?">,
  InGroup<DiagGroup<"mismatched-new-delete">>;
def note_allocated_here : Note<"allocated with 'new%select{[]|}0' here">;
def err_no_suitable_delete_member_function_found : Error<
  "no suitable member %0 in %1">;
def err_ambiguous_suitable_delete_member_function_found : Error<
  "multiple suitable %0 functions in %1">;
def warn_ambiguous_suitable_delete_function_found : Warning<
  "multiple suitable %0 functions for %1; no 'operator delete' function "
  "will be invoked if initialization throws an exception">,
  InGroup<DiagGroup<"ambiguous-delete">>;
def note_member_declared_here : Note<
  "member %0 declared here">;
def note_member_first_declared_here : Note<
  "member %0 first declared here">;
def err_decrement_bool : Error<"cannot decrement expression of type bool">;
def warn_increment_bool : Warning<
  "incrementing expression of type bool is deprecated and "
  "incompatible with C++17">, InGroup<DeprecatedIncrementBool>;
def ext_increment_bool : ExtWarn<
  "ISO C++17 does not allow incrementing expression of type bool">,
  DefaultError, InGroup<IncrementBool>;
def err_increment_decrement_enum : Error<
  "cannot %select{decrement|increment}0 expression of enum type %1">;
def err_catch_incomplete_ptr : Error<
  "cannot catch pointer to incomplete type %0">;
def err_catch_incomplete_ref : Error<
  "cannot catch reference to incomplete type %0">;
def err_catch_incomplete : Error<"cannot catch incomplete type %0">;
def err_catch_rvalue_ref : Error<"cannot catch exceptions by rvalue reference">;
def err_catch_variably_modified : Error<
  "cannot catch variably modified type %0">;
def err_qualified_catch_declarator : Error<
  "exception declarator cannot be qualified">;
def err_early_catch_all : Error<"catch-all handler must come last">;
def err_bad_memptr_rhs : Error<
  "right hand operand to %0 has non-pointer-to-member type %1">;
def err_bad_memptr_lhs : Error<
  "left hand operand to %0 must be a %select{|pointer to }1class "
  "compatible with the right hand operand, but is %2">;
def warn_exception_caught_by_earlier_handler : Warning<
  "exception of type %0 will be caught by earlier handler">,
  InGroup<E