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

IArrayCreationExpression.Dimensions for explicit versus implicit case #18155

Closed
mavasani opened this issue Mar 24, 2017 · 5 comments
Closed

IArrayCreationExpression.Dimensions for explicit versus implicit case #18155

mavasani opened this issue Mar 24, 2017 · 5 comments
Assignees
Labels
Area-Analyzers Bug Concept-API This issue involves adding, removing, clarification, or modification of an API. Feature - IOperation IOperation
Milestone

Comments

@mavasani
Copy link
Contributor

An IArrayCreationExpression might have explicitly specified or implicitly generated dimensions. Currently, we expose all the Dimension IOperations, regardless of whether they are explicit in source or implicitly computed by the compiler: http://source.roslyn.io/#Microsoft.CodeAnalysis/Compilation/IExpression.cs,1227

Open questions:

  1. Should the Dimensions exposed on IArrayCreationExpression filter out implicitly computed dimension?
  2. If yes, should we have a separate helper (extension) method on IArrayCreation to get implicitly computed dimensions and rename the current Dimensions property to something like ExplicitDimensions?
  3. If no, what is the expectation from an analyzer analyzing and reporting diagnostics on numerical literals? We can't expect all such analyzers to check for generated IOperations...
@mavasani mavasani added Area-Analyzers Bug Concept-API This issue involves adding, removing, clarification, or modification of an API. Feature - IOperation IOperation labels Mar 24, 2017
@jinujoseph jinujoseph added this to the 15.later milestone Apr 18, 2017
@jinujoseph jinujoseph modified the milestones: 15.6, 15.later May 8, 2017
@jinujoseph
Copy link
Contributor

jinujoseph commented May 8, 2017

Design Team Decision

It was decided that for Ioperation API in general, when we will have compiler generated or Implicitly computed by compiler code exposed for all Ioperation nodes and a IsImplicit flag will be set to true to indicate the same.

It was also decided that we will not have an API on the Analysis context to register/configure to filter out the compiler generated code. For example analyzer author won't be able to say i am only interested in analyzing the invocations but don't call back on compiler generated expressions.
We can add that in future based on ask and scenarios.

@bkoelman
Copy link
Contributor

bkoelman commented May 9, 2017

Is this decision about IArrayCreationExpression or IOperation in general? I'm still hoping that WasCompilerGenerated will be publicly exposed, but this may be unrelated.

@jinujoseph
Copy link
Contributor

@bkoelman i have updated the comments to clarify.

@bkoelman
Copy link
Contributor

Thanks

@tmat
Copy link
Member

tmat commented Sep 6, 2017

Resolved by #21363

@tmat tmat closed this as completed Sep 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Analyzers Bug Concept-API This issue involves adding, removing, clarification, or modification of an API. Feature - IOperation IOperation
Projects
None yet
Development

No branches or pull requests

5 participants