aaron.ballman added inline comments.

================
Comment at: clang/lib/Sema/SemaStmt.cpp:1846
+            (*Iter)->setInvalidDecl();
+          }
         }
----------------
rjmccall wrote:
> You can have multiple tag declarations because of complex declarators or 
> type-specifiers, e.g. `struct A (*var)(struct B)` or `_Atomic(struct 
> A(*)(struct B))`.  It should already be an error to write the latter without 
> a declarator, but you do need to not diagnose if there *is* a declarator.  
> Probably the right way to write this is to ignore tags in the first walk but 
> remember whether you saw a non-tag; if you don't, diagnose the first tag.
Good point on the more complex declarators -- I've added some extra tests for 
that case as well.


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

https://reviews.llvm.org/D92577

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to