diff options
author | Pavel Labath <labath@google.com> | 2017-12-13 10:00:38 +0000 |
---|---|---|
committer | Pavel Labath <labath@google.com> | 2017-12-13 10:00:38 +0000 |
commit | 56c2d9997901d28e7aba84c74ecc8c49021d088c (patch) | |
tree | 81330ae76ca42169f7d89f9cfd70df86c8b78127 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 19c9314aea1634800974de2199a1bdab0a63c7ea (diff) | |
download | bcm5719-llvm-56c2d9997901d28e7aba84c74ecc8c49021d088c.tar.gz bcm5719-llvm-56c2d9997901d28e7aba84c74ecc8c49021d088c.zip |
[Testing/Support] Make the HasValue matcher composable
Summary:
This makes it possible to run an arbitrary matcher on the value
contained within the Expected<T> object.
To do this, I've needed to fully spell out the matcher, instead of using
the shorthand MATCHER_P macro.
The slight gotcha here is that standard template deduction will fail if
one tries to match HasValue(47) against an Expected<int &> -- the
workaround is to use HasValue(testing::Eq(47)).
The explanations produced by this matcher have changed a bit, since now
we delegate to the nested matcher to print the value. Since these don't
put quotes around the value, I've changed our PrintTo methods to match.
Reviewers: zturner
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D41065
llvm-svn: 320561
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions