This is an archive of the discontinued LLVM Phabricator instance.

[libc++] Refactor allocator_mismatch.compile.fail.cpp -> .verify.cpp
ClosedPublic

Authored by ldionne on Feb 27 2023, 1:56 PM.

Details

Summary

compile.fail.cpp tests are an anti-feature since they are too easy to
break when evolving code. This patch moves various allocator_mismatch
tests to .verify.cpp and normalizes the error messages from various
containers.

Diff Detail

Event Timeline

ldionne created this revision.Feb 27 2023, 1:56 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 27 2023, 1:56 PM
ldionne requested review of this revision.Feb 27 2023, 1:56 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 27 2023, 1:56 PM
Herald added a reviewer: Restricted Project. · View Herald Transcript
philnik accepted this revision.Feb 27 2023, 2:12 PM
philnik added a subscriber: philnik.

LGTM % comment.

libcxx/test/std/containers/associative/map/allocator_mismatch.verify.cpp
15

Let's not use the header name. That will just result in unnecessary refactorings later and doesn't really have any value compared to a generic match. It's not like we actually care from what header the error message is.

This revision is now accepted and ready to land.Feb 27 2023, 2:12 PM
ldionne updated this revision to Diff 500920.Feb 27 2023, 2:39 PM
ldionne marked an inline comment as done.

Address comment and fix diagnostic matcher on older Clang