This is an archive of the discontinued LLVM Phabricator instance.

[clang] Add tests for CWG issues 977, 1482, 2516
ClosedPublic

Authored by Endill on May 20 2023, 11:57 PM.

Details

Summary

CWG977 focus on point of /completeness/ of enums. Wording provided in CWG1482.
CWG1482 and CWG2516 focus on locus (point) of /declaration/. Wording provided in CWG2516.

Diff Detail

Event Timeline

Endill created this revision.May 20 2023, 11:57 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 20 2023, 11:57 PM
Endill requested review of this revision.May 20 2023, 11:57 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 20 2023, 11:57 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
shafik accepted this revision.May 22 2023, 8:46 PM

LGTM

This revision is now accepted and ready to land.May 22 2023, 8:46 PM
This revision was landed with ongoing or failed builds.May 23 2023, 2:51 AM
This revision was automatically updated to reflect the committed changes.
thakis added a subscriber: thakis.May 23 2023, 5:07 AM

This breaks check-clang on windows: http://45.33.8.238/win/78827/step_7.txt

Please take a look and revert for now if it takes a while to fix.

This breaks check-clang on windows: http://45.33.8.238/win/78827/step_7.txt

Please take a look and revert for now if it takes a while to fix.

It's not hard to fix, but is it just windows? Sorry I'm not too familiar with buildbots.

On my bots (which cover linux, mac/arm, and windows), it's only failing on the windows bot.

All tests pass for me on Linux.
As far as I understand, diagnostics on Windows are not supposed to be different given the same -cc1 flags. Reverting for further investigation.

All tests pass for me on Linux.
As far as I understand, diagnostics on Windows are not supposed to be different given the same -cc1 flags. Reverting for further investigation.

Thanks for the revert. The test also failed on the official llvm win buildbot here https://lab.llvm.org/buildbot/#/builders/123 fwiw (but it takes a long time to load).

Diagnostics on windows absolutely can be different on windows with the same cc1 flags. Clang uses the host system's target triple, and for (say) x86_64-pc-windows clang runs in MS mode, which enables some cl.exe compatibility things.

In fact, you can probably repro the test failure on your linux box if you change that test and add locally add -triple=i386-pc-win32 to the RUN line (or maybe the behavior to enable MS extensions based on target lives in the driver; in that case you'd have to add -fms-extensions -fms-compatibility).

In fact, you can probably repro the test failure on your linux box if you change that test and add locally add -triple=i386-pc-win32 to the RUN line

You're right, MSVC-specific triple make the issue reproduce on my Linux box. Thank you!