{"url":"https://api.github.com/repos/llvm/llvm-project/issues/91339","repository_url":"https://api.github.com/repos/llvm/llvm-project","labels_url":"https://api.github.com/repos/llvm/llvm-project/issues/91339/labels{/name}","comments_url":"https://api.github.com/repos/llvm/llvm-project/issues/91339/comments","events_url":"https://api.github.com/repos/llvm/llvm-project/issues/91339/events","html_url":"https://github.com/llvm/llvm-project/pull/91339","id":2283514309,"node_id":"PR_kwDOBITxeM5uxWkj","number":91339,"title":"[Clang][Sema] Don't set instantiated from function when rewriting operator<=>","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":1958965546,"node_id":"MDU6TGFiZWwxOTU4OTY1NTQ2","url":"https://api.github.com/repos/llvm/llvm-project/labels/clang-tools-extra","name":"clang-tools-extra","color":"79b5d1","default":false,"description":""},{"id":1958992817,"node_id":"MDU6TGFiZWwxOTU4OTkyODE3","url":"https://api.github.com/repos/llvm/llvm-project/labels/clangd","name":"clangd","color":"79e6fc","default":false,"description":""},{"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-07T14:27:28Z","updated_at":"2024-10-08T20:29:55Z","closed_at":"2024-05-08T00:09:19Z","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/91339","html_url":"https://github.com/llvm/llvm-project/pull/91339","diff_url":"https://github.com/llvm/llvm-project/pull/91339.diff","patch_url":"https://github.com/llvm/llvm-project/pull/91339.patch","merged_at":"2024-05-08T00:09:19Z"},"body":"The following snippet causes a crash:\r\n```cpp\r\ntemplate<typename T>\r\nstruct A \r\n{\r\n    bool operator<=>(const A&) const requires true = default;\r\n};\r\n\r\nbool f(A<int> a) \r\n{\r\n    return a != A<int>();\r\n}\r\n```\r\nThis occurs because during the rewrite from `operator<=>` to `operator==`, the \"pattern\" `operator<=>` function is set as the instantiated from function for the newly created `operator==` function. This is obviously incorrect, and this patch fixes it.","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/91339/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/91339/timeline","performed_via_github_app":null,"state_reason":null}