@@ -452,7 +452,7 @@ void ansi_c_scanner_init()
452
452
" while" { loc (); return TOK_WHILE; }
453
453
454
454
" __auto_type" { if ((PARSER.mode ==configt::ansi_ct::flavourt::GCC ||
455
- PARSER.mode ==configt::ansi_ct::flavourt::APPLE )
455
+ PARSER.mode ==configt::ansi_ct::flavourt::CLANG )
456
456
&& !PARSER.cpp98 )
457
457
{ loc (); return TOK_GCC_AUTO_TYPE; }
458
458
else
@@ -516,7 +516,7 @@ void ansi_c_scanner_init()
516
516
}
517
517
518
518
" __int128" { if (PARSER.mode ==configt::ansi_ct::flavourt::GCC ||
519
- PARSER.mode ==configt::ansi_ct::flavourt::APPLE )
519
+ PARSER.mode ==configt::ansi_ct::flavourt::CLANG )
520
520
{ loc (); return TOK_GCC_INT128; }
521
521
else
522
522
return make_identifier ();
@@ -567,7 +567,7 @@ void ansi_c_scanner_init()
567
567
568
568
" __complex__" |
569
569
" __complex" { if (PARSER.mode ==configt::ansi_ct::flavourt::GCC ||
570
- PARSER.mode ==configt::ansi_ct::flavourt::APPLE ||
570
+ PARSER.mode ==configt::ansi_ct::flavourt::CLANG ||
571
571
PARSER.mode ==configt::ansi_ct::flavourt::ARM)
572
572
{ loc (); return TOK_COMPLEX; }
573
573
else
@@ -576,7 +576,7 @@ void ansi_c_scanner_init()
576
576
577
577
" __real__" |
578
578
" __real" { if (PARSER.mode ==configt::ansi_ct::flavourt::GCC ||
579
- PARSER.mode ==configt::ansi_ct::flavourt::APPLE ||
579
+ PARSER.mode ==configt::ansi_ct::flavourt::CLANG ||
580
580
PARSER.mode ==configt::ansi_ct::flavourt::ARM)
581
581
{ loc (); return TOK_REAL; }
582
582
else
@@ -585,7 +585,7 @@ void ansi_c_scanner_init()
585
585
586
586
" __imag__" |
587
587
" __imag" { if (PARSER.mode ==configt::ansi_ct::flavourt::GCC ||
588
- PARSER.mode ==configt::ansi_ct::flavourt::APPLE ||
588
+ PARSER.mode ==configt::ansi_ct::flavourt::CLANG ||
589
589
PARSER.mode ==configt::ansi_ct::flavourt::ARM)
590
590
{ loc (); return TOK_IMAG; }
591
591
else
@@ -604,7 +604,7 @@ void ansi_c_scanner_init()
604
604
}
605
605
606
606
" __builtin_va_arg" { if (PARSER.mode ==configt::ansi_ct::flavourt::GCC ||
607
- PARSER.mode ==configt::ansi_ct::flavourt::APPLE ||
607
+ PARSER.mode ==configt::ansi_ct::flavourt::CLANG ||
608
608
PARSER.mode ==configt::ansi_ct::flavourt::ARM)
609
609
{ loc (); return TOK_BUILTIN_VA_ARG; }
610
610
else
@@ -614,7 +614,7 @@ void ansi_c_scanner_init()
614
614
" __builtin_offsetof" |
615
615
" __offsetof__" |
616
616
" offsetof" { if (PARSER.mode ==configt::ansi_ct::flavourt::GCC ||
617
- PARSER.mode ==configt::ansi_ct::flavourt::APPLE ||
617
+ PARSER.mode ==configt::ansi_ct::flavourt::CLANG ||
618
618
PARSER.mode ==configt::ansi_ct::flavourt::ARM)
619
619
{ loc (); return TOK_OFFSETOF; }
620
620
else
@@ -623,7 +623,7 @@ void ansi_c_scanner_init()
623
623
624
624
" __builtin_types_compatible_p" {
625
625
if (PARSER.mode ==configt::ansi_ct::flavourt::GCC ||
626
- PARSER.mode ==configt::ansi_ct::flavourt::APPLE ||
626
+ PARSER.mode ==configt::ansi_ct::flavourt::CLANG ||
627
627
PARSER.mode ==configt::ansi_ct::flavourt::ARM)
628
628
{ loc (); return TOK_GCC_BUILTIN_TYPES_COMPATIBLE_P; }
629
629
else
@@ -632,14 +632,14 @@ void ansi_c_scanner_init()
632
632
633
633
" __builtin_convertvector" {
634
634
if (PARSER.mode ==configt::ansi_ct::flavourt::GCC ||
635
- PARSER.mode ==configt::ansi_ct::flavourt::APPLE )
635
+ PARSER.mode ==configt::ansi_ct::flavourt::CLANG )
636
636
{ loc (); return TOK_CLANG_BUILTIN_CONVERTVECTOR; }
637
637
else
638
638
return make_identifier ();
639
639
}
640
640
641
641
" __alignof__" { if (PARSER.mode ==configt::ansi_ct::flavourt::GCC ||
642
- PARSER.mode ==configt::ansi_ct::flavourt::APPLE ||
642
+ PARSER.mode ==configt::ansi_ct::flavourt::CLANG ||
643
643
PARSER.mode ==configt::ansi_ct::flavourt::ARM)
644
644
{ loc (); return TOK_ALIGNOF; }
645
645
else
@@ -650,7 +650,7 @@ void ansi_c_scanner_init()
650
650
// http://msdn.microsoft.com/en-us/library/45t0s5f4%28v=vs.71%29.aspx
651
651
if (PARSER.mode ==configt::ansi_ct::flavourt::VISUAL_STUDIO ||
652
652
PARSER.mode ==configt::ansi_ct::flavourt::GCC ||
653
- PARSER.mode ==configt::ansi_ct::flavourt::APPLE ||
653
+ PARSER.mode ==configt::ansi_ct::flavourt::CLANG ||
654
654
PARSER.mode ==configt::ansi_ct::flavourt::ARM)
655
655
{ loc (); return TOK_ALIGNOF; }
656
656
else
@@ -689,7 +689,7 @@ void ansi_c_scanner_init()
689
689
}
690
690
691
691
" asm" { if (PARSER.mode ==configt::ansi_ct::flavourt::GCC ||
692
- PARSER.mode ==configt::ansi_ct::flavourt::APPLE ||
692
+ PARSER.mode ==configt::ansi_ct::flavourt::CLANG ||
693
693
PARSER.mode ==configt::ansi_ct::flavourt::CODEWARRIOR)
694
694
{
695
695
if (PARSER.cpp98 )
@@ -705,7 +705,7 @@ void ansi_c_scanner_init()
705
705
}
706
706
707
707
" __asm__" { if (PARSER.mode ==configt::ansi_ct::flavourt::GCC ||
708
- PARSER.mode ==configt::ansi_ct::flavourt::APPLE ||
708
+ PARSER.mode ==configt::ansi_ct::flavourt::CLANG ||
709
709
PARSER.mode ==configt::ansi_ct::flavourt::CODEWARRIOR ||
710
710
PARSER.mode ==configt::ansi_ct::flavourt::ARM)
711
711
{
@@ -817,7 +817,7 @@ xor_eq { return cpp98_keyword(TOK_XORASSIGN); }
817
817
818
818
__decltype { if (PARSER.cpp98 &&
819
819
(PARSER.mode ==configt::ansi_ct::flavourt::GCC ||
820
- PARSER.mode ==configt::ansi_ct::flavourt::APPLE ))
820
+ PARSER.mode ==configt::ansi_ct::flavourt::CLANG ))
821
821
return cpp98_keyword (TOK_DECLTYPE);
822
822
else
823
823
return make_identifier ();
@@ -885,28 +885,28 @@ __decltype { if(PARSER.cpp98 &&
885
885
}
886
886
887
887
" __char16_t" { if (PARSER.mode ==configt::ansi_ct::flavourt::GCC ||
888
- PARSER.mode ==configt::ansi_ct::flavourt::APPLE )
888
+ PARSER.mode ==configt::ansi_ct::flavourt::CLANG )
889
889
return cpp98_keyword (TOK_CHAR16_T); // GNU extension
890
890
else
891
891
return make_identifier ();
892
892
}
893
893
894
894
" __nullptr" { if (PARSER.mode ==configt::ansi_ct::flavourt::GCC ||
895
- PARSER.mode ==configt::ansi_ct::flavourt::APPLE )
895
+ PARSER.mode ==configt::ansi_ct::flavourt::CLANG )
896
896
return cpp98_keyword (TOK_NULLPTR); // GNU extension
897
897
else
898
898
return make_identifier ();
899
899
}
900
900
901
901
" __null" { if (PARSER.mode ==configt::ansi_ct::flavourt::GCC ||
902
- PARSER.mode ==configt::ansi_ct::flavourt::APPLE )
902
+ PARSER.mode ==configt::ansi_ct::flavourt::CLANG )
903
903
return cpp98_keyword (TOK_NULLPTR); // GNU extension
904
904
else
905
905
return make_identifier ();
906
906
}
907
907
908
908
" __char32_t" { if (PARSER.mode ==configt::ansi_ct::flavourt::GCC ||
909
- PARSER.mode ==configt::ansi_ct::flavourt::APPLE )
909
+ PARSER.mode ==configt::ansi_ct::flavourt::CLANG )
910
910
return cpp98_keyword (TOK_CHAR32_T); // GNU extension
911
911
else
912
912
return make_identifier ();
@@ -944,7 +944,7 @@ __decltype { if(PARSER.cpp98 &&
944
944
945
945
" __attribute__" |
946
946
" __attribute" { if (PARSER.mode ==configt::ansi_ct::flavourt::GCC ||
947
- PARSER.mode ==configt::ansi_ct::flavourt::APPLE ||
947
+ PARSER.mode ==configt::ansi_ct::flavourt::CLANG ||
948
948
PARSER.mode ==configt::ansi_ct::flavourt::CODEWARRIOR ||
949
949
PARSER.mode ==configt::ansi_ct::flavourt::ARM)
950
950
{
@@ -1119,15 +1119,15 @@ __decltype { if(PARSER.cpp98 &&
1119
1119
1120
1120
" typeof" { if (PARSER.cpp98 ||
1121
1121
PARSER.mode ==configt::ansi_ct::flavourt::GCC ||
1122
- PARSER.mode ==configt::ansi_ct::flavourt::APPLE ||
1122
+ PARSER.mode ==configt::ansi_ct::flavourt::CLANG ||
1123
1123
PARSER.mode ==configt::ansi_ct::flavourt::CODEWARRIOR ||
1124
1124
PARSER.mode ==configt::ansi_ct::flavourt::ARM)
1125
1125
{ loc (); return TOK_TYPEOF; }
1126
1126
else
1127
1127
return make_identifier ();
1128
1128
}
1129
1129
" __typeof" { if (PARSER.mode ==configt::ansi_ct::flavourt::GCC ||
1130
- PARSER.mode ==configt::ansi_ct::flavourt::APPLE ||
1130
+ PARSER.mode ==configt::ansi_ct::flavourt::CLANG ||
1131
1131
PARSER.mode ==configt::ansi_ct::flavourt::ARM)
1132
1132
{ loc (); return TOK_TYPEOF; }
1133
1133
else
@@ -1154,7 +1154,7 @@ __decltype { if(PARSER.cpp98 &&
1154
1154
" __inline__" { loc (); return TOK_INLINE; }
1155
1155
1156
1156
" __label__" { if (PARSER.mode ==configt::ansi_ct::flavourt::GCC ||
1157
- PARSER.mode ==configt::ansi_ct::flavourt::APPLE ||
1157
+ PARSER.mode ==configt::ansi_ct::flavourt::CLANG ||
1158
1158
PARSER.mode ==configt::ansi_ct::flavourt::ARM)
1159
1159
{ loc (); return TOK_GCC_LABEL; }
1160
1160
else
@@ -1253,7 +1253,7 @@ __decltype { if(PARSER.cpp98 &&
1253
1253
}
1254
1254
1255
1255
" __thread" { if (PARSER.mode ==configt::ansi_ct::flavourt::GCC ||
1256
- PARSER.mode ==configt::ansi_ct::flavourt::APPLE ||
1256
+ PARSER.mode ==configt::ansi_ct::flavourt::CLANG ||
1257
1257
PARSER.mode ==configt::ansi_ct::flavourt::ARM)
1258
1258
{ loc (); return TOK_THREAD_LOCAL; }
1259
1259
else
@@ -1264,7 +1264,7 @@ __decltype { if(PARSER.cpp98 &&
1264
1264
1265
1265
" _Alignas" { if (!PARSER.cpp98 &&
1266
1266
(PARSER.mode ==configt::ansi_ct::flavourt::GCC ||
1267
- PARSER.mode ==configt::ansi_ct::flavourt::APPLE ||
1267
+ PARSER.mode ==configt::ansi_ct::flavourt::CLANG ||
1268
1268
PARSER.mode ==configt::ansi_ct::flavourt::ARM))
1269
1269
{ loc (); return TOK_ALIGNAS; }
1270
1270
else
@@ -1275,7 +1275,7 @@ __decltype { if(PARSER.cpp98 &&
1275
1275
1276
1276
" _Alignof" { if (!PARSER.cpp98 &&
1277
1277
(PARSER.mode ==configt::ansi_ct::flavourt::GCC ||
1278
- PARSER.mode ==configt::ansi_ct::flavourt::APPLE ||
1278
+ PARSER.mode ==configt::ansi_ct::flavourt::CLANG ||
1279
1279
PARSER.mode ==configt::ansi_ct::flavourt::ARM ||
1280
1280
PARSER.mode ==configt::ansi_ct::flavourt::VISUAL_STUDIO))
1281
1281
{ loc (); return TOK_ALIGNOF; }
@@ -1297,7 +1297,7 @@ __decltype { if(PARSER.cpp98 &&
1297
1297
1298
1298
if (!PARSER.cpp98 &&
1299
1299
(PARSER.mode ==configt::ansi_ct::flavourt::GCC ||
1300
- PARSER.mode ==configt::ansi_ct::flavourt::APPLE ||
1300
+ PARSER.mode ==configt::ansi_ct::flavourt::CLANG ||
1301
1301
PARSER.mode ==configt::ansi_ct::flavourt::ARM))
1302
1302
{ loc (); return TOK_ATOMIC_TYPE_SPECIFIER; }
1303
1303
else
@@ -1306,7 +1306,7 @@ __decltype { if(PARSER.cpp98 &&
1306
1306
1307
1307
" _Atomic" { if (!PARSER.cpp98 &&
1308
1308
(PARSER.mode ==configt::ansi_ct::flavourt::GCC ||
1309
- PARSER.mode ==configt::ansi_ct::flavourt::APPLE ||
1309
+ PARSER.mode ==configt::ansi_ct::flavourt::CLANG ||
1310
1310
PARSER.mode ==configt::ansi_ct::flavourt::ARM))
1311
1311
{ loc (); return TOK_ATOMIC_TYPE_QUALIFIER; }
1312
1312
else
@@ -1317,7 +1317,7 @@ __decltype { if(PARSER.cpp98 &&
1317
1317
1318
1318
" _Generic" { if (!PARSER.cpp98 &&
1319
1319
(PARSER.mode ==configt::ansi_ct::flavourt::GCC ||
1320
- PARSER.mode ==configt::ansi_ct::flavourt::APPLE ||
1320
+ PARSER.mode ==configt::ansi_ct::flavourt::CLANG ||
1321
1321
PARSER.mode ==configt::ansi_ct::flavourt::ARM))
1322
1322
{ loc (); return TOK_GENERIC; }
1323
1323
else
@@ -1328,7 +1328,7 @@ __decltype { if(PARSER.cpp98 &&
1328
1328
1329
1329
" _Imaginary" { if (!PARSER.cpp98 &&
1330
1330
(PARSER.mode ==configt::ansi_ct::flavourt::GCC ||
1331
- PARSER.mode ==configt::ansi_ct::flavourt::APPLE ||
1331
+ PARSER.mode ==configt::ansi_ct::flavourt::CLANG ||
1332
1332
PARSER.mode ==configt::ansi_ct::flavourt::ARM))
1333
1333
{ loc (); return TOK_IMAGINARY; }
1334
1334
else
@@ -1339,7 +1339,7 @@ __decltype { if(PARSER.cpp98 &&
1339
1339
1340
1340
" _Noreturn" { if (!PARSER.cpp98 &&
1341
1341
(PARSER.mode ==configt::ansi_ct::flavourt::GCC ||
1342
- PARSER.mode ==configt::ansi_ct::flavourt::APPLE ||
1342
+ PARSER.mode ==configt::ansi_ct::flavourt::CLANG ||
1343
1343
PARSER.mode ==configt::ansi_ct::flavourt::ARM))
1344
1344
{ loc (); return TOK_NORETURN; }
1345
1345
else
@@ -1350,7 +1350,7 @@ __decltype { if(PARSER.cpp98 &&
1350
1350
1351
1351
" _Static_assert" { if (!PARSER.cpp98 &&
1352
1352
(PARSER.mode ==configt::ansi_ct::flavourt::GCC ||
1353
- PARSER.mode ==configt::ansi_ct::flavourt::APPLE ||
1353
+ PARSER.mode ==configt::ansi_ct::flavourt::CLANG ||
1354
1354
PARSER.mode ==configt::ansi_ct::flavourt::ARM))
1355
1355
{ loc (); return TOK_STATIC_ASSERT; }
1356
1356
else
@@ -1361,24 +1361,24 @@ __decltype { if(PARSER.cpp98 &&
1361
1361
1362
1362
" _Thread_local" { if (!PARSER.cpp98 &&
1363
1363
(PARSER.mode ==configt::ansi_ct::flavourt::GCC ||
1364
- PARSER.mode ==configt::ansi_ct::flavourt::APPLE ||
1364
+ PARSER.mode ==configt::ansi_ct::flavourt::CLANG ||
1365
1365
PARSER.mode ==configt::ansi_ct::flavourt::ARM))
1366
1366
{ loc (); return TOK_THREAD_LOCAL; }
1367
1367
else
1368
1368
return make_identifier ();
1369
1369
}
1370
1370
1371
- /* This is an Apple clang extension */
1371
+ /* This is a clang extension */
1372
1372
1373
- " _Nullable" { if (PARSER.mode ==configt::ansi_ct::flavourt::APPLE )
1373
+ " _Nullable" { if (PARSER.mode ==configt::ansi_ct::flavourt::CLANG )
1374
1374
{ /* ignore */ }
1375
1375
else
1376
1376
return make_identifier ();
1377
1377
}
1378
1378
1379
- /* This is an Apple clang extension */
1379
+ /* This is a clang extension */
1380
1380
1381
- " _Nonnull" { if (PARSER.mode ==configt::ansi_ct::flavourt::APPLE )
1381
+ " _Nonnull" { if (PARSER.mode ==configt::ansi_ct::flavourt::CLANG )
1382
1382
{ /* ignore */ }
1383
1383
else
1384
1384
return make_identifier ();
0 commit comments