[clang-tidy] performance-unnecessary-copy-initialization: Fix false negative.
`isConstRefReturningMethodCall` should be considering `CXXOperatorCallExpr` in addition to `CXXMemberCallExpr`. Clang considers these to be distinct (`CXXOperatorCallExpr` derives from `CallExpr`, not `CXXMemberCallExpr`), but we don't care in the context of this check. This is important because of `std::vector<Expensive>::operator[](size_t) const`. Differential Revision: https://reviews.llvm.org/D114249
Loading
Please sign in to comment