On 11/23/22 10:28, Jason Merrill wrote: > On 11/22/22 15:25, Jason Merrill wrote: >> On 11/20/22 12:06, Bernhard Reutner-Fischer wrote: >>> Hi Jason! >>> >>> The "meh" of result-decl-plugin-test-2.C should likely be omitted, >>> grokdeclarator would need some changes to add richloc hints and we >>> would not >>> be able to make a reliable guess what to remove precisely. >>> C.f. /* Check all other uses of type modifiers.  */ >>> Furthermore it is unrelated to DECL_RESULT so not of direct interest >>> here. The other tests in test-2.C, f() and huh() should work though. >>> >>> I don't know if it's acceptable to change ipa-pure-const to make the >>> missing noreturn warning more precise and emit a fixit-hint. At least it >>> would be a real test for the DECL_RESULT and would spare us the plugin. >> >> The main problem I see with that change is that the syntax of the >> fixit might be wrong for non-C-family front-ends. >> >> Here's a version of the patch that fixes template/method handling, and >> adjusts -Waggregate-return as well: > > Actually, that broke some of the spaceship tests, fixed by this version: Here's what I'm applying: