================
@@ -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:

IMO, adding this convenience overload without updating existing call sites 
offers limited practical benefit. 

Could you also update the corresponding `UnaryOperator` calls, for example in 
`clangd/DumpAST.cpp` and `ASTMatchersInternal.h`, to match the `BinaryOperator` 
usage? That would simplify existing code and make the value of the new overload 
more apparent.

https://github.com/llvm/llvm-project/pull/230692
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to