[PATCH] D155895: Anonymous unions should be transparent wrt `[[clang::trivial_abi]]`.

Dmitri Gribenko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 4 13:35:34 PDT 2023


gribozavr2 accepted this revision.
gribozavr2 added inline comments.
This revision is now accepted and ready to land.


================
Comment at: clang/test/SemaCXX/attr-trivial-abi.cpp:258
+  static_assert(__is_trivially_relocatable(TrivialAbiAttributeAppliedToAnonymousUnion), "");
+#endif
+
----------------
Is it possible to restructure the ifdefs to only wrap the different parts?

That is, you can place only the `expected-warning` line and `static_assert` lines within ifdefs. You can use the `@`-syntax on `expected-warning` to tell clang to expect the warning on a different line, for example see `test/SemaCXX/deprecated.cpp`.


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

https://reviews.llvm.org/D155895



More information about the cfe-commits mailing list