{"action":"created","comment":{"url":"https://api.github.com/repos/include-what-you-use/include-what-you-use/pulls/comments/41707363","id":41707363,"diff_hunk":"@@ -613,6 +627,28 @@ void IwyuFileInfo::ReportForwardDeclareUse(SourceLocation use_loc,\n   LogSymbolUse(\"Marked fwd-decl use of decl\", symbol_uses_.back());\n }\n \n+void IwyuFileInfo::ReportUsingDeclUse(SourceLocation use_loc,\n+                                      const UsingDecl* using_decl,\n+                                      bool in_cxx_method_body,\n+                                      const char* comment) {  \n+  // If accessing a symbol through a using decl in the same file that contains\n+  // the using decl, we must mark the using decl as referenced. At the end of\n+  // traversing the AST, we check to see if a using decl is unreferenced and\n+  // add a full use of one of its shadow decls so that the source file\n+  // continues to compile.\n+  map<const UsingDecl*, bool>::iterator using_decl_status = \n+    using_decl_referenced_.find(using_decl);\n+\n+  if (using_decl_status != using_decl_referenced_.end()) {\n+    using_decl_status->second = true;\n+  }\n+","path":"iwyu_output.cc","position":67,"original_position":67,"commit_id":"3c49f69575d125203a804e8b5486285b325f8631","original_commit_id":"bceceae466d1b933360a3fc1f88bc8fc477d6d9c","user":{"login":"kimgr","id":169074,"avatar_url":"https://avatars.githubusercontent.com/u/169074?v=3","gravatar_id":"","url":"https://api.github.com/users/kimgr","html_url":"https://github.com/kimgr","followers_url":"https://api.github.com/users/kimgr/followers","following_url":"https://api.github.com/users/kimgr/following{/other_user}","gists_url":"https://api.github.com/users/kimgr/gists{/gist_id}","starred_url":"https://api.github.com/users/kimgr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kimgr/subscriptions","organizations_url":"https://api.github.com/users/kimgr/orgs","repos_url":"https://api.github.com/users/kimgr/repos","events_url":"https://api.github.com/users/kimgr/events{/privacy}","received_events_url":"https://api.github.com/users/kimgr/received_events","type":"User","site_admin":false},"body":"Oh, thanks for the explanation. So `using_decl_referenced_` is really `using_decl_referenced_in_same_file_`? I'm not suggesting a name change (too painfully long), but it might be worth making that clearer somehow.","created_at":"2015-10-11T08:20:03Z","updated_at":"2015-10-11T08:20:03Z","html_url":"https://github.com/include-what-you-use/include-what-you-use/pull/221#discussion_r41707363","pull_request_url":"https://api.github.com/repos/include-what-you-use/include-what-you-use/pulls/221","_links":{"self":{"href":"https://api.github.com/repos/include-what-you-use/include-what-you-use/pulls/comments/41707363"},"html":{"href":"https://github.com/include-what-you-use/include-what-you-use/pull/221#discussion_r41707363"},"pull_request":{"href":"https://api.github.com/repos/include-what-you-use/include-what-you-use/pulls/221"}}},"pull_request":{"url":"https://api.github.com/repos/include-what-you-use/include-what-you-use/pulls/221","id":46820327,"html_url":"https://github.com/include-what-you-use/include-what-you-use/pull/221","diff_url":"https://github.com/include-what-you-use/include-what-you-use/pull/221.diff","patch_url":"https://github.com/include-what-you-use/include-what-you-use/pull/221.patch","issue_url":"https://api.github.com/repos/include-what-you-use/include-what-you-use/issues/221","number":221,"state":"open","locked":false,"title":"Add better support for using declarations to make them less greedy.","user":{"login":"cdglove","id":1856042,"avatar_url":"https://avatars.githubusercontent.com/u/1856042?v=3","gravatar_id":"","url":"https://api.github.com/users/cdglove","html_url":"https://github.com/cdglove","followers_url":"https://api.github.com/users/cdglove/followers","following_url":"https://api.github.com/users/cdglove/following{/other_user}","gists_url":"https://api.github.com/users/cdglove/gists{/gist_id}","starred_url":"https://api.github.com/users/cdglove/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cdglove/subscriptions","organizations_url":"https://api.github.com/users/cdglove/orgs","repos_url":"https://api.github.com/users/cdglove/repos","events_url":"https://api.github.com/users/cdglove/events{/privacy}","received_events_url":"https://api.github.com/users/cdglove/received_events","type":"User","site_admin":false},"body":"Cleaned up version of Pull Request #200 .  Resolves issue #174","created_at":"2015-10-05T19:07:33Z","updated_at":"2015-10-11T08:20:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"69575bab1ada5d1001c32ad8b2c4987be57b3272","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/include-what-you-use/include-what-you-use/pulls/221/commits","review_comments_url":"https://api.github.com/repos/include-what-you-use/include-what-you-use/pulls/221/comments","review_comment_url":"https://api.github.com/repos/include-what-you-use/include-what-you-use/pulls/comments{/number}","comments_url":"https://api.github.com/repos/include-what-you-use/include-what-you-use/issues/221/comments","statuses_url":"https://api.github.com/repos/include-what-you-use/include-what-you-use/statuses/3c49f69575d125203a804e8b5486285b325f8631","head":{"label":"cdglove:enhanced_using_decl_support","ref":"enhanced_using_decl_support","sha":"3c49f69575d125203a804e8b5486285b325f8631","user":{"login":"cdglove","id":1856042,"avatar_url":"https://avatars.githubusercontent.com/u/1856042?v=3","gravatar_id":"","url":"https://api.github.com/users/cdglove","html_url":"https://github.com/cdglove","followers_url":"https://api.github.com/users/cdglove/followers","following_url":"https://api.github.com/users/cdglove/following{/other_user}","gists_url":"https://api.github.com/users/cdglove/gists{/gist_id}","starred_url":"https://api.github.com/users/cdglove/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cdglove/subscriptions","organizations_url":"https://api.github.com/users/cdglove/orgs","repos_url":"https://api.github.com/users/cdglove/repos","events_url":"https://api.github.com/users/cdglove/events{/privacy}","received_events_url":"https://api.github.com/users/cdglove/received_events","type":"User","site_admin":false},"repo":{"id":39687377,"name":"include-what-you-use","full_name":"cdglove/include-what-you-use","owner":{"login":"cdglove","id":1856042,"avatar_url":"https://avatars.githubusercontent.com/u/1856042?v=3","gravatar_id":"","url":"https://api.github.com/users/cdglove","html_url":"https://github.com/cdglove","followers_url":"https://api.github.com/users/cdglove/followers","following_url":"https://api.github.com/users/cdglove/following{/other_user}","gists_url":"https://api.github.com/users/cdglove/gists{/gist_id}","starred_url":"https://api.github.com/users/cdglove/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cdglove/subscriptions","organizations_url":"https://api.github.com/users/cdglove/orgs","repos_url":"https://api.github.com/users/cdglove/repos","events_url":"https://api.github.com/users/cdglove/events{/privacy}","received_events_url":"https://api.github.com/users/cdglove/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cdglove/include-what-you-use","description":"A tool for use with clang to analyze #includes in C and C++ source files","fork":true,"url":"https://api.github.com/repos/cdglove/include-what-you-use","forks_url":"https://api.github.com/repos/cdglove/include-what-you-use/forks","keys_url":"https://api.github.com/repos/cdglove/include-what-you-use/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cdglove/include-what-you-use/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cdglove/include-what-you-use/teams","hooks_url":"https://api.github.com/repos/cdglove/include-what-you-use/hooks","issue_events_url":"https://api.github.com/repos/cdglove/include-what-you-use/issues/events{/number}","events_url":"https://api.github.com/repos/cdglove/include-what-you-use/events","assignees_url":"https://api.github.com/repos/cdglove/include-what-you-use/assignees{/user}","branches_url":"https://api.github.com/repos/cdglove/include-what-you-use/branches{/branch}","tags_url":"https://api.github.com/repos/cdglove/include-what-you-use/tags","blobs_url":"https://api.github.com/repos/cdglove/include-what-you-use/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cdglove/include-what-you-use/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cdglove/include-what-you-use/git/refs{/sha}","trees_url":"https://api.github.com/repos/cdglove/include-what-you-use/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cdglove/include-what-you-use/statuses/{sha}","languages_url":"https://api.github.com/repos/cdglove/include-what-you-use/languages","stargazers_url":"https://api.github.com/repos/cdglove/include-what-you-use/stargazers","contributors_url":"https://api.github.com/repos/cdglove/include-what-you-use/contributors","subscribers_url":"https://api.github.com/repos/cdglove/include-what-you-use/subscribers","subscription_url":"https://api.github.com/repos/cdglove/include-what-you-use/subscription","commits_url":"https://api.github.com/repos/cdglove/include-what-you-use/commits{/sha}","git_commits_url":"https://api.github.com/repos/cdglove/include-what-you-use/git/commits{/sha}","comments_url":"https://api.github.com/repos/cdglove/include-what-you-use/comments{/number}","issue_comment_url":"https://api.github.com/repos/cdglove/include-what-you-use/issues/comments{/number}","contents_url":"https://api.github.com/repos/cdglove/include-what-you-use/contents/{+path}","compare_url":"https://api.github.com/repos/cdglove/include-what-you-use/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cdglove/include-what-you-use/merges","archive_url":"https://api.github.com/repos/cdglove/include-what-you-use/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cdglove/include-what-you-use/downloads","issues_url":"https://api.github.com/repos/cdglove/include-what-you-use/issues{/number}","pulls_url":"https://api.github.com/repos/cdglove/include-what-you-use/pulls{/number}","milestones_url":"https://api.github.com/repos/cdglove/include-what-you-use/milestones{/number}","notifications_url":"https://api.github.com/repos/cdglove/include-what-you-use/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cdglove/include-what-you-use/labels{/name}","releases_url":"https://api.github.com/repos/cdglove/include-what-you-use/releases{/id}","created_at":"2015-07-25T13:54:16Z","updated_at":"2015-07-25T13:54:17Z","pushed_at":"2015-10-10T22:35:02Z","git_url":"git://github.com/cdglove/include-what-you-use.git","ssh_url":"git@github.com:cdglove/include-what-you-use.git","clone_url":"https://github.com/cdglove/include-what-you-use.git","svn_url":"https://github.com/cdglove/include-what-you-use","homepage":"http://include-what-you-use.org","size":1466,"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":"include-what-you-use:master","ref":"master","sha":"82393bb2128c24d53d7dc9392c1065bf2f6fcea3","user":{"login":"include-what-you-use","id":11830272,"avatar_url":"https://avatars.githubusercontent.com/u/11830272?v=3","gravatar_id":"","url":"https://api.github.com/users/include-what-you-use","html_url":"https://github.com/include-what-you-use","followers_url":"https://api.github.com/users/include-what-you-use/followers","following_url":"https://api.github.com/users/include-what-you-use/following{/other_user}","gists_url":"https://api.github.com/users/include-what-you-use/gists{/gist_id}","starred_url":"https://api.github.com/users/include-what-you-use/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/include-what-you-use/subscriptions","organizations_url":"https://api.github.com/users/include-what-you-use/orgs","repos_url":"https://api.github.com/users/include-what-you-use/repos","events_url":"https://api.github.com/users/include-what-you-use/events{/privacy}","received_events_url":"https://api.github.com/users/include-what-you-use/received_events","type":"Organization","site_admin":false},"repo":{"id":37440338,"name":"include-what-you-use","full_name":"include-what-you-use/include-what-you-use","owner":{"login":"include-what-you-use","id":11830272,"avatar_url":"https://avatars.githubusercontent.com/u/11830272?v=3","gravatar_id":"","url":"https://api.github.com/users/include-what-you-use","html_url":"https://github.com/include-what-you-use","followers_url":"https://api.github.com/users/include-what-you-use/followers","following_url":"https://api.github.com/users/include-what-you-use/following{/other_user}","gists_url":"https://api.github.com/users/include-what-you-use/gists{/gist_id}","starred_url":"https://api.github.com/users/include-what-you-use/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/include-what-you-use/subscriptions","organizations_url":"https://api.github.com/users/include-what-you-use/orgs","repos_url":"https://api.github.com/users/include-what-you-use/repos","events_url":"https://api.github.com/users/include-what-you-use/events{/privacy}","received_events_url":"https://api.github.com/users/include-what-you-use/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/include-what-you-use/include-what-you-use","description":"A tool for use with clang to analyze #includes in C and C++ source files","fork":false,"url":"https://api.github.com/repos/include-what-you-use/include-what-you-use","forks_url":"https://api.github.com/repos/include-what-you-use/include-what-you-use/forks","keys_url":"https://api.github.com/repos/include-what-you-use/include-what-you-use/keys{/key_id}","collaborators_url":"https://api.github.com/repos/include-what-you-use/include-what-you-use/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/include-what-you-use/include-what-you-use/teams","hooks_url":"https://api.github.com/repos/include-what-you-use/include-what-you-use/hooks","issue_events_url":"https://api.github.com/repos/include-what-you-use/include-what-you-use/issues/events{/number}","events_url":"https://api.github.com/repos/include-what-you-use/include-what-you-use/events","assignees_url":"https://api.github.com/repos/include-what-you-use/include-what-you-use/assignees{/user}","branches_url":"https://api.github.com/repos/include-what-you-use/include-what-you-use/branches{/branch}","tags_url":"https://api.github.com/repos/include-what-you-use/include-what-you-use/tags","blobs_url":"https://api.github.com/repos/include-what-you-use/include-what-you-use/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/include-what-you-use/include-what-you-use/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/include-what-you-use/include-what-you-use/git/refs{/sha}","trees_url":"https://api.github.com/repos/include-what-you-use/include-what-you-use/git/trees{/sha}","statuses_url":"https://api.github.com/repos/include-what-you-use/include-what-you-use/statuses/{sha}","languages_url":"https://api.github.com/repos/include-what-you-use/include-what-you-use/languages","stargazers_url":"https://api.github.com/repos/include-what-you-use/include-what-you-use/stargazers","contributors_url":"https://api.github.com/repos/include-what-you-use/include-what-you-use/contributors","subscribers_url":"https://api.github.com/repos/include-what-you-use/include-what-you-use/subscribers","subscription_url":"https://api.github.com/repos/include-what-you-use/include-what-you-use/subscription","commits_url":"https://api.github.com/repos/include-what-you-use/include-what-you-use/commits{/sha}","git_commits_url":"https://api.github.com/repos/include-what-you-use/include-what-you-use/git/commits{/sha}","comments_url":"https://api.github.com/repos/include-what-you-use/include-what-you-use/comments{/number}","issue_comment_url":"https://api.github.com/repos/include-what-you-use/include-what-you-use/issues/comments{/number}","contents_url":"https://api.github.com/repos/include-what-you-use/include-what-you-use/contents/{+path}","compare_url":"https://api.github.com/repos/include-what-you-use/include-what-you-use/compare/{base}...{head}","merges_url":"https://api.github.com/repos/include-what-you-use/include-what-you-use/merges","archive_url":"https://api.github.com/repos/include-what-you-use/include-what-you-use/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/include-what-you-use/include-what-you-use/downloads","issues_url":"https://api.github.com/repos/include-what-you-use/include-what-you-use/issues{/number}","pulls_url":"https://api.github.com/repos/include-what-you-use/include-what-you-use/pulls{/number}","milestones_url":"https://api.github.com/repos/include-what-you-use/include-what-you-use/milestones{/number}","notifications_url":"https://api.github.com/repos/include-what-you-use/include-what-you-use/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/include-what-you-use/include-what-you-use/labels{/name}","releases_url":"https://api.github.com/repos/include-what-you-use/include-what-you-use/releases{/id}","created_at":"2015-06-15T03:00:29Z","updated_at":"2015-10-10T17:16:42Z","pushed_at":"2015-10-10T22:35:02Z","git_url":"git://github.com/include-what-you-use/include-what-you-use.git","ssh_url":"git@github.com:include-what-you-use/include-what-you-use.git","clone_url":"https://github.com/include-what-you-use/include-what-you-use.git","svn_url":"https://github.com/include-what-you-use/include-what-you-use","homepage":"http://include-what-you-use.org","size":2426,"stargazers_count":149,"watchers_count":149,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"open_issues_count":62,"forks":15,"open_issues":62,"watchers":149,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/include-what-you-use/include-what-you-use/pulls/221"},"html":{"href":"https://github.com/include-what-you-use/include-what-you-use/pull/221"},"issue":{"href":"https://api.github.com/repos/include-what-you-use/include-what-you-use/issues/221"},"comments":{"href":"https://api.github.com/repos/include-what-you-use/include-what-you-use/issues/221/comments"},"review_comments":{"href":"https://api.github.com/repos/include-what-you-use/include-what-you-use/pulls/221/comments"},"review_comment":{"href":"https://api.github.com/repos/include-what-you-use/include-what-you-use/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/include-what-you-use/include-what-you-use/pulls/221/commits"},"statuses":{"href":"https://api.github.com/repos/include-what-you-use/include-what-you-use/statuses/3c49f69575d125203a804e8b5486285b325f8631"}}}}