[Testing/Support] Make matchers work with Expected<T&>

Description

[Testing/Support] Make matchers work with Expected<T&>

Summary:
This did not work because the ExpectedHolder was trying to hold the
value in an Optional<T*>. Instead of trying to mimic the behavior of
Expected and try to make ExpectedHolder work with references and
non-references, I simply store the reference to the Expected object in
the holder.

I also add a bunch of tests for these matchers, which have helped me
flesh out some problems in my initial implementation of this patch, and
uncovered the fact that we are not consistent in quoting our values in
the matcher output (which I also fix).

Reviewers: zturner, chandlerc

Subscribers: mgorny, llvm-commits

Differential Revision: https://reviews.llvm.org/D40904

Details

Committed
labathThu, Dec 7, 2:54 AM
Differential Revision
D40904: [Testing/Support] Make matchers work with Expected<T&>
Parents
rL320024: [RISCV] MC layer support for the standard RV64I instructions
Branches
Unknown
Tags
Unknown