-
Notifications
You must be signed in to change notification settings - Fork 1.6k
/
Copy pathsemmlecode.cpp.dbscheme
2251 lines (1984 loc) · 52.9 KB
/
semmlecode.cpp.dbscheme
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
/**
* An invocation of the compiler. Note that more than one file may be
* compiled per invocation. For example, this command compiles three
* source files:
*
* gcc -c f1.c f2.c f3.c
*
* The `id` simply identifies the invocation, while `cwd` is the working
* directory from which the compiler was invoked.
*/
compilations(
/**
* An invocation of the compiler. Note that more than one file may
* be compiled per invocation. For example, this command compiles
* three source files:
*
* gcc -c f1.c f2.c f3.c
*/
unique int id : @compilation,
string cwd : string ref
);
/**
* The arguments that were passed to the extractor for a compiler
* invocation. If `id` is for the compiler invocation
*
* gcc -c f1.c f2.c f3.c
*
* then typically there will be rows for
*
* num | arg
* --- | ---
* 0 | *path to extractor*
* 1 | `--mimic`
* 2 | `/usr/bin/gcc`
* 3 | `-c`
* 4 | f1.c
* 5 | f2.c
* 6 | f3.c
*/
#keyset[id, num]
compilation_args(
int id : @compilation ref,
int num : int ref,
string arg : string ref
);
/**
* The source files that are compiled by a compiler invocation.
* If `id` is for the compiler invocation
*
* gcc -c f1.c f2.c f3.c
*
* then there will be rows for
*
* num | arg
* --- | ---
* 0 | f1.c
* 1 | f2.c
* 2 | f3.c
*
* Note that even if those files `#include` headers, those headers
* do not appear as rows.
*/
#keyset[id, num]
compilation_compiling_files(
int id : @compilation ref,
int num : int ref,
int file : @file ref
);
/**
* The time taken by the extractor for a compiler invocation.
*
* For each file `num`, there will be rows for
*
* kind | seconds
* ---- | ---
* 1 | CPU seconds used by the extractor frontend
* 2 | Elapsed seconds during the extractor frontend
* 3 | CPU seconds used by the extractor backend
* 4 | Elapsed seconds during the extractor backend
*/
#keyset[id, num, kind]
compilation_time(
int id : @compilation ref,
int num : int ref,
/* kind:
1 = frontend_cpu_seconds
2 = frontend_elapsed_seconds
3 = extractor_cpu_seconds
4 = extractor_elapsed_seconds
*/
int kind : int ref,
float seconds : float ref
);
/**
* An error or warning generated by the extractor.
* The diagnostic message `diagnostic` was generated during compiler
* invocation `compilation`, and is the `file_number_diagnostic_number`th
* message generated while extracting the `file_number`th file of that
* invocation.
*/
#keyset[compilation, file_number, file_number_diagnostic_number]
diagnostic_for(
int diagnostic : @diagnostic ref,
int compilation : @compilation ref,
int file_number : int ref,
int file_number_diagnostic_number : int ref
);
/**
* If extraction was successful, then `cpu_seconds` and
* `elapsed_seconds` are the CPU time and elapsed time (respectively)
* that extraction took for compiler invocation `id`.
*/
compilation_finished(
unique int id : @compilation ref,
float cpu_seconds : float ref,
float elapsed_seconds : float ref
);
/**
* External data, loaded from CSV files during snapshot creation. See
* [Tutorial: Incorporating external data](https://help.semmle.com/wiki/display/SD/Tutorial%3A+Incorporating+external+data)
* for more information.
*/
externalData(
int id : @externalDataElement,
string path : string ref,
int column: int ref,
string value : string ref
);
/**
* The source location of the snapshot.
*/
sourceLocationPrefix(string prefix : string ref);
/**
* Information about packages that provide code used during compilation.
* The `id` is just a unique identifier.
* The `namespace` is typically the name of the package manager that
* provided the package (e.g. "dpkg" or "yum").
* The `package_name` is the name of the package, and `version` is its
* version (as a string).
*/
external_packages(
unique int id: @external_package,
string namespace : string ref,
string package_name : string ref,
string version : string ref
);
/**
* Holds if File `fileid` was provided by package `package`.
*/
header_to_external_package(
int fileid : @file ref,
int package : @external_package ref
);
/*
* Version history
*/
svnentries(
unique int id : @svnentry,
string revision : string ref,
string author : string ref,
date revisionDate : date ref,
int changeSize : int ref
)
svnaffectedfiles(
int id : @svnentry ref,
int file : @file ref,
string action : string ref
)
svnentrymsg(
unique int id : @svnentry ref,
string message : string ref
)
svnchurn(
int commit : @svnentry ref,
int file : @file ref,
int addedLines : int ref,
int deletedLines : int ref
)
/*
* C++ dbscheme
*/
extractor_version(
string codeql_version: string ref,
string frontend_version: string ref
)
@location = @location_stmt | @location_expr | @location_default ;
/**
* The location of an element that is not an expression or a statement.
* The location spans column `startcolumn` of line `startline` to
* column `endcolumn` of line `endline` in file `file`.
* For more information, see
* [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/).
*/
locations_default(
/** The location of an element that is not an expression or a statement. */
unique int id: @location_default,
int container: @container ref,
int startLine: int ref,
int startColumn: int ref,
int endLine: int ref,
int endColumn: int ref
);
/**
* The location of a statement.
* The location spans column `startcolumn` of line `startline` to
* column `endcolumn` of line `endline` in file `file`.
* For more information, see
* [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/).
*/
locations_stmt(
/** The location of a statement. */
unique int id: @location_stmt,
int container: @container ref,
int startLine: int ref,
int startColumn: int ref,
int endLine: int ref,
int endColumn: int ref
);
/**
* The location of an expression.
* The location spans column `startcolumn` of line `startline` to
* column `endcolumn` of line `endline` in file `file`.
* For more information, see
* [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/).
*/
locations_expr(
/** The location of an expression. */
unique int id: @location_expr,
int container: @container ref,
int startLine: int ref,
int startColumn: int ref,
int endLine: int ref,
int endColumn: int ref
);
/** An element for which line-count information is available. */
@sourceline = @file | @function | @variable | @enumconstant | @xmllocatable;
numlines(
int element_id: @sourceline ref,
int num_lines: int ref,
int num_code: int ref,
int num_comment: int ref
);
diagnostics(
unique int id: @diagnostic,
int severity: int ref,
string error_tag: string ref,
string error_message: string ref,
string full_error_message: string ref,
int location: @location_default ref
);
files(
unique int id: @file,
string name: string ref
);
folders(
unique int id: @folder,
string name: string ref
);
@container = @folder | @file
containerparent(
int parent: @container ref,
unique int child: @container ref
);
fileannotations(
int id: @file ref,
int kind: int ref,
string name: string ref,
string value: string ref
);
inmacroexpansion(
int id: @element ref,
int inv: @macroinvocation ref
);
affectedbymacroexpansion(
int id: @element ref,
int inv: @macroinvocation ref
);
case @macroinvocation.kind of
1 = @macro_expansion
| 2 = @other_macro_reference
;
macroinvocations(
unique int id: @macroinvocation,
int macro_id: @ppd_define ref,
int location: @location_default ref,
int kind: int ref
);
macroparent(
unique int id: @macroinvocation ref,
int parent_id: @macroinvocation ref
);
// a macroinvocation may be part of another location
// the way to find a constant expression that uses a macro
// is thus to find a constant expression that has a location
// to which a macro invocation is bound
macrolocationbind(
int id: @macroinvocation ref,
int location: @location ref
);
#keyset[invocation, argument_index]
macro_argument_unexpanded(
int invocation: @macroinvocation ref,
int argument_index: int ref,
string text: string ref
);
#keyset[invocation, argument_index]
macro_argument_expanded(
int invocation: @macroinvocation ref,
int argument_index: int ref,
string text: string ref
);
/*
case @function.kind of
1 = @normal_function
| 2 = @constructor
| 3 = @destructor
| 4 = @conversion_function
| 5 = @operator
| 6 = @builtin_function // GCC built-in functions, e.g. __builtin___memcpy_chk
| 7 = @user_defined_literal
| 8 = @deduction_guide
;
*/
functions(
unique int id: @function,
string name: string ref,
int kind: int ref
);
function_entry_point(
int id: @function ref,
unique int entry_point: @stmt ref
);
function_return_type(
int id: @function ref,
int return_type: @type ref
);
/**
* If `function` is a coroutine, then this gives the `std::experimental::resumable_traits`
* instance associated with it, and the variables representing the `handle` and `promise`
* for it.
*/
coroutine(
unique int function: @function ref,
int traits: @type ref,
int handle: @variable ref,
int promise: @variable ref
);
/** The `new` function used for allocating the coroutine state, if any. */
coroutine_new(
unique int function: @function ref,
int new: @function ref
);
/** The `delete` function used for deallocating the coroutine state, if any. */
coroutine_delete(
unique int function: @function ref,
int delete: @function ref
);
purefunctions(unique int id: @function ref);
function_deleted(unique int id: @function ref);
function_defaulted(unique int id: @function ref);
function_prototyped(unique int id: @function ref)
member_function_this_type(
unique int id: @function ref,
int this_type: @type ref
);
#keyset[id, type_id]
fun_decls(
int id: @fun_decl,
int function: @function ref,
int type_id: @type ref,
string name: string ref,
int location: @location_default ref
);
fun_def(unique int id: @fun_decl ref);
fun_specialized(unique int id: @fun_decl ref);
fun_implicit(unique int id: @fun_decl ref);
fun_decl_specifiers(
int id: @fun_decl ref,
string name: string ref
)
#keyset[fun_decl, index]
fun_decl_throws(
int fun_decl: @fun_decl ref,
int index: int ref,
int type_id: @type ref
);
/* an empty throw specification is different from none */
fun_decl_empty_throws(unique int fun_decl: @fun_decl ref);
fun_decl_noexcept(
int fun_decl: @fun_decl ref,
int constant: @expr ref
);
fun_decl_empty_noexcept(int fun_decl: @fun_decl ref);
fun_decl_typedef_type(
unique int fun_decl: @fun_decl ref,
int typedeftype_id: @usertype ref
);
param_decl_bind(
unique int id: @var_decl ref,
int index: int ref,
int fun_decl: @fun_decl ref
);
#keyset[id, type_id]
var_decls(
int id: @var_decl,
int variable: @variable ref,
int type_id: @type ref,
string name: string ref,
int location: @location_default ref
);
var_def(unique int id: @var_decl ref);
var_decl_specifiers(
int id: @var_decl ref,
string name: string ref
)
is_structured_binding(unique int id: @variable ref);
type_decls(
unique int id: @type_decl,
int type_id: @type ref,
int location: @location_default ref
);
type_def(unique int id: @type_decl ref);
type_decl_top(
unique int type_decl: @type_decl ref
);
namespace_decls(
unique int id: @namespace_decl,
int namespace_id: @namespace ref,
int location: @location_default ref,
int bodylocation: @location_default ref
);
usings(
unique int id: @using,
int element_id: @element ref,
int location: @location_default ref
);
/** The element which contains the `using` declaration. */
using_container(
int parent: @element ref,
int child: @using ref
);
static_asserts(
unique int id: @static_assert,
int condition : @expr ref,
string message : string ref,
int location: @location_default ref,
int enclosing : @element ref
);
// each function has an ordered list of parameters
#keyset[id, type_id]
#keyset[function, index, type_id]
params(
int id: @parameter,
int function: @functionorblock ref,
int index: int ref,
int type_id: @type ref
);
overrides(
int new: @function ref,
int old: @function ref
);
#keyset[id, type_id]
membervariables(
int id: @membervariable,
int type_id: @type ref,
string name: string ref
);
#keyset[id, type_id]
globalvariables(
int id: @globalvariable,
int type_id: @type ref,
string name: string ref
);
#keyset[id, type_id]
localvariables(
int id: @localvariable,
int type_id: @type ref,
string name: string ref
);
autoderivation(
unique int var: @variable ref,
int derivation_type: @type ref
);
orphaned_variables(
int var: @localvariable ref,
int function: @function ref
)
enumconstants(
unique int id: @enumconstant,
int parent: @usertype ref,
int index: int ref,
int type_id: @type ref,
string name: string ref,
int location: @location_default ref
);
@variable = @localscopevariable | @globalvariable | @membervariable;
@localscopevariable = @localvariable | @parameter;
/**
* Built-in types are the fundamental types, e.g., integral, floating, and void.
*/
case @builtintype.kind of
1 = @errortype
| 2 = @unknowntype
| 3 = @void
| 4 = @boolean
| 5 = @char
| 6 = @unsigned_char
| 7 = @signed_char
| 8 = @short
| 9 = @unsigned_short
| 10 = @signed_short
| 11 = @int
| 12 = @unsigned_int
| 13 = @signed_int
| 14 = @long
| 15 = @unsigned_long
| 16 = @signed_long
| 17 = @long_long
| 18 = @unsigned_long_long
| 19 = @signed_long_long
// ... 20 Microsoft-specific __int8
// ... 21 Microsoft-specific __int16
// ... 22 Microsoft-specific __int32
// ... 23 Microsoft-specific __int64
| 24 = @float
| 25 = @double
| 26 = @long_double
| 27 = @complex_float // C99-specific _Complex float
| 28 = @complex_double // C99-specific _Complex double
| 29 = @complex_long_double // C99-specific _Complex long double
| 30 = @imaginary_float // C99-specific _Imaginary float
| 31 = @imaginary_double // C99-specific _Imaginary double
| 32 = @imaginary_long_double // C99-specific _Imaginary long double
| 33 = @wchar_t // Microsoft-specific
| 34 = @decltype_nullptr // C++11
| 35 = @int128 // __int128
| 36 = @unsigned_int128 // unsigned __int128
| 37 = @signed_int128 // signed __int128
| 38 = @float128 // __float128
| 39 = @complex_float128 // _Complex __float128
| 40 = @decimal32 // _Decimal32
| 41 = @decimal64 // _Decimal64
| 42 = @decimal128 // _Decimal128
| 43 = @char16_t
| 44 = @char32_t
| 45 = @std_float32 // _Float32
| 46 = @float32x // _Float32x
| 47 = @std_float64 // _Float64
| 48 = @float64x // _Float64x
| 49 = @std_float128 // _Float128
// ... 50 _Float128x
| 51 = @char8_t
| 52 = @float16 // _Float16
| 53 = @complex_float16 // _Complex _Float16
| 54 = @fp16 // __fp16
| 55 = @std_bfloat16 // __bf16
| 56 = @std_float16 // std::float16_t
| 57 = @complex_std_float32 // _Complex _Float32
| 58 = @complex_float32x // _Complex _Float32x
| 59 = @complex_std_float64 // _Complex _Float64
| 60 = @complex_float64x // _Complex _Float64x
| 61 = @complex_std_float128 // _Complex _Float128
;
builtintypes(
unique int id: @builtintype,
string name: string ref,
int kind: int ref,
int size: int ref,
int sign: int ref,
int alignment: int ref
);
/**
* Derived types are types that are directly derived from existing types and
* point to, refer to, transform type data to return a new type.
*/
case @derivedtype.kind of
1 = @pointer
| 2 = @reference
| 3 = @type_with_specifiers
| 4 = @array
| 5 = @gnu_vector
| 6 = @routineptr
| 7 = @routinereference
| 8 = @rvalue_reference // C++11
// ... 9 type_conforming_to_protocols deprecated
| 10 = @block
;
derivedtypes(
unique int id: @derivedtype,
string name: string ref,
int kind: int ref,
int type_id: @type ref
);
pointerishsize(unique int id: @derivedtype ref,
int size: int ref,
int alignment: int ref);
arraysizes(
unique int id: @derivedtype ref,
int num_elements: int ref,
int bytesize: int ref,
int alignment: int ref
);
typedefbase(
unique int id: @usertype ref,
int type_id: @type ref
);
/**
* An instance of the C++11 `decltype` operator. For example:
* ```
* int a;
* decltype(1+a) b;
* ```
* Here `expr` is `1+a`.
*
* Sometimes an additional pair of parentheses around the expression
* would change the semantics of this decltype, e.g.
* ```
* struct A { double x; };
* const A* a = new A();
* decltype( a->x ); // type is double
* decltype((a->x)); // type is const double&
* ```
* (Please consult the C++11 standard for more details).
* `parentheses_would_change_meaning` is `true` iff that is the case.
*/
#keyset[id, expr]
decltypes(
int id: @decltype,
int expr: @expr ref,
int base_type: @type ref,
boolean parentheses_would_change_meaning: boolean ref
);
/*
case @usertype.kind of
1 = @struct
| 2 = @class
| 3 = @union
| 4 = @enum
| 5 = @typedef // classic C: typedef typedef type name
| 6 = @template
| 7 = @template_parameter
| 8 = @template_template_parameter
| 9 = @proxy_class // a proxy class associated with a template parameter
// ... 10 objc_class deprecated
// ... 11 objc_protocol deprecated
// ... 12 objc_category deprecated
| 13 = @scoped_enum
| 14 = @using_alias // a using name = type style typedef
;
*/
usertypes(
unique int id: @usertype,
string name: string ref,
int kind: int ref
);
usertypesize(
unique int id: @usertype ref,
int size: int ref,
int alignment: int ref
);
usertype_final(unique int id: @usertype ref);
usertype_uuid(
unique int id: @usertype ref,
string uuid: string ref
);
mangled_name(
unique int id: @declaration ref,
int mangled_name : @mangledname,
boolean is_complete: boolean ref
);
is_pod_class(unique int id: @usertype ref);
is_standard_layout_class(unique int id: @usertype ref);
is_complete(unique int id: @usertype ref);
is_class_template(unique int id: @usertype ref);
class_instantiation(
int to: @usertype ref,
int from: @usertype ref
);
class_template_argument(
int type_id: @usertype ref,
int index: int ref,
int arg_type: @type ref
);
class_template_argument_value(
int type_id: @usertype ref,
int index: int ref,
int arg_value: @expr ref
);
is_proxy_class_for(
unique int id: @usertype ref,
unique int templ_param_id: @usertype ref
);
type_mentions(
unique int id: @type_mention,
int type_id: @type ref,
int location: @location ref,
// a_symbol_reference_kind from the frontend.
int kind: int ref
);
is_function_template(unique int id: @function ref);
function_instantiation(
unique int to: @function ref,
int from: @function ref
);
function_template_argument(
int function_id: @function ref,
int index: int ref,
int arg_type: @type ref
);
function_template_argument_value(
int function_id: @function ref,
int index: int ref,
int arg_value: @expr ref
);
is_variable_template(unique int id: @variable ref);
variable_instantiation(
unique int to: @variable ref,
int from: @variable ref
);
variable_template_argument(
int variable_id: @variable ref,
int index: int ref,
int arg_type: @type ref
);
variable_template_argument_value(
int variable_id: @variable ref,
int index: int ref,
int arg_value: @expr ref
);
/*
Fixed point types
precision(1) = short, precision(2) = default, precision(3) = long
is_unsigned(1) = unsigned is_unsigned(2) = signed
is_fract_type(1) = declared with _Fract
saturating(1) = declared with _Sat
*/
/* TODO
fixedpointtypes(
unique int id: @fixedpointtype,
int precision: int ref,
int is_unsigned: int ref,
int is_fract_type: int ref,
int saturating: int ref);
*/
routinetypes(
unique int id: @routinetype,
int return_type: @type ref
);
routinetypeargs(
int routine: @routinetype ref,
int index: int ref,
int type_id: @type ref
);
ptrtomembers(
unique int id: @ptrtomember,
int type_id: @type ref,
int class_id: @type ref
);
/*
specifiers for types, functions, and variables
"public",
"protected",
"private",
"const",
"volatile",
"static",
"pure",
"virtual",
"sealed", // Microsoft
"__interface", // Microsoft
"inline",
"explicit",
"near", // near far extension
"far", // near far extension
"__ptr32", // Microsoft
"__ptr64", // Microsoft
"__sptr", // Microsoft
"__uptr", // Microsoft
"dllimport", // Microsoft
"dllexport", // Microsoft
"thread", // Microsoft
"naked", // Microsoft
"microsoft_inline", // Microsoft
"forceinline", // Microsoft
"selectany", // Microsoft
"nothrow", // Microsoft
"novtable", // Microsoft
"noreturn", // Microsoft
"noinline", // Microsoft
"noalias", // Microsoft
"restrict", // Microsoft
*/
specifiers(
unique int id: @specifier,
unique string str: string ref
);
typespecifiers(
int type_id: @type ref,
int spec_id: @specifier ref
);
funspecifiers(
int func_id: @function ref,
int spec_id: @specifier ref
);
varspecifiers(
int var_id: @accessible ref,
int spec_id: @specifier ref
);
attributes(
unique int id: @attribute,
int kind: int ref,
string name: string ref,
string name_space: string ref,
int location: @location_default ref
);
case @attribute.kind of
0 = @gnuattribute
| 1 = @stdattribute
| 2 = @declspec
| 3 = @msattribute
| 4 = @alignas
// ... 5 @objc_propertyattribute deprecated
;
attribute_args(
unique int id: @attribute_arg,
int kind: int ref,
int attribute: @attribute ref,
int index: int ref,
int location: @location_default ref
);
case @attribute_arg.kind of
0 = @attribute_arg_empty
| 1 = @attribute_arg_token
| 2 = @attribute_arg_constant
| 3 = @attribute_arg_type
| 4 = @attribute_arg_constant_expr
| 5 = @attribute_arg_expr
;
attribute_arg_value(
unique int arg: @attribute_arg ref,
string value: string ref
);
attribute_arg_type(
unique int arg: @attribute_arg ref,
int type_id: @type ref
);
attribute_arg_constant(
unique int arg: @attribute_arg ref,
int constant: @expr ref
)
attribute_arg_expr(
unique int arg: @attribute_arg ref,
int expr: @expr ref
)
attribute_arg_name(
unique int arg: @attribute_arg ref,
string name: string ref
);
typeattributes(
int type_id: @type ref,
int spec_id: @attribute ref
);
funcattributes(
int func_id: @function ref,
int spec_id: @attribute ref
);
varattributes(
int var_id: @accessible ref,
int spec_id: @attribute ref
);
stmtattributes(
int stmt_id: @stmt ref,
int spec_id: @attribute ref
);
@type = @builtintype
| @derivedtype
| @usertype
/* TODO | @fixedpointtype */
| @routinetype
| @ptrtomember
| @decltype;
unspecifiedtype(
unique int type_id: @type ref,
int unspecified_type_id: @type ref
);
member(