{"url":"https://api.github.com/repos/llvm/llvm-project/issues/91534","repository_url":"https://api.github.com/repos/llvm/llvm-project","labels_url":"https://api.github.com/repos/llvm/llvm-project/issues/91534/labels{/name}","comments_url":"https://api.github.com/repos/llvm/llvm-project/issues/91534/comments","events_url":"https://api.github.com/repos/llvm/llvm-project/issues/91534/events","html_url":"https://github.com/llvm/llvm-project/pull/91534","id":2286452288,"node_id":"PR_kwDOBITxeM5u7REy","number":91534,"title":"[Clang][Sema] Do not mark template parameters in the exception specification as used during partial ordering","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":2,"created_at":"2024-05-08T20:56:45Z","updated_at":"2024-05-15T22:55:53Z","closed_at":"2024-05-15T22:55:53Z","assignee":null,"author_association":"MEMBER","type":null,"active_lock_reason":null,"draft":false,"pull_request":{"url":"https://api.github.com/repos/llvm/llvm-project/pulls/91534","html_url":"https://github.com/llvm/llvm-project/pull/91534","diff_url":"https://github.com/llvm/llvm-project/pull/91534.diff","patch_url":"https://github.com/llvm/llvm-project/pull/91534.patch","merged_at":"2024-05-15T22:55:53Z"},"body":"We do not deduce template arguments from the exception specification when determining the primary template of a function template specialization or when taking the address of a function template. Therefore, this patch changes `isAtLeastAsSpecializedAs` such that we do not mark template parameters in the exception specification as 'used' during partial ordering (per [[temp.deduct.partial] p12](http://eel.is/c++draft/temp.deduct.partial#12)) to prevent the following from being ambiguous:\r\n\r\n```cpp\r\ntemplate<typename T, typename U>\r\nvoid f(U) noexcept(noexcept(T())); // #1\r\n\r\ntemplate<typename T>\r\nvoid f(T*) noexcept; // #2\r\n\r\ntemplate<>\r\nvoid f<int>(int*) noexcept; // currently ambiguous, selects #2 with this patch applied \r\n```\r\n\r\nAlthough there is no corresponding wording in the standard, this seems to be the intended behavior given the definition of _deduction substitution loci_ in [[temp.deduct.general] p7](http://eel.is/c++draft/temp.deduct.general#7) (and EDG does the same thing). ","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/91534/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/91534/timeline","performed_via_github_app":null,"state_reason":null}