Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding support for parsing expressions attached to EnumConstantDecl #45

Merged
merged 3 commits into from
May 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions ClangSharp/Generated/CXAvailabilityKind.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ namespace ClangSharp
{
public enum CXAvailabilityKind
{
CXAvailability_Available = 0,
CXAvailability_Deprecated = 1,
CXAvailability_NotAvailable = 2,
CXAvailability_NotAccessible = 3,
CXAvailability_Available,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The header file doesn't explicitly set the values for most enums and we don't need to either.

CXAvailability_Deprecated,
CXAvailability_NotAvailable,
CXAvailability_NotAccessible,
}
}
2 changes: 1 addition & 1 deletion ClangSharp/Generated/CXCallingConv.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public enum CXCallingConv
CXCallingConv_X86RegCall = 8,
CXCallingConv_IntelOclBicc = 9,
CXCallingConv_Win64 = 10,
CXCallingConv_X86_64Win64 = 10,
CXCallingConv_X86_64Win64 = CXCallingConv_Win64,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An example of traversing a declaration reference expression

CXCallingConv_X86_64SysV = 11,
CXCallingConv_X86VectorCall = 12,
CXCallingConv_Swift = 13,
Expand Down
6 changes: 3 additions & 3 deletions ClangSharp/Generated/CXChildVisitResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ namespace ClangSharp
{
public enum CXChildVisitResult
{
CXChildVisit_Break = 0,
CXChildVisit_Continue = 1,
CXChildVisit_Recurse = 2,
CXChildVisit_Break,
CXChildVisit_Continue,
CXChildVisit_Recurse,
}
}
10 changes: 5 additions & 5 deletions ClangSharp/Generated/CXCodeComplete_Flags.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ namespace ClangSharp
{
public enum CXCodeComplete_Flags
{
CXCodeComplete_IncludeMacros = 1,
CXCodeComplete_IncludeCodePatterns = 2,
CXCodeComplete_IncludeBriefComments = 4,
CXCodeComplete_SkipPreamble = 8,
CXCodeComplete_IncludeCompletionsWithFixIts = 16,
CXCodeComplete_IncludeMacros = 0x01,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An example of traversing an integer literal expression

CXCodeComplete_IncludeCodePatterns = 0x02,
CXCodeComplete_IncludeBriefComments = 0x04,
CXCodeComplete_SkipPreamble = 0x08,
CXCodeComplete_IncludeCompletionsWithFixIts = 0x10,
}
}
8 changes: 4 additions & 4 deletions ClangSharp/Generated/CXCommentInlineCommandRenderKind.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ namespace ClangSharp
{
public enum CXCommentInlineCommandRenderKind
{
CXCommentInlineCommandRenderKind_Normal = 0,
CXCommentInlineCommandRenderKind_Bold = 1,
CXCommentInlineCommandRenderKind_Monospaced = 2,
CXCommentInlineCommandRenderKind_Emphasized = 3,
CXCommentInlineCommandRenderKind_Normal,
CXCommentInlineCommandRenderKind_Bold,
CXCommentInlineCommandRenderKind_Monospaced,
CXCommentInlineCommandRenderKind_Emphasized,
}
}
6 changes: 3 additions & 3 deletions ClangSharp/Generated/CXCommentParamPassDirection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ namespace ClangSharp
{
public enum CXCommentParamPassDirection
{
CXCommentParamPassDirection_In = 0,
CXCommentParamPassDirection_Out = 1,
CXCommentParamPassDirection_InOut = 2,
CXCommentParamPassDirection_In,
CXCommentParamPassDirection_Out,
CXCommentParamPassDirection_InOut,
}
}
42 changes: 21 additions & 21 deletions ClangSharp/Generated/CXCompletionChunkKind.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,26 @@ namespace ClangSharp
{
public enum CXCompletionChunkKind
{
CXCompletionChunk_Optional = 0,
CXCompletionChunk_TypedText = 1,
CXCompletionChunk_Text = 2,
CXCompletionChunk_Placeholder = 3,
CXCompletionChunk_Informative = 4,
CXCompletionChunk_CurrentParameter = 5,
CXCompletionChunk_LeftParen = 6,
CXCompletionChunk_RightParen = 7,
CXCompletionChunk_LeftBracket = 8,
CXCompletionChunk_RightBracket = 9,
CXCompletionChunk_LeftBrace = 10,
CXCompletionChunk_RightBrace = 11,
CXCompletionChunk_LeftAngle = 12,
CXCompletionChunk_RightAngle = 13,
CXCompletionChunk_Comma = 14,
CXCompletionChunk_ResultType = 15,
CXCompletionChunk_Colon = 16,
CXCompletionChunk_SemiColon = 17,
CXCompletionChunk_Equal = 18,
CXCompletionChunk_HorizontalSpace = 19,
CXCompletionChunk_VerticalSpace = 20,
CXCompletionChunk_Optional,
CXCompletionChunk_TypedText,
CXCompletionChunk_Text,
CXCompletionChunk_Placeholder,
CXCompletionChunk_Informative,
CXCompletionChunk_CurrentParameter,
CXCompletionChunk_LeftParen,
CXCompletionChunk_RightParen,
CXCompletionChunk_LeftBracket,
CXCompletionChunk_RightBracket,
CXCompletionChunk_LeftBrace,
CXCompletionChunk_RightBrace,
CXCompletionChunk_LeftAngle,
CXCompletionChunk_RightAngle,
CXCompletionChunk_Comma,
CXCompletionChunk_ResultType,
CXCompletionChunk_Colon,
CXCompletionChunk_SemiColon,
CXCompletionChunk_Equal,
CXCompletionChunk_HorizontalSpace,
CXCompletionChunk_VerticalSpace,
}
}
48 changes: 24 additions & 24 deletions ClangSharp/Generated/CXCompletionContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,29 @@ namespace ClangSharp
public enum CXCompletionContext
{
CXCompletionContext_Unexposed = 0,
CXCompletionContext_AnyType = 1,
CXCompletionContext_AnyValue = 2,
CXCompletionContext_ObjCObjectValue = 4,
CXCompletionContext_ObjCSelectorValue = 8,
CXCompletionContext_CXXClassTypeValue = 16,
CXCompletionContext_DotMemberAccess = 32,
CXCompletionContext_ArrowMemberAccess = 64,
CXCompletionContext_ObjCPropertyAccess = 128,
CXCompletionContext_EnumTag = 256,
CXCompletionContext_UnionTag = 512,
CXCompletionContext_StructTag = 1024,
CXCompletionContext_ClassTag = 2048,
CXCompletionContext_Namespace = 4096,
CXCompletionContext_NestedNameSpecifier = 8192,
CXCompletionContext_ObjCInterface = 16384,
CXCompletionContext_ObjCProtocol = 32768,
CXCompletionContext_ObjCCategory = 65536,
CXCompletionContext_ObjCInstanceMessage = 131072,
CXCompletionContext_ObjCClassMessage = 262144,
CXCompletionContext_ObjCSelectorName = 524288,
CXCompletionContext_MacroName = 1048576,
CXCompletionContext_NaturalLanguage = 2097152,
CXCompletionContext_IncludedFile = 4194304,
CXCompletionContext_Unknown = 8388607,
CXCompletionContext_AnyType = 1 << 0,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An example of traversing a binary operator expression

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice!

CXCompletionContext_AnyValue = 1 << 1,
CXCompletionContext_ObjCObjectValue = 1 << 2,
CXCompletionContext_ObjCSelectorValue = 1 << 3,
CXCompletionContext_CXXClassTypeValue = 1 << 4,
CXCompletionContext_DotMemberAccess = 1 << 5,
CXCompletionContext_ArrowMemberAccess = 1 << 6,
CXCompletionContext_ObjCPropertyAccess = 1 << 7,
CXCompletionContext_EnumTag = 1 << 8,
CXCompletionContext_UnionTag = 1 << 9,
CXCompletionContext_StructTag = 1 << 10,
CXCompletionContext_ClassTag = 1 << 11,
CXCompletionContext_Namespace = 1 << 12,
CXCompletionContext_NestedNameSpecifier = 1 << 13,
CXCompletionContext_ObjCInterface = 1 << 14,
CXCompletionContext_ObjCProtocol = 1 << 15,
CXCompletionContext_ObjCCategory = 1 << 16,
CXCompletionContext_ObjCInstanceMessage = 1 << 17,
CXCompletionContext_ObjCClassMessage = 1 << 18,
CXCompletionContext_ObjCSelectorName = 1 << 19,
CXCompletionContext_MacroName = 1 << 20,
CXCompletionContext_NaturalLanguage = 1 << 21,
CXCompletionContext_IncludedFile = 1 << 22,
CXCompletionContext_Unknown = ((1 << 23) - 1),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

even works with parentheses

}
}
26 changes: 13 additions & 13 deletions ClangSharp/Generated/CXCursorKind.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ public enum CXCursorKind
CXCursor_ObjCSynthesizeDecl = 37,
CXCursor_ObjCDynamicDecl = 38,
CXCursor_CXXAccessSpecifier = 39,
CXCursor_FirstDecl = 1,
CXCursor_LastDecl = 39,
CXCursor_FirstDecl = CXCursor_UnexposedDecl,
CXCursor_LastDecl = CXCursor_CXXAccessSpecifier,
CXCursor_FirstRef = 40,
CXCursor_ObjCSuperClassRef = 40,
CXCursor_ObjCProtocolRef = 41,
Expand All @@ -55,13 +55,13 @@ public enum CXCursorKind
CXCursor_LabelRef = 48,
CXCursor_OverloadedDeclRef = 49,
CXCursor_VariableRef = 50,
CXCursor_LastRef = 50,
CXCursor_LastRef = CXCursor_VariableRef,
CXCursor_FirstInvalid = 70,
CXCursor_InvalidFile = 70,
CXCursor_NoDeclFound = 71,
CXCursor_NotImplemented = 72,
CXCursor_InvalidCode = 73,
CXCursor_LastInvalid = 73,
CXCursor_LastInvalid = CXCursor_InvalidCode,
CXCursor_FirstExpr = 100,
CXCursor_UnexposedExpr = 100,
CXCursor_DeclRefExpr = 101,
Expand Down Expand Up @@ -113,7 +113,7 @@ public enum CXCursorKind
CXCursor_OMPArraySectionExpr = 147,
CXCursor_ObjCAvailabilityCheckExpr = 148,
CXCursor_FixedPointLiteral = 149,
CXCursor_LastExpr = 149,
CXCursor_LastExpr = CXCursor_FixedPointLiteral,
CXCursor_FirstStmt = 200,
CXCursor_UnexposedStmt = 200,
CXCursor_LabelStmt = 201,
Expand All @@ -131,7 +131,7 @@ public enum CXCursorKind
CXCursor_BreakStmt = 213,
CXCursor_ReturnStmt = 214,
CXCursor_GCCAsmStmt = 215,
CXCursor_AsmStmt = 215,
CXCursor_AsmStmt = CXCursor_GCCAsmStmt,
CXCursor_ObjCAtTryStmt = 216,
CXCursor_ObjCAtCatchStmt = 217,
CXCursor_ObjCAtFinallyStmt = 218,
Expand Down Expand Up @@ -196,7 +196,7 @@ public enum CXCursorKind
CXCursor_OMPTargetTeamsDistributeParallelForDirective = 277,
CXCursor_OMPTargetTeamsDistributeParallelForSimdDirective = 278,
CXCursor_OMPTargetTeamsDistributeSimdDirective = 279,
CXCursor_LastStmt = 279,
CXCursor_LastStmt = CXCursor_OMPTargetTeamsDistributeSimdDirective,
CXCursor_TranslationUnit = 300,
CXCursor_FirstAttr = 400,
CXCursor_UnexposedAttr = 400,
Expand Down Expand Up @@ -237,20 +237,20 @@ public enum CXCursorKind
CXCursor_ObjCRuntimeVisible = 435,
CXCursor_ObjCBoxable = 436,
CXCursor_FlagEnum = 437,
CXCursor_LastAttr = 437,
CXCursor_LastAttr = CXCursor_FlagEnum,
CXCursor_PreprocessingDirective = 500,
CXCursor_MacroDefinition = 501,
CXCursor_MacroExpansion = 502,
CXCursor_MacroInstantiation = 502,
CXCursor_MacroInstantiation = CXCursor_MacroExpansion,
CXCursor_InclusionDirective = 503,
CXCursor_FirstPreprocessing = 500,
CXCursor_LastPreprocessing = 503,
CXCursor_FirstPreprocessing = CXCursor_PreprocessingDirective,
CXCursor_LastPreprocessing = CXCursor_InclusionDirective,
CXCursor_ModuleImportDecl = 600,
CXCursor_TypeAliasTemplateDecl = 601,
CXCursor_StaticAssert = 602,
CXCursor_FriendDecl = 603,
CXCursor_FirstExtraDecl = 600,
CXCursor_LastExtraDecl = 603,
CXCursor_FirstExtraDecl = CXCursor_ModuleImportDecl,
CXCursor_LastExtraDecl = CXCursor_FriendDecl,
CXCursor_OverloadCandidate = 700,
}
}
18 changes: 9 additions & 9 deletions ClangSharp/Generated/CXCursor_ExceptionSpecificationKind.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ namespace ClangSharp
{
public enum CXCursor_ExceptionSpecificationKind
{
CXCursor_ExceptionSpecificationKind_None = 0,
CXCursor_ExceptionSpecificationKind_DynamicNone = 1,
CXCursor_ExceptionSpecificationKind_Dynamic = 2,
CXCursor_ExceptionSpecificationKind_MSAny = 3,
CXCursor_ExceptionSpecificationKind_BasicNoexcept = 4,
CXCursor_ExceptionSpecificationKind_ComputedNoexcept = 5,
CXCursor_ExceptionSpecificationKind_Unevaluated = 6,
CXCursor_ExceptionSpecificationKind_Uninstantiated = 7,
CXCursor_ExceptionSpecificationKind_Unparsed = 8,
CXCursor_ExceptionSpecificationKind_None,
CXCursor_ExceptionSpecificationKind_DynamicNone,
CXCursor_ExceptionSpecificationKind_Dynamic,
CXCursor_ExceptionSpecificationKind_MSAny,
CXCursor_ExceptionSpecificationKind_BasicNoexcept,
CXCursor_ExceptionSpecificationKind_ComputedNoexcept,
CXCursor_ExceptionSpecificationKind_Unevaluated,
CXCursor_ExceptionSpecificationKind_Uninstantiated,
CXCursor_ExceptionSpecificationKind_Unparsed,
}
}
12 changes: 6 additions & 6 deletions ClangSharp/Generated/CXDiagnosticDisplayOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ namespace ClangSharp
{
public enum CXDiagnosticDisplayOptions
{
CXDiagnostic_DisplaySourceLocation = 1,
CXDiagnostic_DisplayColumn = 2,
CXDiagnostic_DisplaySourceRanges = 4,
CXDiagnostic_DisplayOption = 8,
CXDiagnostic_DisplayCategoryId = 16,
CXDiagnostic_DisplayCategoryName = 32,
CXDiagnostic_DisplaySourceLocation = 0x01,
CXDiagnostic_DisplayColumn = 0x02,
CXDiagnostic_DisplaySourceRanges = 0x04,
CXDiagnostic_DisplayOption = 0x08,
CXDiagnostic_DisplayCategoryId = 0x10,
CXDiagnostic_DisplayCategoryName = 0x20,
}
}
8 changes: 4 additions & 4 deletions ClangSharp/Generated/CXGlobalOptFlags.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ namespace ClangSharp
{
public enum CXGlobalOptFlags
{
CXGlobalOpt_None = 0,
CXGlobalOpt_ThreadBackgroundPriorityForIndexing = 1,
CXGlobalOpt_ThreadBackgroundPriorityForEditing = 2,
CXGlobalOpt_ThreadBackgroundPriorityForAll = 3,
CXGlobalOpt_None = 0x0,
CXGlobalOpt_ThreadBackgroundPriorityForIndexing = 0x1,
CXGlobalOpt_ThreadBackgroundPriorityForEditing = 0x2,
CXGlobalOpt_ThreadBackgroundPriorityForAll = CXGlobalOpt_ThreadBackgroundPriorityForIndexing | CXGlobalOpt_ThreadBackgroundPriorityForEditing,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and combining multiple declaration references

}
}
2 changes: 1 addition & 1 deletion ClangSharp/Generated/CXIdxDeclInfoFlags.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ namespace ClangSharp
{
public enum CXIdxDeclInfoFlags
{
CXIdxDeclFlag_Skipped = 1,
CXIdxDeclFlag_Skipped = 0x1,
}
}
12 changes: 6 additions & 6 deletions ClangSharp/Generated/CXIndexOptFlags.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ namespace ClangSharp
{
public enum CXIndexOptFlags
{
CXIndexOpt_None = 0,
CXIndexOpt_SuppressRedundantRefs = 1,
CXIndexOpt_IndexFunctionLocalSymbols = 2,
CXIndexOpt_IndexImplicitTemplateInstantiations = 4,
CXIndexOpt_SuppressWarnings = 8,
CXIndexOpt_SkipParsedBodiesInSession = 16,
CXIndexOpt_None = 0x0,
CXIndexOpt_SuppressRedundantRefs = 0x1,
CXIndexOpt_IndexFunctionLocalSymbols = 0x2,
CXIndexOpt_IndexImplicitTemplateInstantiations = 0x4,
CXIndexOpt_SuppressWarnings = 0x8,
CXIndexOpt_SkipParsedBodiesInSession = 0x10,
}
}
6 changes: 3 additions & 3 deletions ClangSharp/Generated/CXLanguageKind.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ namespace ClangSharp
public enum CXLanguageKind
{
CXLanguage_Invalid = 0,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An example of the native header explicitly setting the value for one entry, but not the subsequent declarations

CXLanguage_C = 1,
CXLanguage_ObjC = 2,
CXLanguage_CPlusPlus = 3,
CXLanguage_C,
CXLanguage_ObjC,
CXLanguage_CPlusPlus,
}
}
10 changes: 5 additions & 5 deletions ClangSharp/Generated/CXLinkageKind.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ namespace ClangSharp
{
public enum CXLinkageKind
{
CXLinkage_Invalid = 0,
CXLinkage_NoLinkage = 1,
CXLinkage_Internal = 2,
CXLinkage_UniqueExternal = 3,
CXLinkage_External = 4,
CXLinkage_Invalid,
CXLinkage_NoLinkage,
CXLinkage_Internal,
CXLinkage_UniqueExternal,
CXLinkage_External,
}
}
6 changes: 3 additions & 3 deletions ClangSharp/Generated/CXNameRefFlags.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ namespace ClangSharp
{
public enum CXNameRefFlags
{
CXNameRange_WantQualifier = 1,
CXNameRange_WantTemplateArgs = 2,
CXNameRange_WantSinglePiece = 4,
CXNameRange_WantQualifier = 0x1,
CXNameRange_WantTemplateArgs = 0x2,
CXNameRange_WantSinglePiece = 0x4,
}
}
Loading