{"action":"created","comment":{"url":"https://api.github.com/repos/apple/swift/pulls/comments/197520740","pull_request_review_id":131286973,"id":197520740,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NzUyMDc0MA==","diff_hunk":"@@ -770,31 +770,72 @@ Parser::parseDifferentiableAttribute(SourceLoc atLoc, SourceLoc loc) {\n   ParserStatus Status;\n   SourceLoc lParenLoc, rParenLoc;\n \n-  // Set parse error, skip until ')' and parse it.\n-  auto errorAndSkipToEnd = [&](int parenDepth = 1) -> ParserStatus {\n+  // Parse '('.\n+  if (!consumeIf(tok::l_paren, lParenLoc)) {\n+    diagnose(Tok, diag::attr_expected_lparen, AttrName,\n+             /*DeclModifier=*/false);\n+    skipUntil(tok::r_paren);\n+    if (!consumeIf(tok::r_paren, rParenLoc))\n+      diagnose(Tok, diag::attr_expected_rparen, AttrName,\n+               /*DeclModifier=*/false);\n+    return makeParserError();\n+  }\n+\n+  using FuncSpec = DifferentiableAttr::FunctionSpecifier;\n+  AutoDiffMode mode;\n+  SourceLoc modeLoc;","path":"lib/Parse/ParseDecl.cpp","position":17,"original_position":19,"commit_id":"3eb08043381d84d4c4a57fcbfe0f7d99f1638a92","original_commit_id":"76f34e1d017212bff1d54734eae2fa0b1dcd22e2","user":{"login":"nkcsgexi","id":2191945,"node_id":"MDQ6VXNlcjIxOTE5NDU=","avatar_url":"https://avatars0.githubusercontent.com/u/2191945?v=4","gravatar_id":"","url":"https://api.github.com/users/nkcsgexi","html_url":"https://github.com/nkcsgexi","followers_url":"https://api.github.com/users/nkcsgexi/followers","following_url":"https://api.github.com/users/nkcsgexi/following{/other_user}","gists_url":"https://api.github.com/users/nkcsgexi/gists{/gist_id}","starred_url":"https://api.github.com/users/nkcsgexi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nkcsgexi/subscriptions","organizations_url":"https://api.github.com/users/nkcsgexi/orgs","repos_url":"https://api.github.com/users/nkcsgexi/repos","events_url":"https://api.github.com/users/nkcsgexi/events{/privacy}","received_events_url":"https://api.github.com/users/nkcsgexi/received_events","type":"User","site_admin":false},"body":"ah, I see. Could you also add a round-trip test in ./test/Syntax/round_trip_parse_gen.swift to make sure we parse them correctly?","created_at":"2018-06-22T17:47:27Z","updated_at":"2018-06-22T17:47:27Z","html_url":"https://github.com/apple/swift/pull/17424#discussion_r197520740","pull_request_url":"https://api.github.com/repos/apple/swift/pulls/17424","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/apple/swift/pulls/comments/197520740"},"html":{"href":"https://github.com/apple/swift/pull/17424#discussion_r197520740"},"pull_request":{"href":"https://api.github.com/repos/apple/swift/pulls/17424"}},"in_reply_to_id":197504215},"pull_request":{"url":"https://api.github.com/repos/apple/swift/pulls/17424","id":196784351,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk2Nzg0MzUx","html_url":"https://github.com/apple/swift/pull/17424","diff_url":"https://github.com/apple/swift/pull/17424.diff","patch_url":"https://github.com/apple/swift/pull/17424.patch","issue_url":"https://api.github.com/repos/apple/swift/issues/17424","number":17424,"state":"open","locked":false,"title":"Add libSyntax support for #tfop and @differentiable.","user":{"login":"dan-zheng","id":5590046,"node_id":"MDQ6VXNlcjU1OTAwNDY=","avatar_url":"https://avatars0.githubusercontent.com/u/5590046?v=4","gravatar_id":"","url":"https://api.github.com/users/dan-zheng","html_url":"https://github.com/dan-zheng","followers_url":"https://api.github.com/users/dan-zheng/followers","following_url":"https://api.github.com/users/dan-zheng/following{/other_user}","gists_url":"https://api.github.com/users/dan-zheng/gists{/gist_id}","starred_url":"https://api.github.com/users/dan-zheng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dan-zheng/subscriptions","organizations_url":"https://api.github.com/users/dan-zheng/orgs","repos_url":"https://api.github.com/users/dan-zheng/repos","events_url":"https://api.github.com/users/dan-zheng/events{/privacy}","received_events_url":"https://api.github.com/users/dan-zheng/received_events","type":"User","site_admin":false},"body":"The `-verify-syntax-tree` flag has been enabled when compiling the stdlib:\r\nhttps://github.com/apple/swift/commit/9cb383edcee217d2cbd3fdc074db417f89fddec9\r\n\r\n`-verify-syntax-tree` verifies that no unknown nodes exist in the libSyntax\r\ntree. `#tfop` and `@differentiable` are used in the TensorFlow module of the\r\nstdlib but did not have libSyntax support, causing verification errors during\r\ncompilation.\r\n\r\nTodo:\r\n- Add libSyntax support for `#adjoint` and `#gradient`.\r\n  - This currently isn't necessary to compile the stdlib because those\r\n    expressions aren't used within the stdlib.\r\n\r\n---\r\n\r\nRegarding downstreaming changes from master:\r\n- The stdlib now compiles successfully. Compilation doesn't fail until lldb, which is not yet in sync (needs to downstream changes also).\r\n- Various tests are failing on Linux (it's likely others are failing on Mac):\r\n```\r\nFailing Tests (10):\r\n    Swift(linux-x86_64) :: IRGen/ordering_x86.sil\r\n    Swift(linux-x86_64) :: Runtime/linux-fatal-backtrace.swift\r\n    Swift(linux-x86_64) :: TensorFlow/crashers.swift\r\n    Swift(linux-x86_64) :: TensorFlow/dataset.swift\r\n    Swift(linux-x86_64) :: TensorFlow/device_placement.swift\r\n    Swift(linux-x86_64) :: TensorFlow/diagnostics.swift\r\n    Swift(linux-x86_64) :: TensorFlow/integration.swift\r\n    Swift(linux-x86_64) :: TensorFlow/no_copy.swift\r\n    Swift(linux-x86_64) :: TensorFlow/sends_recvs.swift\r\n    Swift(linux-x86_64) :: TensorFlow/tensor_autodiff.swift\r\n```","created_at":"2018-06-22T16:19:25Z","updated_at":"2018-06-22T17:47:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"76270417768d82ec01a286aa03a891c3da2f7f2c","assignee":null,"assignees":[],"requested_reviewers":[{"login":"rintaro","id":142081,"node_id":"MDQ6VXNlcjE0MjA4MQ==","avatar_url":"https://avatars1.githubusercontent.com/u/142081?v=4","gravatar_id":"","url":"https://api.github.com/users/rintaro","html_url":"https://github.com/rintaro","followers_url":"https://api.github.com/users/rintaro/followers","following_url":"https://api.github.com/users/rintaro/following{/other_user}","gists_url":"https://api.github.com/users/rintaro/gists{/gist_id}","starred_url":"https://api.github.com/users/rintaro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rintaro/subscriptions","organizations_url":"https://api.github.com/users/rintaro/orgs","repos_url":"https://api.github.com/users/rintaro/repos","events_url":"https://api.github.com/users/rintaro/events{/privacy}","received_events_url":"https://api.github.com/users/rintaro/received_events","type":"User","site_admin":false},{"login":"rxwei","id":856507,"node_id":"MDQ6VXNlcjg1NjUwNw==","avatar_url":"https://avatars0.githubusercontent.com/u/856507?v=4","gravatar_id":"","url":"https://api.github.com/users/rxwei","html_url":"https://github.com/rxwei","followers_url":"https://api.github.com/users/rxwei/followers","following_url":"https://api.github.com/users/rxwei/following{/other_user}","gists_url":"https://api.github.com/users/rxwei/gists{/gist_id}","starred_url":"https://api.github.com/users/rxwei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rxwei/subscriptions","organizations_url":"https://api.github.com/users/rxwei/orgs","repos_url":"https://api.github.com/users/rxwei/repos","events_url":"https://api.github.com/users/rxwei/events{/privacy}","received_events_url":"https://api.github.com/users/rxwei/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":955546636,"node_id":"MDU6TGFiZWw5NTU1NDY2MzY=","url":"https://api.github.com/repos/apple/swift/labels/tensorflow","name":"tensorflow","color":"EF6C00","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/apple/swift/pulls/17424/commits","review_comments_url":"https://api.github.com/repos/apple/swift/pulls/17424/comments","review_comment_url":"https://api.github.com/repos/apple/swift/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apple/swift/issues/17424/comments","statuses_url":"https://api.github.com/repos/apple/swift/statuses/3eb08043381d84d4c4a57fcbfe0f7d99f1638a92","head":{"label":"dan-zheng:tensorflow-merge","ref":"tensorflow-merge","sha":"3eb08043381d84d4c4a57fcbfe0f7d99f1638a92","user":{"login":"dan-zheng","id":5590046,"node_id":"MDQ6VXNlcjU1OTAwNDY=","avatar_url":"https://avatars0.githubusercontent.com/u/5590046?v=4","gravatar_id":"","url":"https://api.github.com/users/dan-zheng","html_url":"https://github.com/dan-zheng","followers_url":"https://api.github.com/users/dan-zheng/followers","following_url":"https://api.github.com/users/dan-zheng/following{/other_user}","gists_url":"https://api.github.com/users/dan-zheng/gists{/gist_id}","starred_url":"https://api.github.com/users/dan-zheng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dan-zheng/subscriptions","organizations_url":"https://api.github.com/users/dan-zheng/orgs","repos_url":"https://api.github.com/users/dan-zheng/repos","events_url":"https://api.github.com/users/dan-zheng/events{/privacy}","received_events_url":"https://api.github.com/users/dan-zheng/received_events","type":"User","site_admin":false},"repo":{"id":135949956,"node_id":"MDEwOlJlcG9zaXRvcnkxMzU5NDk5NTY=","name":"swift","full_name":"dan-zheng/swift","owner":{"login":"dan-zheng","id":5590046,"node_id":"MDQ6VXNlcjU1OTAwNDY=","avatar_url":"https://avatars0.githubusercontent.com/u/5590046?v=4","gravatar_id":"","url":"https://api.github.com/users/dan-zheng","html_url":"https://github.com/dan-zheng","followers_url":"https://api.github.com/users/dan-zheng/followers","following_url":"https://api.github.com/users/dan-zheng/following{/other_user}","gists_url":"https://api.github.com/users/dan-zheng/gists{/gist_id}","starred_url":"https://api.github.com/users/dan-zheng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dan-zheng/subscriptions","organizations_url":"https://api.github.com/users/dan-zheng/orgs","repos_url":"https://api.github.com/users/dan-zheng/repos","events_url":"https://api.github.com/users/dan-zheng/events{/privacy}","received_events_url":"https://api.github.com/users/dan-zheng/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dan-zheng/swift","description":"The Swift Programming Language","fork":true,"url":"https://api.github.com/repos/dan-zheng/swift","forks_url":"https://api.github.com/repos/dan-zheng/swift/forks","keys_url":"https://api.github.com/repos/dan-zheng/swift/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dan-zheng/swift/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dan-zheng/swift/teams","hooks_url":"https://api.github.com/repos/dan-zheng/swift/hooks","issue_events_url":"https://api.github.com/repos/dan-zheng/swift/issues/events{/number}","events_url":"https://api.github.com/repos/dan-zheng/swift/events","assignees_url":"https://api.github.com/repos/dan-zheng/swift/assignees{/user}","branches_url":"https://api.github.com/repos/dan-zheng/swift/branches{/branch}","tags_url":"https://api.github.com/repos/dan-zheng/swift/tags","blobs_url":"https://api.github.com/repos/dan-zheng/swift/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dan-zheng/swift/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dan-zheng/swift/git/refs{/sha}","trees_url":"https://api.github.com/repos/dan-zheng/swift/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dan-zheng/swift/statuses/{sha}","languages_url":"https://api.github.com/repos/dan-zheng/swift/languages","stargazers_url":"https://api.github.com/repos/dan-zheng/swift/stargazers","contributors_url":"https://api.github.com/repos/dan-zheng/swift/contributors","subscribers_url":"https://api.github.com/repos/dan-zheng/swift/subscribers","subscription_url":"https://api.github.com/repos/dan-zheng/swift/subscription","commits_url":"https://api.github.com/repos/dan-zheng/swift/commits{/sha}","git_commits_url":"https://api.github.com/repos/dan-zheng/swift/git/commits{/sha}","comments_url":"https://api.github.com/repos/dan-zheng/swift/comments{/number}","issue_comment_url":"https://api.github.com/repos/dan-zheng/swift/issues/comments{/number}","contents_url":"https://api.github.com/repos/dan-zheng/swift/contents/{+path}","compare_url":"https://api.github.com/repos/dan-zheng/swift/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dan-zheng/swift/merges","archive_url":"https://api.github.com/repos/dan-zheng/swift/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dan-zheng/swift/downloads","issues_url":"https://api.github.com/repos/dan-zheng/swift/issues{/number}","pulls_url":"https://api.github.com/repos/dan-zheng/swift/pulls{/number}","milestones_url":"https://api.github.com/repos/dan-zheng/swift/milestones{/number}","notifications_url":"https://api.github.com/repos/dan-zheng/swift/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dan-zheng/swift/labels{/name}","releases_url":"https://api.github.com/repos/dan-zheng/swift/releases{/id}","deployments_url":"https://api.github.com/repos/dan-zheng/swift/deployments","created_at":"2018-06-03T23:56:41Z","updated_at":"2018-06-04T07:15:27Z","pushed_at":"2018-06-22T17:46:10Z","git_url":"git://github.com/dan-zheng/swift.git","ssh_url":"git@github.com:dan-zheng/swift.git","clone_url":"https://github.com/dan-zheng/swift.git","svn_url":"https://github.com/dan-zheng/swift","homepage":"https://swift.org/","size":300186,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apple:tensorflow-merge","ref":"tensorflow-merge","sha":"4755c9c1562179b5777b0f79a37cf0ff1b69d856","user":{"login":"apple","id":10639145,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwNjM5MTQ1","avatar_url":"https://avatars0.githubusercontent.com/u/10639145?v=4","gravatar_id":"","url":"https://api.github.com/users/apple","html_url":"https://github.com/apple","followers_url":"https://api.github.com/users/apple/followers","following_url":"https://api.github.com/users/apple/following{/other_user}","gists_url":"https://api.github.com/users/apple/gists{/gist_id}","starred_url":"https://api.github.com/users/apple/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apple/subscriptions","organizations_url":"https://api.github.com/users/apple/orgs","repos_url":"https://api.github.com/users/apple/repos","events_url":"https://api.github.com/users/apple/events{/privacy}","received_events_url":"https://api.github.com/users/apple/received_events","type":"Organization","site_admin":false},"repo":{"id":44838949,"node_id":"MDEwOlJlcG9zaXRvcnk0NDgzODk0OQ==","name":"swift","full_name":"apple/swift","owner":{"login":"apple","id":10639145,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwNjM5MTQ1","avatar_url":"https://avatars0.githubusercontent.com/u/10639145?v=4","gravatar_id":"","url":"https://api.github.com/users/apple","html_url":"https://github.com/apple","followers_url":"https://api.github.com/users/apple/followers","following_url":"https://api.github.com/users/apple/following{/other_user}","gists_url":"https://api.github.com/users/apple/gists{/gist_id}","starred_url":"https://api.github.com/users/apple/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apple/subscriptions","organizations_url":"https://api.github.com/users/apple/orgs","repos_url":"https://api.github.com/users/apple/repos","events_url":"https://api.github.com/users/apple/events{/privacy}","received_events_url":"https://api.github.com/users/apple/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apple/swift","description":"The Swift Programming Language","fork":false,"url":"https://api.github.com/repos/apple/swift","forks_url":"https://api.github.com/repos/apple/swift/forks","keys_url":"https://api.github.com/repos/apple/swift/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apple/swift/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apple/swift/teams","hooks_url":"https://api.github.com/repos/apple/swift/hooks","issue_events_url":"https://api.github.com/repos/apple/swift/issues/events{/number}","events_url":"https://api.github.com/repos/apple/swift/events","assignees_url":"https://api.github.com/repos/apple/swift/assignees{/user}","branches_url":"https://api.github.com/repos/apple/swift/branches{/branch}","tags_url":"https://api.github.com/repos/apple/swift/tags","blobs_url":"https://api.github.com/repos/apple/swift/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apple/swift/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apple/swift/git/refs{/sha}","trees_url":"https://api.github.com/repos/apple/swift/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apple/swift/statuses/{sha}","languages_url":"https://api.github.com/repos/apple/swift/languages","stargazers_url":"https://api.github.com/repos/apple/swift/stargazers","contributors_url":"https://api.github.com/repos/apple/swift/contributors","subscribers_url":"https://api.github.com/repos/apple/swift/subscribers","subscription_url":"https://api.github.com/repos/apple/swift/subscription","commits_url":"https://api.github.com/repos/apple/swift/commits{/sha}","git_commits_url":"https://api.github.com/repos/apple/swift/git/commits{/sha}","comments_url":"https://api.github.com/repos/apple/swift/comments{/number}","issue_comment_url":"https://api.github.com/repos/apple/swift/issues/comments{/number}","contents_url":"https://api.github.com/repos/apple/swift/contents/{+path}","compare_url":"https://api.github.com/repos/apple/swift/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apple/swift/merges","archive_url":"https://api.github.com/repos/apple/swift/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apple/swift/downloads","issues_url":"https://api.github.com/repos/apple/swift/issues{/number}","pulls_url":"https://api.github.com/repos/apple/swift/pulls{/number}","milestones_url":"https://api.github.com/repos/apple/swift/milestones{/number}","notifications_url":"https://api.github.com/repos/apple/swift/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apple/swift/labels{/name}","releases_url":"https://api.github.com/repos/apple/swift/releases{/id}","deployments_url":"https://api.github.com/repos/apple/swift/deployments","created_at":"2015-10-23T21:15:07Z","updated_at":"2018-06-22T17:46:34Z","pushed_at":"2018-06-22T17:45:32Z","git_url":"git://github.com/apple/swift.git","ssh_url":"git@github.com:apple/swift.git","clone_url":"https://github.com/apple/swift.git","svn_url":"https://github.com/apple/swift","homepage":"https://swift.org/","size":300468,"stargazers_count":44273,"watchers_count":44273,"language":"C++","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":6979,"mirror_url":null,"archived":false,"open_issues_count":361,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":6979,"open_issues":361,"watchers":44273,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apple/swift/pulls/17424"},"html":{"href":"https://github.com/apple/swift/pull/17424"},"issue":{"href":"https://api.github.com/repos/apple/swift/issues/17424"},"comments":{"href":"https://api.github.com/repos/apple/swift/issues/17424/comments"},"review_comments":{"href":"https://api.github.com/repos/apple/swift/pulls/17424/comments"},"review_comment":{"href":"https://api.github.com/repos/apple/swift/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apple/swift/pulls/17424/commits"},"statuses":{"href":"https://api.github.com/repos/apple/swift/statuses/3eb08043381d84d4c4a57fcbfe0f7d99f1638a92"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"nkcsgexi"}}