[PATCH] D131990: [DRAFT][WebAssembly] Do not support `[[clang::musttail]]` by default

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 17 06:23:03 PDT 2022


aaron.ballman added a comment.

> Marked draft for further discussion because I'm not sure getting this:
>
>   test.cpp:10:7: warning: unknown attribute 'musttail' ignored [-Wunknown-attributes]
>       [[clang::musttail]] return bar(x * 10);
>
> is actually better developer experience than getting a fatal error with a description of the WebAssembly-specific problem.

FWIW, I think it's vastly better. A fatal error on the backend is a bug in the compiler. Telling the user "this attribute won't do anything for you" is a feature. If we think the "unknown attribute ignored" warning is too generic and we'd rather see something like "attribute 'foo' not supported on this target", that's an improvement but one we should make across all target-specific attributes. (FWIW, I'd be happy to review such a patch if you or anyone else felt like working on it. But I don't think it's a requirement for what you're doing here.)

I think all that's missing from this patch are test cases and a release note.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131990/new/

https://reviews.llvm.org/D131990



More information about the cfe-commits mailing list