{"url":"https://api.github.com/repos/llvm/llvm-project/issues/90517","repository_url":"https://api.github.com/repos/llvm/llvm-project","labels_url":"https://api.github.com/repos/llvm/llvm-project/issues/90517/labels{/name}","comments_url":"https://api.github.com/repos/llvm/llvm-project/issues/90517/comments","events_url":"https://api.github.com/repos/llvm/llvm-project/issues/90517/events","html_url":"https://github.com/llvm/llvm-project/pull/90517","id":2269856206,"node_id":"PR_kwDOBITxeM5uDsxk","number":90517,"title":"[Clang][Sema][Parse] Delay parsing of noexcept-specifiers in friend function declarations","user":{"login":"sdkrystian","id":16629302,"node_id":"MDQ6VXNlcjE2NjI5MzAy","avatar_url":"https://avatars.githubusercontent.com/u/16629302?v=4","gravatar_id":"","url":"https://api.github.com/users/sdkrystian","html_url":"https://github.com/sdkrystian","followers_url":"https://api.github.com/users/sdkrystian/followers","following_url":"https://api.github.com/users/sdkrystian/following{/other_user}","gists_url":"https://api.github.com/users/sdkrystian/gists{/gist_id}","starred_url":"https://api.github.com/users/sdkrystian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sdkrystian/subscriptions","organizations_url":"https://api.github.com/users/sdkrystian/orgs","repos_url":"https://api.github.com/users/sdkrystian/repos","events_url":"https://api.github.com/users/sdkrystian/events{/privacy}","received_events_url":"https://api.github.com/users/sdkrystian/received_events","type":"User","user_view_type":"public","site_admin":false},"labels":[{"id":1958965060,"node_id":"MDU6TGFiZWwxOTU4OTY1MDYw","url":"https://api.github.com/repos/llvm/llvm-project/labels/clang","name":"clang","color":"79b5d1","default":false,"description":"Clang issues not falling into any other category"},{"id":1958998266,"node_id":"MDU6TGFiZWwxOTU4OTk4MjY2","url":"https://api.github.com/repos/llvm/llvm-project/labels/clang:frontend","name":"clang:frontend","color":"3b12ce","default":false,"description":"Language frontend issues, e.g. anything involving \"Sema\""}],"state":"closed","locked":false,"assignees":[],"milestone":null,"comments":5,"created_at":"2024-04-29T19:58:53Z","updated_at":"2024-04-30T18:23:03Z","closed_at":"2024-04-30T18:23:02Z","assignee":null,"author_association":"MEMBER","issue_field_values":[],"type":null,"active_lock_reason":null,"draft":false,"pull_request":{"url":"https://api.github.com/repos/llvm/llvm-project/pulls/90517","html_url":"https://github.com/llvm/llvm-project/pull/90517","diff_url":"https://github.com/llvm/llvm-project/pull/90517.diff","patch_url":"https://github.com/llvm/llvm-project/pull/90517.patch","merged_at":"2024-04-30T18:23:02Z"},"body":"According to [[class.mem.general] p8](http://eel.is/c++draft/class.mem.general#8):\r\n> A complete-class context of a class (template) is a\r\n> - function body,\r\n> - default argument,\r\n> - default template argument,\r\n> - _noexcept-specifier_, or\r\n> - default member initializer\r\n>\r\n> within the member-specification of the class or class template.\r\n\r\nWhen testing #90152, it came to my attention that we do _not_ consider the _noexcept-specifier_ of a friend function declaration to be a complete-class context (something which the Microsoft standard library depends on). Although a comment states that this is \"consistent with what other implementations do\", the only other implementation that exhibits this behavior is GCC (MSVC and EDG both late-parse the _noexcept-specifier_). \r\n\r\nThis patch changes _noexcept-specifiers_ of friend function declarations to be late parsed, which is in agreement with the standard & majority of implementations. Pre-#90152, our existing implementation falls \"in between\" the implementation consensus: within non-template classes, we would not find latter declared members (qualified and unqualified), while within class templates we would not find latter declared member when named with a unqualified name, we would find members named with a qualified name (even when lookup context is the current instantiation). Therefore, this _shouldn't_ be a breaking change -- any code that didn't compile will continue to not compile (since a _noexcept-specifier_ is not part of the [deduction substitution loci](http://eel.is/c++draft/temp.deduct.general#7)), and any code which did compile should continue to do so.","closed_by":{"login":"sdkrystian","id":16629302,"node_id":"MDQ6VXNlcjE2NjI5MzAy","avatar_url":"https://avatars.githubusercontent.com/u/16629302?v=4","gravatar_id":"","url":"https://api.github.com/users/sdkrystian","html_url":"https://github.com/sdkrystian","followers_url":"https://api.github.com/users/sdkrystian/followers","following_url":"https://api.github.com/users/sdkrystian/following{/other_user}","gists_url":"https://api.github.com/users/sdkrystian/gists{/gist_id}","starred_url":"https://api.github.com/users/sdkrystian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sdkrystian/subscriptions","organizations_url":"https://api.github.com/users/sdkrystian/orgs","repos_url":"https://api.github.com/users/sdkrystian/repos","events_url":"https://api.github.com/users/sdkrystian/events{/privacy}","received_events_url":"https://api.github.com/users/sdkrystian/received_events","type":"User","user_view_type":"public","site_admin":false},"reactions":{"url":"https://api.github.com/repos/llvm/llvm-project/issues/90517/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/llvm/llvm-project/issues/90517/timeline","performed_via_github_app":null,"state_reason":null}