================ @@ -477,6 +477,34 @@ class DeclarationName { return OO_None; } + bool isAnyOperatorNew() const { + if (getNameKind() != DeclarationName::CXXOperatorName) + return false; + switch (getCXXOverloadedOperator()) { + case OO_New: + case OO_Array_New: + return true; + default: + return false; + } + } + + bool isAnyOperatorDelete() const { ---------------- ojhunt wrote:
@cor3ntin are you ok with this rename? I realized isOperatorDelete() (or New, etc) created a hazard where it was tempting to replace `==OO_Delete` with `isOperatorDelete()` which would be incorrect https://github.com/llvm/llvm-project/pull/113510 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits