https://reviews.llvm.org/D105659 implements ByVal handling in llc but
some cases are not compatible with existing XL compiler on AIX. Adding
a clang warning for such cases.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Event Timeline
clang/include/clang/Basic/DiagnosticSemaKinds.td | ||
---|---|---|
3258–3259 | I see your point. Sorry if this isn't what is supposed to be done or if it doesn't a good precedent. The reasons for adding this warning is that our back end implementation isn't totally compatible with XL now and, while buggy, users on AIX may expect clang and xlclang to be compatible since AIX is the reference compiler. The xlclang name implies it's clang based and it's possible for users to expect some sort of binary compatibility. |
clang/include/clang/Basic/DiagnosticSemaKinds.td | ||
---|---|---|
3258–3259 |
No worries, it's a good discussion to have! We have some MSVC and GCC compatibility warnings, so there's precedent for naming other compilers. Now that you've moved the diagnostic into an AIX compatibility diagnostic group, I am more comfortable with it. Thanks! | |
clang/lib/Sema/SemaDeclAttr.cpp | ||
3959–3962 | ||
clang/test/Sema/aix-attr-align.c | ||
3 | Can you add two more RUN lines where we expect no warnings? One would be from a non AIX triple and the other would be with -Wno-aix-compat specified? Btw, in case you don't know about it, you can do -verify=off for those RUN lines and add // off-no-diagnostics to the top of the file and that should cover it. |
clang/include/clang/Basic/DiagnosticSemaKinds.td | ||
---|---|---|
3258–3259 | It actually isn't correct, the warning should apply only to members of structs. Thanks for bringing it to my attention again, I also missed this the last time. |
LGTM, thank you!
clang/include/clang/Basic/DiagnosticSemaKinds.td | ||
---|---|---|
3258–3259 | Huttah for code review working as intended! :-) |
clang/include/clang/Basic/DiagnosticSemaKinds.td | ||
---|---|---|
3258–3259 | Indeed, thank you for the timely reviews. |
Should we be talking about the AIX XL compiler in a Clang diagnostic?