[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
Thu Sep 14 18:37:02 PDT 2017
vsapsai marked an inline comment as done.
vsapsai added inline comments.
================
Comment at: clang/test/Sema/enum.c:128
+// PR28903
+struct PR28903 { // expected-warning {{empty struct is a GNU extension}}
+ enum {
----------------
rnk wrote:
> This is a simpler test case that fixes the extraneous diagnostics:
> struct PR28903 {
> enum {
> E1 = (enum { // expected-error-re {{...}}
> E2, E3 = E2
> })0
> } e;
> };
>
Removed extraneous diagnostics in slightly different way. Keep enum constants prefixed with PR28903 because in C struct doesn't create a scope for enum constants and I want to avoid polluting test namespace with common names like E1, E2, E3.
https://reviews.llvm.org/D37089
More information about the cfe-commits
mailing list