forked from OSchip/llvm-project
Dump decl when the test matcher fails.
This commit is contained in:
parent
28237c33d9
commit
b144cd867b
|
@ -59,7 +59,8 @@ MATCHER_P(DeclNamed, Name, "") {
|
||||||
|
|
||||||
MATCHER_P(DeclKind, Kind, "") {
|
MATCHER_P(DeclKind, Kind, "") {
|
||||||
if (NamedDecl *ND = dyn_cast<NamedDecl>(arg))
|
if (NamedDecl *ND = dyn_cast<NamedDecl>(arg))
|
||||||
return ND->getDeclKindName() == Kind;
|
if (ND->getDeclKindName() == Kind)
|
||||||
|
return true;
|
||||||
if (auto *Stream = result_listener->stream()) {
|
if (auto *Stream = result_listener->stream()) {
|
||||||
llvm::raw_os_ostream OS(*Stream);
|
llvm::raw_os_ostream OS(*Stream);
|
||||||
arg->dump(OS);
|
arg->dump(OS);
|
||||||
|
|
Loading…
Reference in New Issue