forked from OSchip/llvm-project
Fix order of evaluation bug in DynTypedMatcher::constructVariadic().
Fix order of evaluation bug in DynTypedMatcher::constructVariadic(). If it evaluates right-to-left, the vector gets moved before we read the kind from it. llvm-svn: 219624
This commit is contained in:
parent
17a0011082
commit
193d87fd8c
|
@ -99,8 +99,8 @@ DynTypedMatcher DynTypedMatcher::constructVariadic(
|
||||||
// The different operators might deal differently with a mismatch.
|
// The different operators might deal differently with a mismatch.
|
||||||
// Make it the same as SupportedKind, since that is the broadest type we are
|
// Make it the same as SupportedKind, since that is the broadest type we are
|
||||||
// allowed to accept.
|
// allowed to accept.
|
||||||
return DynTypedMatcher(InnerMatchers[0].SupportedKind,
|
auto SupportedKind = InnerMatchers[0].SupportedKind;
|
||||||
InnerMatchers[0].SupportedKind,
|
return DynTypedMatcher(SupportedKind, SupportedKind,
|
||||||
new VariadicMatcher(Func, std::move(InnerMatchers)));
|
new VariadicMatcher(Func, std::move(InnerMatchers)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue