This is an archive of the discontinued LLVM Phabricator instance.

Tighten up a modules test
ClosedPublic

Authored by probinson on Feb 16 2023, 7:22 AM.

Diff Detail

Event Timeline

probinson created this revision.Feb 16 2023, 7:22 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 16 2023, 7:22 AM
probinson requested review of this revision.Feb 16 2023, 7:22 AM

I looked at this test only because it caused a merge conflict downstream. While it does work, it will not catch some kinds of mistakes; by being less specific in the "not" checks, it will catch more potential problems.

clang/test/CXX/module/basic/basic.def.odr/p4.cppm
5

Note the typo "unused_sta*s*tic_global_module"
Simpler to reject all "unused" strings.

88

This CHECK-NOT is overly specific. For example,
define dso_local hidden void ...
would not match, and therefore pass, when it should not.

ChuanqiXu accepted this revision.Feb 16 2023, 5:50 PM

LGTM. Thanks!

This revision is now accepted and ready to land.Feb 16 2023, 5:50 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptFeb 17 2023, 6:35 AM