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

Need a proper representation for __arglist argument for IOperation #19673

Closed
genlu opened this issue May 20, 2017 · 6 comments
Closed

Need a proper representation for __arglist argument for IOperation #19673

genlu opened this issue May 20, 2017 · 6 comments
Assignees
Labels
Area-Analyzers Feature - IOperation IOperation _Product-level triaged Resolution-Duplicate The described behavior is tracked in another issue
Milestone

Comments

@genlu
Copy link
Member

genlu commented May 20, 2017

Take the following example,

        Console.Write("{0} {1} {2} {3} {4}", 1, 2, 3, 4, __arglist(5));

The __arglist is currently returned as:

    IArgument (ArgumentKind.Explicit, Matching Parameter: null) (OperationKind.Argument, IsInvalid) (Syntax: '__arglist(5)')
      IOperation:  (OperationKind.None) (Syntax: '__arglist(5)')
        Children(1): ILiteralExpression (Text: 5) (OperationKind.LiteralExpression, Type: System.Int32, Constant: 5) (Syntax: '5')

I believe this can be solved by simply adding ArgumentKind.ArgList, and create such an IArgument based on underlying BoundArgListOperator.

@genlu
Copy link
Member Author

genlu commented May 20, 2017

FYI @heejaechang @jinujoseph

@nguerrera
Copy link
Contributor

#8394

@jinujoseph jinujoseph added this to the 15.6 milestone May 22, 2017
@genlu
Copy link
Member Author

genlu commented May 31, 2017

Do we want to discuss this today? @jinujoseph

@jinujoseph
Copy link
Contributor

sure , we should actually discuss #8394 in general

@CyrusNajmabadi
Copy link
Member

CyrusNajmabadi commented Jun 1, 2017

Design Team Decision
We think we should have:

    public interface IArgList : IOperation
    {
        List<IOperation> Values;
    }

If user uses __arglist(1, 2, 3), then they will have an IArgument with a VAlue that is this IArgList. The IArgList will point at 1, 2, 3. The Kind of the ArgumentKind of the IArgument will be a new value called ... ArgList

@mavasani
Copy link
Contributor

Dupe of #8394

@mavasani mavasani added the Resolution-Duplicate The described behavior is tracked in another issue label Jun 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Analyzers Feature - IOperation IOperation _Product-level triaged Resolution-Duplicate The described behavior is tracked in another issue
Projects
None yet
Development

No branches or pull requests

6 participants