{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/roslyn/pulls/comments/26458511","id":26458511,"diff_hunk":"@@ -5,14 +5,16 @@\n using System.Collections.Immutable;\n using System.Diagnostics;\n using System.Linq;\n+using System.Runtime.InteropServices;\n using Roslyn.Utilities;\n \n namespace Microsoft.CodeAnalysis.Diagnostics\n {\n     internal partial class SuppressMessageAttributeState\n     {\n-        private static string s_suppressionPrefix = \"~\";\n+        private const string s_suppressionPrefix = \"~\";\n \n+        [StructLayout(LayoutKind.Auto)]","path":"src/Compilers/Core/Portable/DiagnosticAnalyzer/SuppressMessageAttributeState.TargetSymbolResolver.cs","position":14,"original_position":14,"commit_id":"df9f0f443ec8e227803271091e57be773e899412","original_commit_id":"df9f0f443ec8e227803271091e57be773e899412","user":{"login":"VladimirReshetnikov","id":1231606,"avatar_url":"https://avatars.githubusercontent.com/u/1231606?v=3","gravatar_id":"","url":"https://api.github.com/users/VladimirReshetnikov","html_url":"https://github.com/VladimirReshetnikov","followers_url":"https://api.github.com/users/VladimirReshetnikov/followers","following_url":"https://api.github.com/users/VladimirReshetnikov/following{/other_user}","gists_url":"https://api.github.com/users/VladimirReshetnikov/gists{/gist_id}","starred_url":"https://api.github.com/users/VladimirReshetnikov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VladimirReshetnikov/subscriptions","organizations_url":"https://api.github.com/users/VladimirReshetnikov/orgs","repos_url":"https://api.github.com/users/VladimirReshetnikov/repos","events_url":"https://api.github.com/users/VladimirReshetnikov/events{/privacy}","received_events_url":"https://api.github.com/users/VladimirReshetnikov/received_events","type":"User","site_admin":false},"body":"By default structs, unlike classes, use `[StructLayout(LayoutKind.Sequntial)]` that guarantees the order of fields in interop scenarios. For structs not indended for interop, specifying `[StructLayout(LayoutKind.Auto)]` allows CLR to reorder and realign fields, that may cause some perf improvements.","created_at":"2015-03-16T03:50:06Z","updated_at":"2015-03-16T03:50:06Z","html_url":"https://github.com/dotnet/roslyn/pull/1232#discussion_r26458511","pull_request_url":"https://api.github.com/repos/dotnet/roslyn/pulls/1232","_links":{"self":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/comments/26458511"},"html":{"href":"https://github.com/dotnet/roslyn/pull/1232#discussion_r26458511"},"pull_request":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/1232"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/roslyn/pulls/1232","id":31079717,"html_url":"https://github.com/dotnet/roslyn/pull/1232","diff_url":"https://github.com/dotnet/roslyn/pull/1232.diff","patch_url":"https://github.com/dotnet/roslyn/pull/1232.patch","issue_url":"https://api.github.com/repos/dotnet/roslyn/issues/1232","number":1232,"state":"open","locked":false,"title":"Code cleanup in the Microsoft.CodeAnalysis project","user":{"login":"VladimirReshetnikov","id":1231606,"avatar_url":"https://avatars.githubusercontent.com/u/1231606?v=3","gravatar_id":"","url":"https://api.github.com/users/VladimirReshetnikov","html_url":"https://github.com/VladimirReshetnikov","followers_url":"https://api.github.com/users/VladimirReshetnikov/followers","following_url":"https://api.github.com/users/VladimirReshetnikov/following{/other_user}","gists_url":"https://api.github.com/users/VladimirReshetnikov/gists{/gist_id}","starred_url":"https://api.github.com/users/VladimirReshetnikov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VladimirReshetnikov/subscriptions","organizations_url":"https://api.github.com/users/VladimirReshetnikov/orgs","repos_url":"https://api.github.com/users/VladimirReshetnikov/repos","events_url":"https://api.github.com/users/VladimirReshetnikov/events{/privacy}","received_events_url":"https://api.github.com/users/VladimirReshetnikov/received_events","type":"User","site_admin":false},"body":"Code cleanup in the `Microsoft.CodeAnalysis` project:\r\n* Use operator `?.` where it simplifies code; replace conditional freeing or disposal using `if` to `?.` syntax\r\n* Use `nameof(...)` instead of string literals in exception; fixed several wrong parameter names and misused exceptions; fixed expected exceptions in tests\r\n* Rewrote ternary `? :` expressions in terms of simpler `&&` expressions\r\n* Remove unnecessary `using` directives\r\n* Remove some dead code, unused private methods, unused private method parameters\r\n* Remove unused local variables and redundant assignments (value is always overwritten, or assigned value is always same as before)\r\n* Moved declarations of some locals to nested blocks where they are used; joined with assignments if possible\r\n* Simplify several control flow constructs, reduce block nesting level\r\n* Remove redundant casts (identity conversions)\r\n* Remove unnecessary conditions; e.g. `(uint)expr >= 0`\r\n* Replace local variables with consts in some places\r\n* Replace usages of local variables with boolean literals if their value is statically known\r\n* Remove unobserved increments of locals\r\n* Simplifiy double negations\r\n* Shorten LINQ method chains; e.g. `seq.Where(...).FirstOrDefault()` to `seq.FirstOrDefault(...)`\r\n* Mark fields `readonly` where possible\r\n* Mark methods `static` where possible\r\n* Remove unnecessary `unsafe` modifiers\r\n* Replace delegate creation expression with an implicit conversion from lambda\r\n* Replace trivial lambdas with method groups\r\n* Convert extension method invocation syntax from plain static to extension\r\n* Replace array creation expressions with array initializers\r\n* Replace `is`/cast combinations with `as`/null-check\r\n* Add `<see>` and `<paramref>` to some XML doc comments; remove empty elements\r\n* Remove `case` labels adjacent to `default` labels in `switch` statements; remove redundant `default: break;` sections\r\n* Convert some `if`s to ternary operators\r\n* Add `[StructLayout(LayoutKind.Auto)]` for some structs\r\n* Convert readonly field + property to a read-only property in some places\r\n* Use `=>` body in some properties\r\n* Inline intermediate locals in some places","created_at":"2015-03-12T21:29:29Z","updated_at":"2015-03-16T03:50:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d5765b7c79c44c25e553e1827da71a9753ee611f","assignee":{"login":"VladimirReshetnikov","id":1231606,"avatar_url":"https://avatars.githubusercontent.com/u/1231606?v=3","gravatar_id":"","url":"https://api.github.com/users/VladimirReshetnikov","html_url":"https://github.com/VladimirReshetnikov","followers_url":"https://api.github.com/users/VladimirReshetnikov/followers","following_url":"https://api.github.com/users/VladimirReshetnikov/following{/other_user}","gists_url":"https://api.github.com/users/VladimirReshetnikov/gists{/gist_id}","starred_url":"https://api.github.com/users/VladimirReshetnikov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VladimirReshetnikov/subscriptions","organizations_url":"https://api.github.com/users/VladimirReshetnikov/orgs","repos_url":"https://api.github.com/users/VladimirReshetnikov/repos","events_url":"https://api.github.com/users/VladimirReshetnikov/events{/privacy}","received_events_url":"https://api.github.com/users/VladimirReshetnikov/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/roslyn/pulls/1232/commits","review_comments_url":"https://api.github.com/repos/dotnet/roslyn/pulls/1232/comments","review_comment_url":"https://api.github.com/repos/dotnet/roslyn/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/roslyn/issues/1232/comments","statuses_url":"https://api.github.com/repos/dotnet/roslyn/statuses/df9f0f443ec8e227803271091e57be773e899412","head":{"label":"VladimirReshetnikov:cleanup","ref":"cleanup","sha":"df9f0f443ec8e227803271091e57be773e899412","user":{"login":"VladimirReshetnikov","id":1231606,"avatar_url":"https://avatars.githubusercontent.com/u/1231606?v=3","gravatar_id":"","url":"https://api.github.com/users/VladimirReshetnikov","html_url":"https://github.com/VladimirReshetnikov","followers_url":"https://api.github.com/users/VladimirReshetnikov/followers","following_url":"https://api.github.com/users/VladimirReshetnikov/following{/other_user}","gists_url":"https://api.github.com/users/VladimirReshetnikov/gists{/gist_id}","starred_url":"https://api.github.com/users/VladimirReshetnikov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VladimirReshetnikov/subscriptions","organizations_url":"https://api.github.com/users/VladimirReshetnikov/orgs","repos_url":"https://api.github.com/users/VladimirReshetnikov/repos","events_url":"https://api.github.com/users/VladimirReshetnikov/events{/privacy}","received_events_url":"https://api.github.com/users/VladimirReshetnikov/received_events","type":"User","site_admin":false},"repo":{"id":30376343,"name":"roslyn","full_name":"VladimirReshetnikov/roslyn","owner":{"login":"VladimirReshetnikov","id":1231606,"avatar_url":"https://avatars.githubusercontent.com/u/1231606?v=3","gravatar_id":"","url":"https://api.github.com/users/VladimirReshetnikov","html_url":"https://github.com/VladimirReshetnikov","followers_url":"https://api.github.com/users/VladimirReshetnikov/followers","following_url":"https://api.github.com/users/VladimirReshetnikov/following{/other_user}","gists_url":"https://api.github.com/users/VladimirReshetnikov/gists{/gist_id}","starred_url":"https://api.github.com/users/VladimirReshetnikov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VladimirReshetnikov/subscriptions","organizations_url":"https://api.github.com/users/VladimirReshetnikov/orgs","repos_url":"https://api.github.com/users/VladimirReshetnikov/repos","events_url":"https://api.github.com/users/VladimirReshetnikov/events{/privacy}","received_events_url":"https://api.github.com/users/VladimirReshetnikov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/VladimirReshetnikov/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/VladimirReshetnikov/roslyn","forks_url":"https://api.github.com/repos/VladimirReshetnikov/roslyn/forks","keys_url":"https://api.github.com/repos/VladimirReshetnikov/roslyn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/VladimirReshetnikov/roslyn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/VladimirReshetnikov/roslyn/teams","hooks_url":"https://api.github.com/repos/VladimirReshetnikov/roslyn/hooks","issue_events_url":"https://api.github.com/repos/VladimirReshetnikov/roslyn/issues/events{/number}","events_url":"https://api.github.com/repos/VladimirReshetnikov/roslyn/events","assignees_url":"https://api.github.com/repos/VladimirReshetnikov/roslyn/assignees{/user}","branches_url":"https://api.github.com/repos/VladimirReshetnikov/roslyn/branches{/branch}","tags_url":"https://api.github.com/repos/VladimirReshetnikov/roslyn/tags","blobs_url":"https://api.github.com/repos/VladimirReshetnikov/roslyn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/VladimirReshetnikov/roslyn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/VladimirReshetnikov/roslyn/git/refs{/sha}","trees_url":"https://api.github.com/repos/VladimirReshetnikov/roslyn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/VladimirReshetnikov/roslyn/statuses/{sha}","languages_url":"https://api.github.com/repos/VladimirReshetnikov/roslyn/languages","stargazers_url":"https://api.github.com/repos/VladimirReshetnikov/roslyn/stargazers","contributors_url":"https://api.github.com/repos/VladimirReshetnikov/roslyn/contributors","subscribers_url":"https://api.github.com/repos/VladimirReshetnikov/roslyn/subscribers","subscription_url":"https://api.github.com/repos/VladimirReshetnikov/roslyn/subscription","commits_url":"https://api.github.com/repos/VladimirReshetnikov/roslyn/commits{/sha}","git_commits_url":"https://api.github.com/repos/VladimirReshetnikov/roslyn/git/commits{/sha}","comments_url":"https://api.github.com/repos/VladimirReshetnikov/roslyn/comments{/number}","issue_comment_url":"https://api.github.com/repos/VladimirReshetnikov/roslyn/issues/comments{/number}","contents_url":"https://api.github.com/repos/VladimirReshetnikov/roslyn/contents/{+path}","compare_url":"https://api.github.com/repos/VladimirReshetnikov/roslyn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/VladimirReshetnikov/roslyn/merges","archive_url":"https://api.github.com/repos/VladimirReshetnikov/roslyn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/VladimirReshetnikov/roslyn/downloads","issues_url":"https://api.github.com/repos/VladimirReshetnikov/roslyn/issues{/number}","pulls_url":"https://api.github.com/repos/VladimirReshetnikov/roslyn/pulls{/number}","milestones_url":"https://api.github.com/repos/VladimirReshetnikov/roslyn/milestones{/number}","notifications_url":"https://api.github.com/repos/VladimirReshetnikov/roslyn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/VladimirReshetnikov/roslyn/labels{/name}","releases_url":"https://api.github.com/repos/VladimirReshetnikov/roslyn/releases{/id}","created_at":"2015-02-05T20:21:01Z","updated_at":"2015-03-12T20:31:16Z","pushed_at":"2015-03-16T01:39:06Z","git_url":"git://github.com/VladimirReshetnikov/roslyn.git","ssh_url":"git@github.com:VladimirReshetnikov/roslyn.git","clone_url":"https://github.com/VladimirReshetnikov/roslyn.git","svn_url":"https://github.com/VladimirReshetnikov/roslyn","homepage":"","size":58359,"stargazers_count":1,"watchers_count":1,"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":1,"default_branch":"master"}},"base":{"label":"dotnet:master","ref":"master","sha":"1996d7ab56aaeeac86c43bfee1bb5d81a0a37bc2","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-03-16T03:42:36Z","pushed_at":"2015-03-15T22:50:33Z","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":87656,"stargazers_count":1489,"watchers_count":1489,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":303,"mirror_url":null,"open_issues_count":521,"forks":303,"open_issues":521,"watchers":1489,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/1232"},"html":{"href":"https://github.com/dotnet/roslyn/pull/1232"},"issue":{"href":"https://api.github.com/repos/dotnet/roslyn/issues/1232"},"comments":{"href":"https://api.github.com/repos/dotnet/roslyn/issues/1232/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/1232/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/1232/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/roslyn/statuses/df9f0f443ec8e227803271091e57be773e899412"}}}}