{"action":"created","issue":{"url":"https://api.github.com/repos/mjsabby/RoslynClrHeapAllocationAnalyzer/issues/8","labels_url":"https://api.github.com/repos/mjsabby/RoslynClrHeapAllocationAnalyzer/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/mjsabby/RoslynClrHeapAllocationAnalyzer/issues/8/comments","events_url":"https://api.github.com/repos/mjsabby/RoslynClrHeapAllocationAnalyzer/issues/8/events","html_url":"https://github.com/mjsabby/RoslynClrHeapAllocationAnalyzer/issues/8","id":60808071,"number":8,"title":"Some Heap Allocation scenarios are going away!","user":{"login":"mattwarren","id":157298,"avatar_url":"https://avatars.githubusercontent.com/u/157298?v=3","gravatar_id":"","url":"https://api.github.com/users/mattwarren","html_url":"https://github.com/mattwarren","followers_url":"https://api.github.com/users/mattwarren/followers","following_url":"https://api.github.com/users/mattwarren/following{/other_user}","gists_url":"https://api.github.com/users/mattwarren/gists{/gist_id}","starred_url":"https://api.github.com/users/mattwarren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattwarren/subscriptions","organizations_url":"https://api.github.com/users/mattwarren/orgs","repos_url":"https://api.github.com/users/mattwarren/repos","events_url":"https://api.github.com/users/mattwarren/events{/privacy}","received_events_url":"https://api.github.com/users/mattwarren/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-03-12T11:58:23Z","updated_at":"2015-03-20T20:43:03Z","closed_at":null,"body":"I don't know if you've seen this or not, but seems like Microsoft are [getting rid of some of the scenarios](https://github.com/dotnet/roslyn/pull/415) that this analyser picks up.\r\n\r\nOther than removing them as these things are added to Roslyn, I wonder how to handle this in the future? Does the analyser need to detect which version of the compiler it's running against and behave differently, or is there a smarter way?"},"comment":{"url":"https://api.github.com/repos/mjsabby/RoslynClrHeapAllocationAnalyzer/issues/comments/84139678","html_url":"https://github.com/mjsabby/RoslynClrHeapAllocationAnalyzer/issues/8#issuecomment-84139678","issue_url":"https://api.github.com/repos/mjsabby/RoslynClrHeapAllocationAnalyzer/issues/8","id":84139678,"user":{"login":"mattwarren","id":157298,"avatar_url":"https://avatars.githubusercontent.com/u/157298?v=3","gravatar_id":"","url":"https://api.github.com/users/mattwarren","html_url":"https://github.com/mattwarren","followers_url":"https://api.github.com/users/mattwarren/followers","following_url":"https://api.github.com/users/mattwarren/following{/other_user}","gists_url":"https://api.github.com/users/mattwarren/gists{/gist_id}","starred_url":"https://api.github.com/users/mattwarren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattwarren/subscriptions","organizations_url":"https://api.github.com/users/mattwarren/orgs","repos_url":"https://api.github.com/users/mattwarren/repos","events_url":"https://api.github.com/users/mattwarren/events{/privacy}","received_events_url":"https://api.github.com/users/mattwarren/received_events","type":"User","site_admin":false},"created_at":"2015-03-20T20:43:03Z","updated_at":"2015-03-20T20:43:03Z","body":"> The \"correct\" way is to look at the IL, but that is expensive.\r\n\r\nThat's what I feared. BTW before I came across your analysers, I had a go at doing just this. I used [Roslyn to compile the code](https://github.com/mattwarren/RoslynHeapAllocations/blob/master/RoslynHeapAllocations/Program.cs#L125) and then [Cecil to get the IL](https://github.com/mattwarren/RoslynHeapAllocations/blob/master/RoslynHeapAllocations/CodeGenerationHelper.cs#L18) so it could be analysed. \r\n\r\nAnd yes, you're right, it's expensive, even with Roslyn compiling in-memory."}}