-
Notifications
You must be signed in to change notification settings - Fork 15
/
Neslib.Clang.pas
9606 lines (7768 loc) · 320 KB
/
Neslib.Clang.pas
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
unit Neslib.Clang;
{< Delphi wrappers for LibClang 14.0.0.
The main entry point to LibClang is TIndex.Create. }
{$SCOPEDENUMS ON}
interface
uses
System.SysUtils,
Neslib.Clang.Api;
type
{ Error codes returned by libclang routines.
TError.Success is the only error code indicating success. Other error codes,
including not yet assigned non-zero values, indicate errors. }
TError = (
{ No error }
Success = CXError_Success,
{ A generic error code, no further details are available.
Errors of this kind can get their own specific error codes in future
libclang versions. }
Failure = CXError_Failure,
{ libclang crashed while performing the requested operation. }
Crashed = CXError_Crashed,
{ The function detected that the arguments violate the function contract. }
InvalidArguments = CXError_InvalidArguments,
{ An AST deserialization error has occurred. }
AstReadError = CXError_ASTReadError);
type
TGlobalOption = (
{ Used to indicate that threads that libclang creates for indexing purposes
should use background priority. }
ThreadBackgroundPriorityForIndexing,
{ Used to indicate that threads that libclang creates for editing purposes
should use background priority. }
ThreadBackgroundPriorityForEditing);
TGlobalOptions = set of TGlobalOption;
{ Extends TGlobalOptions }
TGlobalOptionsHelper = record helper for TGlobalOptions
public const
{ Used to indicate that all threads that libclang creates should use
background priority. }
ThreadBackgroundPriorityForAll = [
TGlobalOption.ThreadBackgroundPriorityForIndexing,
TGlobalOption.ThreadBackgroundPriorityForEditing];
end;
type
{ Flags that control the creation of translation units. }
TTranslationUnitFlag = (
{ Used to indicate that the parser should construct a "detailed"
preprocessing record, including all macro definitions and instantiations.
Constructing a detailed preprocessing record requires more memory and time
to parse, since the information contained in the record is usually not
retained. However, it can be useful for applications that require more
detailed information about the behavior of the preprocessor. }
DetailedPreprocessingRecord,
{ Used to indicate that the translation unit is incomplete.
When a translation unit is considered "incomplete", semantic analysis that
is typically performed at the end of the translation unit will be
suppressed. For example, this suppresses the completion of tentative
declarations in C and of instantiation of implicitly-instantiation
function templates in C++. This option is typically used when parsing a
header with the intent of producing a precompiled header. }
Incomplete,
{ Used to indicate that the translation unit should be built with an
implicit precompiled header for the preamble.
An implicit precompiled header is used as an optimization when a
particular translation unit is likely to be reparsed many times when the
sources aren't changing that often. In this case, an implicit precompiled
header will be built containing all of the initial includes at the top of
the main file (what we refer to as the "preamble" of the file). In
subsequent parses, if the preamble or the files in it have not changed,
ITranslationUnit.Reparse will re-use the implicit precompiled header to
improve parsing performance. }
PrecompiledPreamble,
{ Used to indicate that the translation unit should cache some
code-completion results with each reparse of the source file.
Caching of code-completion results is a performance optimization that
introduces some overhead to reparsing but improves the performance of
code-completion operations. }
CacheCompletionResults,
{ Used to indicate that the translation unit will be serialized with
ITranslationUnit.Save.
This option is typically used when parsing a header with the intent of
producing a precompiled header. }
ForSerialization,
{ DEPRECATED: Enabled chained precompiled preambles in C++.
Note: this is a *temporary* option that is available only while we are
testing C++ precompiled preamble support. It is deprecated. }
CXXChainedPCH,
{ Used to indicate that function/method bodies should be skipped while
parsing.
This option can be used to search for declarations/definitions while
ignoring the usages. }
SkipFunctionBodies,
{ Used to indicate that brief documentation comments should be included into
the set of code completions returned from this translation unit. }
IncludeBriefCommentsInCodeCompletion,
{ Used to indicate that the precompiled preamble should be created on the
first parse. Otherwise it will be created on the first reparse. This
trades runtime on the first parse (serializing the preamble takes time)
for reduced runtime on the second parse (can now reuse the preamble). }
CreatePreambleOnFirstParse,
{ Do not stop processing when fatal errors are encountered.
When fatal errors are encountered while parsing a translation unit,
semantic analysis is typically stopped early when compiling code. A common
source for fatal errors are unresolvable include files. For the purposes
of an IDE, this is undesirable behavior and as much information as
possible should be reported. Use this flag to enable this behavior. }
KeepGoing,
{ Sets the preprocessor in a mode for parsing a single file only. }
SingleFileParse,
{ Used in combination with SkipFunctionBodies to constrain the skipping of
function bodies to the preamble.
The function bodies of the main file are not skipped. }
LimitSkipFunctionBodiesToPreamble,
{ Used to indicate that attributed types should be included in TCXType. }
IncludeAttributedTypes,
{ Used to indicate that implicit attributes should be visited. }
VisitImplicitAttributes,
{ Used to indicate that non-errors from included files should be ignored.
If set, TTranslationUnit.GetAllDiagnostics will not report e.g. warnings
from included files anymore. This speeds up GetAllDiagnostics for the case
where these warnings are not of interest, as for an IDE for example, which
typically shows only the diagnostics in the main file. }
IgnoreNonErrorsFromIncludedFiles,
{ Tells the preprocessor not to skip excluded conditional blocks. }
RetainExcludedConditionalBlocks);
TTranslationUnitFlags = set of TTranslationUnitFlag;
type
{ Describes the kind of error that occurred (if any) in a call to
ITranslationUnit.Save. }
TSaveResult = (
{ Indicates that no error occurred while saving a translation unit. }
OK = CXSaveError_None,
{ Indicates that an unknown error occurred while attempting to save the
file.
This error typically indicates that file I/O failed when attempting to
write the file. }
Unknown = CXSaveError_Unknown,
{ Indicates that errors during translation prevented this attempt to save
the translation unit.
Errors that prevent the translation unit from being saved can be extracted
ITranslationUnit.Diagnostics. }
TranslationErrors = CXSaveError_TranslationErrors,
{ Indicates that the translation unit to be saved was somehow invalid. }
InvalidTranslationUnit = CXSaveError_InvalidTU);
type
{ Flags that can be passed to ITranslationUnit.CodeCompleteAt to modify its
behavior. }
TCodeCompleteFlag = (
{ Whether to include macros within the set of code completions returned. }
IncludeMacros,
{ Whether to include code patterns for language constructs within the set of
code completions, e.g., for loops. }
IncludeCodePatterns,
{ Whether to include brief documentation within the set of code completions
returned. }
IncludeBriefComments,
{ Whether to speed up completion by omitting top- or namespace-level
entities defined in the preamble. There's no guarantee any particular
entity is omitted. This may be useful if the headers are indexed
externally. }
SkipPreamble,
{ Whether to include completions with small fix-its, e.g. change '.' to '->'
on member access, etc. }
IncludeCompletionsWithFixIts);
TCodeCompleteFlags = set of TCodeCompleteFlag;
type
{ Visitors must return one of these values. }
TVisitorResult = (
{ Stop the visitor process. }
Break = CXVisit_Break,
{ Continue the visitor process. }
Continue = CXVisit_Continue);
type
{ Result of a visitor function. }
TVisitResult = (
{ Function returned successfully. }
Success = CXResult_Success,
{ One of the parameters was invalid for the function. }
Invalid = CXResult_Invalid,
{ The function was terminated by a callback (e.g. it returned
TVisitorResult.Break). }
VisitBreak = CXResult_VisitBreak);
type
{ Describes how the traversal of the children of a particular cursor should
proceed after visiting a particular child cursor.
A value of this enumeration type should be returned by each TCursorVisitor
to indicate how TCursor.VisitChildren proceeds. }
TChildVisitResult = (
{ Terminates the cursor traversal. }
Break = CXChildVisit_Break,
{ Continues the cursor traversal with the next sibling of the cursor just
visited, without visiting its children. }
Continue = CXChildVisit_Continue,
{ Recursively traverse the children of this cursor, using the same visitor. }
Recurse = CXChildVisit_Recurse);
type
{ Describes the kind of entity that a cursor refers to. }
TCursorKind = (
(* Declarations *)
{ A declaration whose specific kind is not exposed via this interface.
Unexposed declarations have the same operations as any other kind of
declaration; one can extract their location information, spelling, find
their definitions, etc. However, the specific kind of the declaration is
not reported. }
UnexposedDecl = CXCursor_UnexposedDecl,
{ A C or C++ struct. }
StructDecl = CXCursor_StructDecl,
{ A C or C++ union. }
UnionDecl = CXCursor_UnionDecl,
{ A C++ class. }
ClassDecl = CXCursor_ClassDecl,
{ An enumeration. }
EnumDecl = CXCursor_EnumDecl,
{ A field (in C) or non-static data member (in C++) in a struct, union, or
C++ class. }
FieldDecl = CXCursor_FieldDecl,
{ An enumerator constant. }
EnumConstantDecl = CXCursor_EnumConstantDecl,
{ A function. }
FunctionDecl = CXCursor_FunctionDecl,
{ A variable. }
VarDecl = CXCursor_VarDecl,
{ A function or method parameter. }
ParmDecl = CXCursor_ParmDecl,
{ An Objective-C @@interface. }
ObjCInterfaceDecl = CXCursor_ObjCInterfaceDecl,
{ An Objective-C @@interface for a category. }
ObjCCategoryDecl = CXCursor_ObjCCategoryDecl,
{ An Objective-C @@protocol declaration. }
ObjCProtocolDecl = CXCursor_ObjCProtocolDecl,
{ An Objective-C @@property declaration. }
ObjCPropertyDecl = CXCursor_ObjCPropertyDecl,
{ An Objective-C instance variable. }
ObjCIvarDecl = CXCursor_ObjCIvarDecl,
{ An Objective-C instance method. }
ObjCInstanceMethodDecl = CXCursor_ObjCInstanceMethodDecl,
{ An Objective-C class method. }
ObjCClassMethodDecl = CXCursor_ObjCClassMethodDecl,
{ An Objective-C @@implementation. }
ObjCImplementationDecl = CXCursor_ObjCImplementationDecl,
{ An Objective-C @@implementation for a category. }
ObjCCategoryImplDecl = CXCursor_ObjCCategoryImplDecl,
{ A typedef. }
TypedefDecl = CXCursor_TypedefDecl,
{ A C++ class method. }
CXXMethod = CXCursor_CXXMethod,
{ A C++ namespace. }
Namespace = CXCursor_Namespace,
{ A linkage specification, e.g. 'extern "C"'. }
LinkageSpec = CXCursor_LinkageSpec,
{ A C++ constructor. }
Ctor = CXCursor_Constructor,
{ A C++ destructor. }
Dtor = CXCursor_Destructor,
{ A C++ conversion function. }
ConversionFunction = CXCursor_ConversionFunction,
{ A C++ template type parameter. }
TemplateTypeParameter = CXCursor_TemplateTypeParameter,
{ A C++ non-type template parameter. }
NonTypeTemplateParameter = CXCursor_NonTypeTemplateParameter,
{ A C++ template template parameter. }
TemplateTemplateParameter = CXCursor_TemplateTemplateParameter,
{ A C++ function template. }
FunctionTemplate = CXCursor_FunctionTemplate,
{ A C++ class template. }
ClassTemplate = CXCursor_ClassTemplate,
{ A C++ class template partial specialization. }
ClassTemplatePartialSpecialization = CXCursor_ClassTemplatePartialSpecialization,
{ A C++ namespace alias declaration. }
NamespaceAlias = CXCursor_NamespaceAlias,
{ A C++ using directive. }
UsingDirective = CXCursor_UsingDirective,
{ A C++ using declaration. }
UsingDeclaration = CXCursor_UsingDeclaration,
{ A C++ alias declaration }
TypeAliasDecl = CXCursor_TypeAliasDecl,
{ An Objective-C @@synthesize definition. }
ObjCSynthesizeDecl = CXCursor_ObjCSynthesizeDecl,
{ An Objective-C @@dynamic definition. }
ObjCDynamicDecl = CXCursor_ObjCDynamicDecl,
{ An access specifier. }
CXXAccessSpecifier = CXCursor_CXXAccessSpecifier,
FirstDecl = CXCursor_FirstDecl,
LastDecl = CXCursor_LastDecl,
(* References *)
FirstRef = CXCursor_FirstRef,
ObjCSuperClassRef = CXCursor_ObjCSuperClassRef,
ObjCProtocolRef = CXCursor_ObjCProtocolRef,
ObjCClassRef = CXCursor_ObjCClassRef,
{ A reference to a type declaration.
A type reference occurs anywhere where a type is named but not declared.
For example, given:
@preformatted(
typedef unsigned size_type;
size_type size;
)
The typedef is a declaration of size_type (TypedefDecl), while the type of
the variable "size" is referenced. The cursor referenced by the type of
size is the typedef for size_type. }
TypeRef = CXCursor_TypeRef,
CXXBaseSpecifier = CXCursor_CXXBaseSpecifier,
{ A reference to a class template, function template, template parameter, or
class template partial specialization. }
TemplateRef = CXCursor_TemplateRef,
{ A reference to a namespace or namespace alias. }
NamespaceRef = CXCursor_NamespaceRef,
{ A reference to a member of a struct, union, or class that occurs in some
non-expression context, e.g., a designated initializer. }
MemberRef = CXCursor_MemberRef,
{ A reference to a labeled statement.
This cursor kind is used to describe the jump to "start_over" in the goto
statement in the following example:
@preformatted(
start_over:
++counter;
goto start_over;
)
A label reference cursor refers to a label statement. }
LabelRef = CXCursor_LabelRef,
(*A reference to a set of overloaded functions or function templates that
has not yet been resolved to a specific function or function template.
An overloaded declaration reference cursor occurs in C++ templates where
a dependent name refers to a function. For example:
@preformatted(
template<typename T> void swap(T&, T&);
struct X { ... };
void swap(X&, X&);
template<typename T>
void reverse(T* first, T* last) {
while (first < last - 1) {
swap(*first, *--last);
++first;
}
}
struct Y { };
void swap(Y&, Y&);
)
Here, the identifier "swap" is associated with an overloaded declaration
reference. In the template definition, "swap" refers to either of the two
"swap" functions declared above, so both results will be available. At
instantiation time, "swap" may also refer to other functions found via
argument-dependent lookup (e.g., the "swap" function at the end of the
example).
The property TCursor.OverloadedDecls can be used to retrieve the
definitions referenced by this cursor. *)
OverloadedDeclRef = CXCursor_OverloadedDeclRef,
{ A reference to a variable that occurs in some non-expression context,
e.g., a C++ lambda capture list. }
VariableRef = CXCursor_VariableRef,
LastRef = CXCursor_LastRef,
(* Error conditions *)
FirstInvalid = CXCursor_FirstInvalid,
InvalidFile = CXCursor_InvalidFile,
NoDeclFound = CXCursor_NoDeclFound,
NotImplemented = CXCursor_NotImplemented,
InvalidCode = CXCursor_InvalidCode,
LastInvalid = CXCursor_LastInvalid,
(* Expressions *)
FirstExpr = CXCursor_FirstExpr,
{ An expression whose specific kind is not exposed via this interface.
Unexposed expressions have the same operations as any other kind of
expression; one can extract their location information, spelling,
children, etc. However, the specific kind of the expression is not
reported. }
UnexposedExpr = CXCursor_UnexposedExpr,
{ An expression that refers to some value declaration, such as a function,
variable, or enumerator. }
DeclRefExpr = CXCursor_DeclRefExpr,
{ An expression that refers to a member of a struct, union, class,
Objective-C class, etc. }
MemberRefExpr = CXCursor_MemberRefExpr,
{ An expression that calls a function. }
CallExpr = CXCursor_CallExpr,
{ An expression that sends a message to an Objective-C object or class. }
ObjCMessageExpr = CXCursor_ObjCMessageExpr,
{ An expression that represents a block literal. }
BlockExpr = CXCursor_BlockExpr,
{ An integer literal. }
IntegerLiteral = CXCursor_IntegerLiteral,
{ A floating point number literal. }
FloatingLiteral = CXCursor_FloatingLiteral,
{ An imaginary number literal. }
ImaginaryLiteral = CXCursor_ImaginaryLiteral,
{ A string literal. }
StringLiteral = CXCursor_StringLiteral,
{ A character literal. }
CharacterLiteral = CXCursor_CharacterLiteral,
{ A parenthesized expression, e.g. "(1)".
This AST node is only formed if full location information is requested. }
ParenExpr = CXCursor_ParenExpr,
{ This represents the unary-expression's (except sizeof and alignof). }
UnaryOperator = CXCursor_UnaryOperator,
{ [C99 6.5.2.1] Array Subscripting. }
ArraySubscriptExpr = CXCursor_ArraySubscriptExpr,
{ A builtin binary operation expression such as "x + y" or "x <= y". }
BinaryOperator = CXCursor_BinaryOperator,
{ Compound assignment such as "+=". }
CompoundAssignOperator = CXCursor_CompoundAssignOperator,
{ The ?: ternary operator. }
ConditionalOperator = CXCursor_ConditionalOperator,
{ An explicit cast in C (C99 6.5.4) or a C-style cast in C++
(C++ [expr.cast]), which uses the syntax (Type)expr.
For example: (int)f. }
CStyleCastExpr = CXCursor_CStyleCastExpr,
{ [C99 6.5.2.5] }
CompoundLiteralExpr = CXCursor_CompoundLiteralExpr,
{ Describes an C or C++ initializer list. }
InitListExpr = CXCursor_InitListExpr,
{ The GNU address of label extension, representing &&label. }
AddrLabelExpr = CXCursor_AddrLabelExpr,
(* This is the GNU Statement Expression extension: ({int X=4; X;}) *)
StmtExpr = CXCursor_StmtExpr,
{ Represents a C11 generic selection. }
GenericSelectionExpr = CXCursor_GenericSelectionExpr,
{ Implements the GNU __null extension, which is a name for a null pointer
constant that has integral type (e.g., int or long) and is the same size
and alignment as a pointer.
The __null extension is typically only used by system headers, which
define NULL as __null in C++ rather than using 0 (which is an integer that
may not match the size of a pointer). }
GNUNullExpr = CXCursor_GNUNullExpr,
{ C++'s static_cast<> expression. }
CXXStaticCastExpr = CXCursor_CXXStaticCastExpr,
{ C++'s dynamic_cast<> expression. }
CXXDynamicCastExpr = CXCursor_CXXDynamicCastExpr,
{ C++'s reinterpret_cast<> expression. }
CXXReinterpretCastExpr = CXCursor_CXXReinterpretCastExpr,
{ C++'s const_cast<> expression. }
CXXConstCastExpr = CXCursor_CXXConstCastExpr,
{ Represents an explicit C++ type conversion that uses "functional" notion
(C++ [expr.type.conv]).
Example: x = int(0.5); }
CXXFunctionalCastExpr = CXCursor_CXXFunctionalCastExpr,
{ A C++ typeid expression (C++ [expr.typeid]). }
CXXTypeidExpr = CXCursor_CXXTypeidExpr,
{ [C++ 2.13.5] C++ Boolean Literal. }
CXXBoolLiteralExpr = CXCursor_CXXBoolLiteralExpr,
{ [C++0x 2.14.7] C++ Pointer Literal. }
CXXNullPtrLiteralExpr = CXCursor_CXXNullPtrLiteralExpr,
{ Represents the "this" expression in C++ }
CXXThisExpr = CXCursor_CXXThisExpr,
{ [C++ 15] C++ Throw Expression.
This handles 'throw' and 'throw' assignment-expression. When
assignment-expression isn't present, Op will be null. }
CXXThrowExpr = CXCursor_CXXThrowExpr,
{ A new expression for memory allocation and constructor calls, e.g:
"new CXXNewExpr(foo)". }
CXXNewExpr = CXCursor_CXXNewExpr,
{ A delete expression for memory deallocation and destructor calls,
e.g. "delete[] pArray". }
CXXDeleteExpr = CXCursor_CXXDeleteExpr,
{ A unary expression. (noexcept, sizeof, or other traits) }
UnaryExpr = CXCursor_UnaryExpr,
{ An Objective-C string literal i.e. @@"foo". }
ObjCStringLiteral = CXCursor_ObjCStringLiteral,
{ An Objective-C @@encode expression. }
ObjCEncodeExpr = CXCursor_ObjCEncodeExpr,
{ An Objective-C @@selector expression. }
ObjCSelectorExpr = CXCursor_ObjCSelectorExpr,
{ An Objective-C @@protocol expression. }
ObjCProtocolExpr = CXCursor_ObjCProtocolExpr,
{ An Objective-C "bridged" cast expression, which casts between Objective-C
pointers and C pointers, transferring ownership in the process.
NSString *str = (__bridge_transfer NSString *)CFCreateString(); }
ObjCBridgedCastExpr = CXCursor_ObjCBridgedCastExpr,
(*Represents a C++0x pack expansion that produces a sequence of expressions.
A pack expansion expression contains a pattern (which itself is an
expression) followed by an ellipsis. For example:
@preformatted(
template<typename F, typename ...Types>
void forward(F f, Types &&...args) {
f(static_cast<Types&&>(args)...);
};
) *)
PackExpansionExpr = CXCursor_PackExpansionExpr,
(*Represents an expression that computes the length of a parameter pack.
template<typename ...Types>
struct count {
static const unsigned value = sizeof...(Types);
}; *)
SizeOfPackExpr = CXCursor_SizeOfPackExpr,
(*Represents a C++ lambda expression that produces a local function object.
void abssort(float *x, unsigned N) {
std::sort(x, x + N,
[](float a, float b) {
return std::abs(a) < std::abs(b);
});
} *)
LambdaExpr = CXCursor_LambdaExpr,
{ Objective-c Boolean Literal. }
ObjCBoolLiteralExpr = CXCursor_ObjCBoolLiteralExpr,
{ Represents the "self" expression in an Objective-C method. }
ObjCSelfExpr = CXCursor_ObjCSelfExpr,
{ OpenMP 4.0 [2.4, Array Section]. }
OMPArraySectionExpr = CXCursor_OMPArraySectionExpr,
{ Represents an @@available(...) check. }
ObjCAvailabilityCheckExpr = CXCursor_ObjCAvailabilityCheckExpr,
{ Fixed point literal }
FixedPointLiteral = CXCursor_FixedPointLiteral,
{ OpenMP 5.0 [2.1.4, Array Shaping]. }
OMPArrayShapingExpr = CXCursor_OMPArrayShapingExpr,
{ OpenMP 5.0 [2.1.6 Iterators] }
OMPIteratorExpr = CXCursor_OMPIteratorExpr,
{ OpenCL's addrspace_cast<> expression. }
CXXAddrspaceCastExpr = CXCursor_CXXAddrspaceCastExpr,
LastExpr = CXCursor_LastExpr,
(* Statements *)
FirstStmt = CXCursor_FirstStmt,
{ A statement whose specific kind is not exposed via this interface.
Unexposed statements have the same operations as any other kind of
statement; one can extract their location information, spelling, children,
etc. However, the specific kind of the statement is not reported. }
UnexposedStmt = CXCursor_UnexposedStmt,
{ A labelled statement in a function.
This cursor kind is used to describe the "start_over:" label statement in
the following example:
@preformatted(
start_over:
++counter;
) }
LabelStmt = CXCursor_LabelStmt,
(*A group of statements like { stmt stmt }.
This cursor kind is used to describe compound statements, e.g. function
bodies. *)
CompoundStmt = CXCursor_CompoundStmt,
{ A case statement. }
CaseStmt = CXCursor_CaseStmt,
{ A default statement. }
DefaultStmt = CXCursor_DefaultStmt,
{ An if statement }
IfStmt = CXCursor_IfStmt,
{ A switch statement. }
SwitchStmt = CXCursor_SwitchStmt,
{ A while statement. }
WhileStmt = CXCursor_WhileStmt,
{ A do statement. }
DoStmt = CXCursor_DoStmt,
{ A for statement. }
ForStmt = CXCursor_ForStmt,
{ A goto statement. }
GotoStmt = CXCursor_GotoStmt,
{ An indirect goto statement. }
IndirectGotoStmt = CXCursor_IndirectGotoStmt,
{ A continue statement. }
ContinueStmt = CXCursor_ContinueStmt,
{ A break statement. }
BreakStmt = CXCursor_BreakStmt,
{ A return statement. }
ReturnStmt = CXCursor_ReturnStmt,
{ A GCC inline assembly statement extension. }
GCCAsmStmt = CXCursor_GCCAsmStmt,
AsmStmt = CXCursor_AsmStmt,
{ Objective-C's overall @@try-@@catch-@@finally statement. }
ObjCAtTryStmt = CXCursor_ObjCAtTryStmt,
{ Objective-C's @@catch statement. }
ObjCAtCatchStmt = CXCursor_ObjCAtCatchStmt,
{ Objective-C's @@finally statement. }
ObjCAtFinallyStmt = CXCursor_ObjCAtFinallyStmt,
{ Objective-C's @@throw statement. }
ObjCAtThrowStmt = CXCursor_ObjCAtThrowStmt,
{ Objective-C's @@synchronized statement. }
ObjCAtSynchronizedStmt = CXCursor_ObjCAtSynchronizedStmt,
{ Objective-C's autorelease pool statement. }
ObjCAutoreleasePoolStmt = CXCursor_ObjCAutoreleasePoolStmt,
{ Objective-C's collection statement. }
ObjCForCollectionStmt = CXCursor_ObjCForCollectionStmt,
{ C++'s catch statement. }
CXXCatchStmt = CXCursor_CXXCatchStmt,
{ C++'s try statement. }
CXXTryStmt = CXCursor_CXXTryStmt,
{ C++'s for (* : *) statement. }
CXXForRangeStmt = CXCursor_CXXForRangeStmt,
{ Windows Structured Exception Handling's try statement. }
SEHTryStmt = CXCursor_SEHTryStmt,
{ Windows Structured Exception Handling's except statement. }
SEHExceptStmt = CXCursor_SEHExceptStmt,
{ Windows Structured Exception Handling's finally statement. }
SEHFinallyStmt = CXCursor_SEHFinallyStmt,
{ A MS inline assembly statement extension. }
MSAsmStmt = CXCursor_MSAsmStmt,
{ The null statement ";": C99 6.8.3p3.
This cursor kind is used to describe the null statement. }
NullStmt = CXCursor_NullStmt,
{ Adaptor class for mixing declarations with statements and expressions. }
DeclStmt = CXCursor_DeclStmt,
{ OpenMP parallel directive. }
OMPParallelDirective = CXCursor_OMPParallelDirective,
{ OpenMP SIMD directive. }
OMPSimdDirective = CXCursor_OMPSimdDirective,
{ OpenMP for directive. }
OMPForDirective = CXCursor_OMPForDirective,
{ OpenMP sections directive. }
OMPSectionsDirective = CXCursor_OMPSectionsDirective,
{ OpenMP section directive. }
OMPSectionDirective = CXCursor_OMPSectionDirective,
{ OpenMP single directive. }
OMPSingleDirective = CXCursor_OMPSingleDirective,
{ OpenMP parallel for directive. }
OMPParallelForDirective = CXCursor_OMPParallelForDirective,
{ OpenMP parallel sections directive. }
OMPParallelSectionsDirective = CXCursor_OMPParallelSectionsDirective,
{ OpenMP task directive. }
OMPTaskDirective = CXCursor_OMPTaskDirective,
{ OpenMP master directive. }
OMPMasterDirective = CXCursor_OMPMasterDirective,
{ OpenMP critical directive. }
OMPCriticalDirective = CXCursor_OMPCriticalDirective,
{ OpenMP taskyield directive. }
OMPTaskyieldDirective = CXCursor_OMPTaskyieldDirective,
{ OpenMP barrier directive. }
OMPBarrierDirective = CXCursor_OMPBarrierDirective,
{ OpenMP taskwait directive. }
OMPTaskwaitDirective = CXCursor_OMPTaskwaitDirective,
{ OpenMP flush directive. }
OMPFlushDirective = CXCursor_OMPFlushDirective,
{ Windows Structured Exception Handling's leave statement. }
SEHLeaveStmt = CXCursor_SEHLeaveStmt,
{ OpenMP ordered directive. }
OMPOrderedDirective = CXCursor_OMPOrderedDirective,
{ OpenMP atomic directive. }
OMPAtomicDirective = CXCursor_OMPAtomicDirective,
{ OpenMP for SIMD directive. }
OMPForSimdDirective = CXCursor_OMPForSimdDirective,
{ OpenMP parallel for SIMD directive. }
OMPParallelForSimdDirective = CXCursor_OMPParallelForSimdDirective,
{ OpenMP target directive. }
OMPTargetDirective = CXCursor_OMPTargetDirective,
{ OpenMP teams directive. }
OMPTeamsDirective = CXCursor_OMPTeamsDirective,
{ OpenMP taskgroup directive. }
OMPTaskgroupDirective = CXCursor_OMPTaskgroupDirective,
{ OpenMP cancellation point directive. }
OMPCancellationPointDirective = CXCursor_OMPCancellationPointDirective,
{ OpenMP cancel directive. }
OMPCancelDirective = CXCursor_OMPCancelDirective,
{ OpenMP target data directive. }
OMPTargetDataDirective = CXCursor_OMPTargetDataDirective,
{ OpenMP taskloop directive. }
OMPTaskLoopDirective = CXCursor_OMPTaskLoopDirective,
{ OpenMP taskloop simd directive. }
OMPTaskLoopSimdDirective = CXCursor_OMPTaskLoopSimdDirective,
{ OpenMP distribute directive. }
OMPDistributeDirective = CXCursor_OMPDistributeDirective,
{ OpenMP target enter data directive. }
OMPTargetEnterDataDirective = CXCursor_OMPTargetEnterDataDirective,
{ OpenMP target exit data directive. }
OMPTargetExitDataDirective = CXCursor_OMPTargetExitDataDirective,
{ OpenMP target parallel directive. }
OMPTargetParallelDirective = CXCursor_OMPTargetParallelDirective,
{ OpenMP target parallel for directive. }
OMPTargetParallelForDirective = CXCursor_OMPTargetParallelForDirective,
{ OpenMP target update directive. }
OMPTargetUpdateDirective = CXCursor_OMPTargetUpdateDirective,
{ OpenMP distribute parallel for directive. }
OMPDistributeParallelForDirective = CXCursor_OMPDistributeParallelForDirective,
{ OpenMP distribute parallel for simd directive. }
OMPDistributeParallelForSimdDirective = CXCursor_OMPDistributeParallelForSimdDirective,
{ OpenMP distribute simd directive. }
OMPDistributeSimdDirective = CXCursor_OMPDistributeSimdDirective,
{ OpenMP target parallel for simd directive. }
OMPTargetParallelForSimdDirective = CXCursor_OMPTargetParallelForSimdDirective,
{ OpenMP target simd directive. }
OMPTargetSimdDirective = CXCursor_OMPTargetSimdDirective,
{ OpenMP teams distribute directive. }
OMPTeamsDistributeDirective = CXCursor_OMPTeamsDistributeDirective,
{ OpenMP teams distribute simd directive. }
OMPTeamsDistributeSimdDirective = CXCursor_OMPTeamsDistributeSimdDirective,
{ OpenMP teams distribute parallel for simd directive. }
OMPTeamsDistributeParallelForSimdDirective = CXCursor_OMPTeamsDistributeParallelForSimdDirective,
{ OpenMP teams distribute parallel for directive. }
OMPTeamsDistributeParallelForDirective = CXCursor_OMPTeamsDistributeParallelForDirective,
{ OpenMP target teams directive. }
OMPTargetTeamsDirective = CXCursor_OMPTargetTeamsDirective,
{ OpenMP target teams distribute directive. }
OMPTargetTeamsDistributeDirective = CXCursor_OMPTargetTeamsDistributeDirective,
{ OpenMP target teams distribute parallel for directive. }
OMPTargetTeamsDistributeParallelForDirective = CXCursor_OMPTargetTeamsDistributeParallelForDirective,
{ OpenMP target teams distribute parallel for simd directive. }
OMPTargetTeamsDistributeParallelForSimdDirective = CXCursor_OMPTargetTeamsDistributeParallelForSimdDirective,
{ OpenMP target teams distribute simd directive. }
OMPTargetTeamsDistributeSimdDirective = CXCursor_OMPTargetTeamsDistributeSimdDirective,
{ C++2a std::bit_cast expression. }
BuiltinBitCastExpr = CXCursor_BuiltinBitCastExpr,
{ OpenMP master taskloop directive. }
OMPMasterTaskLoopDirective = CXCursor_OMPMasterTaskLoopDirective,
{ OpenMP parallel master taskloop directive. }
OMPParallelMasterTaskLoopDirective = CXCursor_OMPParallelMasterTaskLoopDirective,
{ OpenMP master taskloop simd directive. }
OMPMasterTaskLoopSimdDirective = CXCursor_OMPMasterTaskLoopSimdDirective,
{ OpenMP parallel master taskloop simd directive. }
OMPParallelMasterTaskLoopSimdDirective = CXCursor_OMPParallelMasterTaskLoopSimdDirective,
{ OpenMP parallel master directive. }
OMPParallelMasterDirective = CXCursor_OMPParallelMasterDirective,
{ OpenMP depobj directive. }
OMPDepobjDirective = CXCursor_OMPDepobjDirective,
{ OpenMP scan directive. }
OMPScanDirective = CXCursor_OMPScanDirective,
{ OpenMP tile directive. }
OMPTileDirective = CXCursor_OMPTileDirective,
{ OpenMP canonical loop. }
OMPCanonicalLoop = CXCursor_OMPCanonicalLoop,
{ OpenMP interop directive. }
OMPInteropDirective = CXCursor_OMPInteropDirective,
{ OpenMP dispatch directive. }
OMPDispatchDirective = CXCursor_OMPDispatchDirective,
{ OpenMP masked directive. }
OMPMaskedDirective = CXCursor_OMPMaskedDirective,
{ OpenMP unroll directive. }
OMPUnrollDirective = CXCursor_OMPUnrollDirective,
{ OpenMP metadirective directive. }
OMPMetaDirective = CXCursor_OMPMetaDirective,
{ OpenMP loop directive. }
OMPGenericLoopDirective = CXCursor_OMPGenericLoopDirective,