[PATCH] D87702: [Frontend] Add pragma align natural and sort out pragma pack stack effect

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 12 05:17:50 PST 2021


aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.

LGTM aside from a few small issues to fix.



================
Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:893
+def err_pragma_pack_identifer_not_supported : Error<
+  "specifying an identifier within pragma pack is not supported, identifier is ignored">;
 def err_section_conflict : Error<"%0 causes a section type conflict with %1">;
----------------
The identifier is no longer ignored now that this is an error rather than a warning.


================
Comment at: clang/test/Sema/aix-pragma-pack-and-align.c:231
+
+// expected-no-warning
----------------
Xiangling_L wrote:
> aaron.ballman wrote:
> > Is this comment intentional?
> Yes, my intention is to test no pragma pack or prama align is unterminated.
I don't think we have such a construct that's checked by `-verify` (and if we did, I'd say the test file is broken because it contains `expected-warning` comments).

Because you're passing `-verify`, any warnings that are triggered on a line without a matching `expected-warning` comment will be reported as a test failure, so you can safely remove this comment and still get the test coverage you want.


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

https://reviews.llvm.org/D87702



More information about the cfe-commits mailing list