[PATCH] D37089: [Sema] Error out early for tags defined inside an enumeration.

Volodymyr Sapsai via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 23 17:57:14 PDT 2017


vsapsai added a comment.

I have also considered adding tests for structs and unions defined inside an enumeration but decided it doesn't add much value, given the code is working for all TagDecl.

Another option I had in mind is having a note pointing to outer enum. But the nesting is done in the same file so the outer enum shouldn't be hard to find. So I decided that complexity outweighs the added value.

If anybody thinks the aforementioned changes are valuable, please tell so.


https://reviews.llvm.org/D37089





More information about the cfe-commits mailing list