JonChesterfield added a comment. I'm finally happy with the semantic checks here. Thanks for the guidance on where to look for the hooks.
- attributed variable must be at global scope - all initializers are rejected - default constructors must be trivial (to reduce the scope of this patch) - extern variables rejected as they can't meaningfully have a definition - attribute on a declaration following a normal definition in C rejected Patch is a bit bigger than I hoped for but quite self contained. Everything is guarded by a test on the attribute. @Quuxplusone does restricting this to trivial default construction resolve your concerns? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74361/new/ https://reviews.llvm.org/D74361 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits