Vlad Serebrennikov 604e4adef0
[clang] Non-trivial fixes in C++ DR tests (#179813)
This is a follow-up to #179674, which applies various fixes across C++
DR tests uncovered by `-verify-directives` (#179835
).

Changes here serve double duty. First, they fix actual problems found by
`-verify-directives`, because I've been manually enforcing those rules
manually for quite a while. Second, they show typical problems and
possible solutions when you opt-in a test to use `-verify-directives`.
This PR focuses on interesting cases, as partial diagnostic matches,
which are trivial to fix, are fixed in boring #179674

Changes include:
1. Getting rid of instantiations at the end of TU that emit diagnostics:
either trigger them earlier, or move them to a separate file
2. Reordering of `expected-error` and `expected-note` to match the order
in which corresponding diagnsotics are emitted.
3. Eliminating leftover partial matches of diagnostic text
4. Removing some extension warnings, because C++ DR tests are not
interested in features backported to older language modes.
5. Fix for a hilarious case of CWG413 test, which was checking for a
note from a typo correction that happened in another test.
2026-02-10 21:09:20 +00:00
..
2026-01-30 08:04:23 -05:00