================
@@ -2399,6 +2399,8 @@ class UnaryOperator final
/// corresponds to, e.g. "sizeof" or "[pre]++"
static StringRef getOpcodeStr(Opcode Op);
+ StringRef getOpcodeStr() const { return getOpcodeStr(getOpcode()); }
----------------
ChenMiaoi wrote:
> There are many more places in clang where static `getOpcodeStr` is called,
> but I changed only those where `BinaryOperator` and `UnaryOperator` calls
> appear side-by-side (i.e. `BinaryOperator` uses the member function and
> `UnaryOperator` does not).
I think you should update all the usage sites. Even with the criteria you
described, there are still some sites that haven’t been updated.
Example:
https://github.com/llvm/llvm-project/blob/f582a0f919b90264806a3a0386419a51bc668179/clang/lib/Tooling/ASTDiff/ASTDiff.cpp#L450
https://github.com/llvm/llvm-project/pull/230692
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits