forked from OSchip/llvm-project
ItaniumDemangler: Update BinaryExpr::match to match the ctor
Not sure if this could use more testing, but hopefully this is adequate.
This commit is contained in:
parent
ff60af91ac
commit
1d1cf9b6c4
|
@ -1782,7 +1782,9 @@ public:
|
|||
: Node(KBinaryExpr, Prec_), LHS(LHS_), InfixOperator(InfixOperator_),
|
||||
RHS(RHS_) {}
|
||||
|
||||
template<typename Fn> void match(Fn F) const { F(LHS, InfixOperator, RHS); }
|
||||
template <typename Fn> void match(Fn F) const {
|
||||
F(LHS, InfixOperator, RHS, getPrecedence());
|
||||
}
|
||||
|
||||
void printLeft(OutputBuffer &OB) const override {
|
||||
bool ParenAll = OB.isGtInsideTemplateArgs() && InfixOperator == ">";
|
||||
|
|
|
@ -172,6 +172,10 @@ struct DumpVisitor {
|
|||
return printStr("TemplateParamKind::Template");
|
||||
}
|
||||
}
|
||||
void print(llvm::itanium_demangle::Node::Prec) {
|
||||
// Do nothing, the printing functions handle precedence with parentheses
|
||||
// already.
|
||||
}
|
||||
|
||||
void newLine() {
|
||||
printStr("\n");
|
||||
|
|
Loading…
Reference in New Issue