Author: Nikita Popov Date: 2023-06-16T12:43:58+02:00 New Revision: 835cdcb9191fb8036f782ae532594c4e1f456ffc
URL: https://github.com/llvm/llvm-project/commit/835cdcb9191fb8036f782ae532594c4e1f456ffc DIFF: https://github.com/llvm/llvm-project/commit/835cdcb9191fb8036f782ae532594c4e1f456ffc.diff LOG: [Clang] Fix compare-record.c test on s390x (NFC) s390x looks through pointers when determining the "externally visible vector ABI". For that reason, the test shows different behavior just on that platform. Adjust the test in the reverse direction of what I originall did: Make sure that the type behind the pointer is always queried, by dereferencing the pointer. Added: Modified: clang/test/Modules/compare-record.c Removed: ################################################################################ diff --git a/clang/test/Modules/compare-record.c b/clang/test/Modules/compare-record.c index c5ce285aa77ee..60998696969e1 100644 --- a/clang/test/Modules/compare-record.c +++ b/clang/test/Modules/compare-record.c @@ -423,10 +423,13 @@ struct CompareDifferentFieldInIndirectStruct compareIndirectStruct; // expected-error@second-nested-struct.h:* {{'IndirectStruct::mismatchingField' from module 'Second' is not present in definition of 'struct IndirectStruct' in module 'First.Hidden'}} // expected-note@first-nested-struct.h:* {{declaration of 'mismatchingField' does not match}} #elif defined(CASE3) -// This currently doesn't produce an error, because there is no dependency -// on the layout of DirectStruct. -// expected-no-diagnostics +// expected-error@second-nested-struct.h:* {{'IndirectStruct::mismatchingField' from module 'Second' is not present in definition of 'struct IndirectStruct' in module 'First.Hidden'}} +// expected-note@first-nested-struct.h:* {{declaration of 'mismatchingField' does not match}} struct CompareIndirectStructPointer compareIndirectStructPointer; +struct DirectStruct test() { + // Make sure the type behind the pointer is inspected. + return *compareIndirectStructPointer.directFieldPointer; +} #endif //--- include/first-anonymous.h _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits