The Wayback Machine - https://web.archive.org/web/20260214202048/https://github.com/github/codeql/pull/4775
Skip to content

C#: Improve CIL attribute decoding#4775

Merged
tamasvajk merged 11 commits intogithub:mainfrom
tamasvajk:feature/cil-attribute-decoding2
Dec 17, 2020
Merged

C#: Improve CIL attribute decoding#4775
tamasvajk merged 11 commits intogithub:mainfrom
tamasvajk:feature/cil-attribute-decoding2

Conversation

@tamasvajk
Copy link
Contributor

@tamasvajk tamasvajk commented Dec 3, 2020

Attribute decoding was missing

  • underlying enum types,
  • in some cases types, and
  • a way to get the type representing System.Type.

This PR starts to use the underlying enum type for TypeDefinitionTypes from the below PR. And introduces a thin Type layer where a DB CIL type is created from a fully qualified name. (Previously these types were created from metadata handles.) Types from TypeReferenceType, TypeDefinitionType, ConstructedType and the newly added NoMetadataHandleType have compatible DB ID generation, which means eventually the types created from different handles or no handles will be mapped to the same QL entity.

This PR is based on top of #4761, which already fixed the test failure.

C# differences job

@github-actions github-actions bot added the C# label Dec 3, 2020
@tamasvajk tamasvajk force-pushed the feature/cil-attribute-decoding2 branch 4 times, most recently from 39e8650 to 5aaa245 Compare December 7, 2020 13:55
@tamasvajk tamasvajk force-pushed the feature/cil-attribute-decoding2 branch from 5aaa245 to a7451a1 Compare December 9, 2020 20:24
@tamasvajk tamasvajk marked this pull request as ready for review December 11, 2020 08:47
@tamasvajk tamasvajk requested a review from a team as a code owner December 11, 2020 08:47
Copy link
Contributor

@hvitved hvitved left a comment

Choose a reason for hiding this comment

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

Great improvements, Tamas. I have a few minor comments.

@tamasvajk tamasvajk merged commit 45893ab into github:main Dec 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

HTTPS · web.archive.org
← Home