[PATCH] D28266: Transparent_union attribute should be possible in front of union (rework)

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 3 16:50:08 PST 2017


erichkeane added inline comments.


================
Comment at: lib/Sema/SemaDecl.cpp:13499
+  if (Attr)
+    ProcessDeclAttributeList(S, New, Attr);
+
----------------
I wasn't sure if this was the correct change in here.  My other option was to move the above 2 lines (13495/13496) above these line's original spot, but moving it here seems to have correctly passed all tests.  Anyone with more knowledge here want to chime in?


================
Comment at: test/Sema/transparent-union.c:57
 
+typedef union __attribute__((transparent_union)) {
+  aligned_struct4 s4; // expected-note{{alignment of first field}}
----------------
2 Additional sema tests to ensure that the same warnings occur both in prefix and postfix attribute definition.


https://reviews.llvm.org/D28266





More information about the cfe-commits mailing list