[PATCH] D107506: [PowerPC][AIX] Warn when using pragma align(packed) on AIX.

2021-09-29 Thread Sean Fertile via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9b10e2b1cf01: [PowerPC][AIX] Warn when using pragma align(packed) on AIX. (authored by sfertile). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107506/new/

[PATCH] D107506: [PowerPC][AIX] Warn when using pragma align(packed) on AIX.

2021-08-09 Thread Chris Bowler via Phabricator via cfe-commits
cebowleratibm accepted this revision. cebowleratibm added a comment. The new version is better than the previous. LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107506/new/ https://reviews.llvm.org/D107506 ___

[PATCH] D107506: [PowerPC][AIX] Warn when using pragma align(packed) on AIX.

2021-08-07 Thread Sean Fertile via Phabricator via cfe-commits
sfertile updated this revision to Diff 364996. sfertile marked an inline comment as done. sfertile added a comment. Add a couple more struct layouts to the testing to show cases diagnostic is not issued. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org

[PATCH] D107506: [PowerPC][AIX] Warn when using pragma align(packed) on AIX.

2021-08-06 Thread Sean Fertile via Phabricator via cfe-commits
sfertile marked an inline comment as done. sfertile added inline comments. Comment at: clang/test/Sema/aix-pragma-align-packed-warn.c:13 + short a : 8; // expected-warning {{#pragma align(packed) may not be compatible with objects generated with AIX XL C/C++}} + short b : 8;

[PATCH] D107506: [PowerPC][AIX] Warn when using pragma align(packed) on AIX.

2021-08-06 Thread Sean Fertile via Phabricator via cfe-commits
sfertile updated this revision to Diff 364814. sfertile added a comment. Fixed diagnostic to only emit when there is a bitfield member. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107506/new/ https://reviews.llvm.org/D107506 Files: clang/inclu

[PATCH] D107506: [PowerPC][AIX] Warn when using pragma align(packed) on AIX.

2021-08-06 Thread Sean Fertile via Phabricator via cfe-commits
sfertile added a comment. In D107506#2931095 , @sfertile wrote: > Moved the diagnostic emission to ` Sema::ActOnTagFinishDefinition` as > suggested. Sorry, uploaded wrong diff. Will updated again shortly. Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D107506: [PowerPC][AIX] Warn when using pragma align(packed) on AIX.

2021-08-06 Thread Sean Fertile via Phabricator via cfe-commits
sfertile updated this revision to Diff 364782. sfertile added a comment. Moved the diagnostic emission to ` Sema::ActOnTagFinishDefinition` as suggested. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107506/new/ https://reviews.llvm.org/D107506 Fi

[PATCH] D107506: [PowerPC][AIX] Warn when using pragma align(packed) on AIX.

2021-08-05 Thread Chris Bowler via Phabricator via cfe-commits
cebowleratibm added inline comments. Comment at: clang/test/Sema/aix-pragma-align-packed-warn.c:13 + short a : 8; // expected-warning {{#pragma align(packed) may not be compatible with objects generated with AIX XL C/C++}} + short b : 8; // expected-warning {{#pragma align(p

[PATCH] D107506: [PowerPC][AIX] Warn when using pragma align(packed) on AIX.

2021-08-05 Thread Chris Bowler via Phabricator via cfe-commits
cebowleratibm accepted this revision. cebowleratibm added a comment. This revision is now accepted and ready to land. It would be nice if the diagnostic could be deferred to layout, in case the struct is defined but not used in a header, but I understand that #pragma pack(1) and #pragma align(pa

[PATCH] D107506: [PowerPC][AIX] Warn when using pragma align(packed) on AIX.

2021-08-05 Thread Sean Fertile via Phabricator via cfe-commits
sfertile added a comment. Good point Chris. The only difference in layout is related to bitfield members, so I have moved the warning to `VerifyBitField` as suggested. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107506/new/ https://reviews.llvm.

[PATCH] D107506: [PowerPC][AIX] Warn when using pragma align(packed) on AIX.

2021-08-05 Thread Sean Fertile via Phabricator via cfe-commits
sfertile updated this revision to Diff 364570. sfertile added a comment. Only emit diagnostic on bitfield members, which is the only difference in align(packed) behaviour XL and clang/xlclang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107506/ne

[PATCH] D107506: [PowerPC][AIX] Warn when using pragma align(packed) on AIX.

2021-08-05 Thread Chris Bowler via Phabricator via cfe-commits
cebowleratibm added inline comments. Comment at: clang/lib/Sema/SemaAttr.cpp:238 +if (this->Context.getTargetInfo().getTriple().isOSAIX()) + Diag(PragmaLoc, diag::warn_pragma_align_not_xl_compatible); Action = Sema::PSK_Push_Set; Does this diagnosti

[PATCH] D107506: [PowerPC][AIX] Warn when using pragma align(packed) on AIX.

2021-08-04 Thread Sean Fertile via Phabricator via cfe-commits
sfertile created this revision. sfertile added reviewers: stevewan, Jake-Egan, cebowleratibm. sfertile added a project: PowerPC. Herald added subscribers: shchenz, nemanjai. sfertile requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. With xlc