aaron.ballman added inline comments.
================ Comment at: clang/include/clang/ASTMatchers/ASTMatchersInternal.h:1994 + return None; + return FD->getNumParams() > 0 ? UO_PostInc : UO_PreInc; + } ---------------- Not certain how much we want to care about it, but I think we need to check whether there's exactly one parameter of type `int` to meet the language rules for these to be replacement APIs: http://eel.is/c++draft/over.inc#1 e.g., the user could do something rather unlikely like: `int operator++(float);` for their overload and we're report it as being equivalent when it really isn't. ================ Comment at: clang/include/clang/ASTMatchers/ASTMatchersInternal.h:2142-2150 + auto optBinaryOpcode = equivalentBinaryOperator(Node); + if (!optBinaryOpcode) { + auto optUnaryOpcode = equivalentUnaryOperator(Node); + if (!optUnaryOpcode) { + return false; + } + return Name == UnaryOperator::getOpcodeStr(*optUnaryOpcode); ---------------- Can we reuse the implementation from `getOpName()` to simplify this? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94128/new/ https://reviews.llvm.org/D94128 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits