Author: Aaron Ballman Date: 2022-06-03T09:00:05-04:00 New Revision: 1896df18cc5b588760f75cc2c21d64c772cf0e4c
URL: https://github.com/llvm/llvm-project/commit/1896df18cc5b588760f75cc2c21d64c772cf0e4c DIFF: https://github.com/llvm/llvm-project/commit/1896df18cc5b588760f75cc2c21d64c772cf0e4c.diff LOG: Correct the behavior of this test for non-Windows targets This should address build failures like: https://lab.llvm.org/buildbot/#/builders/188/builds/14980 https://lab.llvm.org/buildbot/#/builders/171/builds/15515 https://lab.llvm.org/buildbot/#/builders/91/builds/9877 Added: Modified: clang/test/C/drs/dr1xx.c Removed: ################################################################################ diff --git a/clang/test/C/drs/dr1xx.c b/clang/test/C/drs/dr1xx.c index 10497f90c2db..e7343c0e3573 100644 --- a/clang/test/C/drs/dr1xx.c +++ b/clang/test/C/drs/dr1xx.c @@ -177,8 +177,16 @@ void dr118(void) { /* The enum isn't a complete type until the closing }, but an * implementation may complete the type earlier if it has sufficient type * information to calculate size or alignment, etc. + * + * On Microsoft targets, an enum is always implicit int sized, so the type + * is sufficiently complete there. On other platforms, it is an incomplete + * type at this point. */ Val = sizeof(enum E) + #ifndef _WIN32 + /* expected-error@-2 {{invalid application of 'sizeof' to an incomplete type 'enum E'}} */ + /* expected-note@-12 {{definition of 'enum E' is not complete until the closing '}'}} */ + #endif }; } _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits