{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/roslyn/pulls/comments/40746548","id":40746548,"diff_hunk":"@@ -0,0 +1,1447 @@\n+﻿// Copyright (c) Microsoft.  All Rights Reserved.  Licensed under the Apache License, Version 2.0.  See License.txt in the project root for license information.\n+\n+using System.Collections.Generic;\n+using System.Collections.Immutable;\n+using System.Linq;\n+using Microsoft.CodeAnalysis.Semantics;\n+\n+namespace Microsoft.CodeAnalysis.CSharp\n+{\n+    partial class BoundExpression : IExpression\n+    {\n+        ITypeSymbol IExpression.ResultType => this.Type;\n+\n+        OperationKind IOperation.Kind => this.ExpressionKind;\n+       \n+        object IExpression.ConstantValue => this.ConstantValue?.Value;\n+\n+        SyntaxNode IOperation.Syntax => this.Syntax;\n+        \n+        protected virtual OperationKind ExpressionKind => OperationKind.None;\n+        // protected abstract OperationKind ExpressionKind { get; }\n+    }\n+\n+    internal abstract partial class BoundNode : IOperationSearchable\n+    {\n+        IEnumerable<IOperation> IOperationSearchable.Descendants()\n+        {\n+            var list = new List<IOperation>();\n+            new Collector(list).Visit(this);\n+            list.RemoveAt(0);\n+            return list;\n+        }\n+\n+        IEnumerable<IOperation> IOperationSearchable.DescendantsAndSelf()\n+        {\n+            var list = new List<IOperation>();\n+            new Collector(list).Visit(this);\n+            return list;\n+        }\n+\n+        private class Collector : BoundTreeWalker\n+        {\n+            private readonly List<IOperation> nodes;\n+\n+            public Collector(List<IOperation> nodes)\n+            {\n+                this.nodes = nodes;\n+            }\n+\n+            public override BoundNode Visit(BoundNode node)\n+            {\n+                IOperation operation = node as IOperation;\n+                if (operation != null)\n+                {\n+                    this.nodes.Add(operation);\n+                }\n+\n+                return base.Visit(node);\n+            }\n+        }\n+    }\n+\n+    partial class BoundCall : IInvocationExpression\n+    {\n+        IMethodSymbol IInvocationExpression.TargetMethod => this.Method;\n+\n+        IExpression IInvocationExpression.Instance => this.ReceiverOpt;\n+\n+        bool IInvocationExpression.IsVirtual => (this.Method.IsVirtual || this.Method.IsAbstract || this.Method.IsOverride) && !this.ReceiverOpt.SuppressVirtualCalls;\n+\n+        ImmutableArray<IArgument> IInvocationExpression.ArgumentsInSourceOrder\n+        {\n+            get\n+            {\n+                ImmutableArray<IArgument>.Builder sourceOrderArguments = ImmutableArray.CreateBuilder<IArgument>(this.Arguments.Length);","path":"src/Compilers/CSharp/Portable/BoundTree/Expression.cs","position":75,"original_position":75,"commit_id":"fdafcdf237cf43b7245ff9e0dbeda717b3971f9e","original_commit_id":"fdafcdf237cf43b7245ff9e0dbeda717b3971f9e","user":{"login":"JohnHamby","id":10982715,"avatar_url":"https://avatars.githubusercontent.com/u/10982715?v=3","gravatar_id":"","url":"https://api.github.com/users/JohnHamby","html_url":"https://github.com/JohnHamby","followers_url":"https://api.github.com/users/JohnHamby/followers","following_url":"https://api.github.com/users/JohnHamby/following{/other_user}","gists_url":"https://api.github.com/users/JohnHamby/gists{/gist_id}","starred_url":"https://api.github.com/users/JohnHamby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JohnHamby/subscriptions","organizations_url":"https://api.github.com/users/JohnHamby/orgs","repos_url":"https://api.github.com/users/JohnHamby/repos","events_url":"https://api.github.com/users/JohnHamby/events{/privacy}","received_events_url":"https://api.github.com/users/JohnHamby/received_events","type":"User","site_admin":false},"body":"OK. I don't understand the implications, but I'm happy to follow established practice.","created_at":"2015-09-30T00:10:44Z","updated_at":"2015-09-30T00:10:44Z","html_url":"https://github.com/dotnet/roslyn/pull/5521#discussion_r40746548","pull_request_url":"https://api.github.com/repos/dotnet/roslyn/pulls/5521","_links":{"self":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/comments/40746548"},"html":{"href":"https://github.com/dotnet/roslyn/pull/5521#discussion_r40746548"},"pull_request":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/5521"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/roslyn/pulls/5521","id":46237045,"html_url":"https://github.com/dotnet/roslyn/pull/5521","diff_url":"https://github.com/dotnet/roslyn/pull/5521.diff","patch_url":"https://github.com/dotnet/roslyn/pull/5521.patch","issue_url":"https://api.github.com/repos/dotnet/roslyn/issues/5521","number":5521,"state":"open","locked":false,"title":"IOperation and associated analyzer actions, now in future","user":{"login":"JohnHamby","id":10982715,"avatar_url":"https://avatars.githubusercontent.com/u/10982715?v=3","gravatar_id":"","url":"https://api.github.com/users/JohnHamby","html_url":"https://github.com/JohnHamby","followers_url":"https://api.github.com/users/JohnHamby/followers","following_url":"https://api.github.com/users/JohnHamby/following{/other_user}","gists_url":"https://api.github.com/users/JohnHamby/gists{/gist_id}","starred_url":"https://api.github.com/users/JohnHamby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JohnHamby/subscriptions","organizations_url":"https://api.github.com/users/JohnHamby/orgs","repos_url":"https://api.github.com/users/JohnHamby/repos","events_url":"https://api.github.com/users/JohnHamby/events{/privacy}","received_events_url":"https://api.github.com/users/JohnHamby/received_events","type":"User","site_admin":false},"body":"This change set adds IOperation, a common abstract view on the bound trees of the C# and VB compilers, and extends the analyzers API to include operation actions that operate upon them.\r\n\r\nIt is now possible to write a single analyzer that works for both C# and VB, so long as the analyzer operates entirely within semantic realms.\r\n\r\n@mavasani  @heejaechang @gafter @cston @srivatsn @mattwar @amcasey @AnthonyDGreen @CyrusNajmabadi @tmat @genlu @ManishJayaswal may have specific interest.\r\n\r\nMany thanks to @tannergooding and @agocke for getting me through the process of rebasing to future.","created_at":"2015-09-29T05:08:06Z","updated_at":"2015-09-30T00:10:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a56ad80fc2f307456876e01fb0aafcd8088c5dd9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/roslyn/pulls/5521/commits","review_comments_url":"https://api.github.com/repos/dotnet/roslyn/pulls/5521/comments","review_comment_url":"https://api.github.com/repos/dotnet/roslyn/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/roslyn/issues/5521/comments","statuses_url":"https://api.github.com/repos/dotnet/roslyn/statuses/fdafcdf237cf43b7245ff9e0dbeda717b3971f9e","head":{"label":"JohnHamby:IOperation2","ref":"IOperation2","sha":"fdafcdf237cf43b7245ff9e0dbeda717b3971f9e","user":{"login":"JohnHamby","id":10982715,"avatar_url":"https://avatars.githubusercontent.com/u/10982715?v=3","gravatar_id":"","url":"https://api.github.com/users/JohnHamby","html_url":"https://github.com/JohnHamby","followers_url":"https://api.github.com/users/JohnHamby/followers","following_url":"https://api.github.com/users/JohnHamby/following{/other_user}","gists_url":"https://api.github.com/users/JohnHamby/gists{/gist_id}","starred_url":"https://api.github.com/users/JohnHamby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JohnHamby/subscriptions","organizations_url":"https://api.github.com/users/JohnHamby/orgs","repos_url":"https://api.github.com/users/JohnHamby/repos","events_url":"https://api.github.com/users/JohnHamby/events{/privacy}","received_events_url":"https://api.github.com/users/JohnHamby/received_events","type":"User","site_admin":false},"repo":{"id":30732063,"name":"roslyn","full_name":"JohnHamby/roslyn","owner":{"login":"JohnHamby","id":10982715,"avatar_url":"https://avatars.githubusercontent.com/u/10982715?v=3","gravatar_id":"","url":"https://api.github.com/users/JohnHamby","html_url":"https://github.com/JohnHamby","followers_url":"https://api.github.com/users/JohnHamby/followers","following_url":"https://api.github.com/users/JohnHamby/following{/other_user}","gists_url":"https://api.github.com/users/JohnHamby/gists{/gist_id}","starred_url":"https://api.github.com/users/JohnHamby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JohnHamby/subscriptions","organizations_url":"https://api.github.com/users/JohnHamby/orgs","repos_url":"https://api.github.com/users/JohnHamby/repos","events_url":"https://api.github.com/users/JohnHamby/events{/privacy}","received_events_url":"https://api.github.com/users/JohnHamby/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/JohnHamby/roslyn","description":"The .NET Compiler Platform (\"Roslyn\") provides open-source C# and Visual Basic compilers with rich code analysis APIs.","fork":true,"url":"https://api.github.com/repos/JohnHamby/roslyn","forks_url":"https://api.github.com/repos/JohnHamby/roslyn/forks","keys_url":"https://api.github.com/repos/JohnHamby/roslyn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JohnHamby/roslyn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JohnHamby/roslyn/teams","hooks_url":"https://api.github.com/repos/JohnHamby/roslyn/hooks","issue_events_url":"https://api.github.com/repos/JohnHamby/roslyn/issues/events{/number}","events_url":"https://api.github.com/repos/JohnHamby/roslyn/events","assignees_url":"https://api.github.com/repos/JohnHamby/roslyn/assignees{/user}","branches_url":"https://api.github.com/repos/JohnHamby/roslyn/branches{/branch}","tags_url":"https://api.github.com/repos/JohnHamby/roslyn/tags","blobs_url":"https://api.github.com/repos/JohnHamby/roslyn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JohnHamby/roslyn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JohnHamby/roslyn/git/refs{/sha}","trees_url":"https://api.github.com/repos/JohnHamby/roslyn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JohnHamby/roslyn/statuses/{sha}","languages_url":"https://api.github.com/repos/JohnHamby/roslyn/languages","stargazers_url":"https://api.github.com/repos/JohnHamby/roslyn/stargazers","contributors_url":"https://api.github.com/repos/JohnHamby/roslyn/contributors","subscribers_url":"https://api.github.com/repos/JohnHamby/roslyn/subscribers","subscription_url":"https://api.github.com/repos/JohnHamby/roslyn/subscription","commits_url":"https://api.github.com/repos/JohnHamby/roslyn/commits{/sha}","git_commits_url":"https://api.github.com/repos/JohnHamby/roslyn/git/commits{/sha}","comments_url":"https://api.github.com/repos/JohnHamby/roslyn/comments{/number}","issue_comment_url":"https://api.github.com/repos/JohnHamby/roslyn/issues/comments{/number}","contents_url":"https://api.github.com/repos/JohnHamby/roslyn/contents/{+path}","compare_url":"https://api.github.com/repos/JohnHamby/roslyn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JohnHamby/roslyn/merges","archive_url":"https://api.github.com/repos/JohnHamby/roslyn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JohnHamby/roslyn/downloads","issues_url":"https://api.github.com/repos/JohnHamby/roslyn/issues{/number}","pulls_url":"https://api.github.com/repos/JohnHamby/roslyn/pulls{/number}","milestones_url":"https://api.github.com/repos/JohnHamby/roslyn/milestones{/number}","notifications_url":"https://api.github.com/repos/JohnHamby/roslyn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JohnHamby/roslyn/labels{/name}","releases_url":"https://api.github.com/repos/JohnHamby/roslyn/releases{/id}","created_at":"2015-02-13T00:07:31Z","updated_at":"2015-02-13T00:07:58Z","pushed_at":"2015-09-29T20:25:27Z","git_url":"git://github.com/JohnHamby/roslyn.git","ssh_url":"git@github.com:JohnHamby/roslyn.git","clone_url":"https://github.com/JohnHamby/roslyn.git","svn_url":"https://github.com/JohnHamby/roslyn","homepage":"","size":99702,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dotnet:future","ref":"future","sha":"f2ed4a3dda8a8c328071d27a47de910af41243cc","user":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars.githubusercontent.com/u/9141961?v=3","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"repo":{"id":29078997,"name":"roslyn","full_name":"dotnet/roslyn","owner":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars.githubusercontent.com/u/9141961?v=3","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dotnet/roslyn","description":"The .NET Compiler Platform (\"Roslyn\") provides open-source C# and Visual Basic compilers with rich code analysis APIs.","fork":false,"url":"https://api.github.com/repos/dotnet/roslyn","forks_url":"https://api.github.com/repos/dotnet/roslyn/forks","keys_url":"https://api.github.com/repos/dotnet/roslyn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotnet/roslyn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotnet/roslyn/teams","hooks_url":"https://api.github.com/repos/dotnet/roslyn/hooks","issue_events_url":"https://api.github.com/repos/dotnet/roslyn/issues/events{/number}","events_url":"https://api.github.com/repos/dotnet/roslyn/events","assignees_url":"https://api.github.com/repos/dotnet/roslyn/assignees{/user}","branches_url":"https://api.github.com/repos/dotnet/roslyn/branches{/branch}","tags_url":"https://api.github.com/repos/dotnet/roslyn/tags","blobs_url":"https://api.github.com/repos/dotnet/roslyn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotnet/roslyn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotnet/roslyn/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotnet/roslyn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotnet/roslyn/statuses/{sha}","languages_url":"https://api.github.com/repos/dotnet/roslyn/languages","stargazers_url":"https://api.github.com/repos/dotnet/roslyn/stargazers","contributors_url":"https://api.github.com/repos/dotnet/roslyn/contributors","subscribers_url":"https://api.github.com/repos/dotnet/roslyn/subscribers","subscription_url":"https://api.github.com/repos/dotnet/roslyn/subscription","commits_url":"https://api.github.com/repos/dotnet/roslyn/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotnet/roslyn/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotnet/roslyn/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotnet/roslyn/issues/comments{/number}","contents_url":"https://api.github.com/repos/dotnet/roslyn/contents/{+path}","compare_url":"https://api.github.com/repos/dotnet/roslyn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotnet/roslyn/merges","archive_url":"https://api.github.com/repos/dotnet/roslyn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotnet/roslyn/downloads","issues_url":"https://api.github.com/repos/dotnet/roslyn/issues{/number}","pulls_url":"https://api.github.com/repos/dotnet/roslyn/pulls{/number}","milestones_url":"https://api.github.com/repos/dotnet/roslyn/milestones{/number}","notifications_url":"https://api.github.com/repos/dotnet/roslyn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotnet/roslyn/labels{/name}","releases_url":"https://api.github.com/repos/dotnet/roslyn/releases{/id}","created_at":"2015-01-11T02:39:03Z","updated_at":"2015-09-29T20:32:40Z","pushed_at":"2015-09-30T00:03:40Z","git_url":"git://github.com/dotnet/roslyn.git","ssh_url":"git@github.com:dotnet/roslyn.git","clone_url":"https://github.com/dotnet/roslyn.git","svn_url":"https://github.com/dotnet/roslyn","homepage":"","size":201787,"stargazers_count":3381,"watchers_count":3381,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":793,"mirror_url":null,"open_issues_count":1505,"forks":793,"open_issues":1505,"watchers":3381,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/5521"},"html":{"href":"https://github.com/dotnet/roslyn/pull/5521"},"issue":{"href":"https://api.github.com/repos/dotnet/roslyn/issues/5521"},"comments":{"href":"https://api.github.com/repos/dotnet/roslyn/issues/5521/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/5521/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/5521/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/roslyn/statuses/fdafcdf237cf43b7245ff9e0dbeda717b3971f9e"}}}}