mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-12 19:01:55 +00:00
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_),
|
: Node(KBinaryExpr, Prec_), LHS(LHS_), InfixOperator(InfixOperator_),
|
||||||
RHS(RHS_) {}
|
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 {
|
void printLeft(OutputBuffer &OB) const override {
|
||||||
bool ParenAll = OB.isGtInsideTemplateArgs() && InfixOperator == ">";
|
bool ParenAll = OB.isGtInsideTemplateArgs() && InfixOperator == ">";
|
||||||
|
@ -172,6 +172,10 @@ struct DumpVisitor {
|
|||||||
return printStr("TemplateParamKind::Template");
|
return printStr("TemplateParamKind::Template");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
void print(llvm::itanium_demangle::Node::Prec) {
|
||||||
|
// Do nothing, the printing functions handle precedence with parentheses
|
||||||
|
// already.
|
||||||
|
}
|
||||||
|
|
||||||
void newLine() {
|
void newLine() {
|
||||||
printStr("\n");
|
printStr("\n");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user