================ @@ -580,6 +580,26 @@ void handleConstMemberCall(const CallExpr *CE, return; } + // Cache if the const method returns a reference + if (RecordLoc != nullptr && CE->isGLValue()) { + const FunctionDecl *DirectCallee = CE->getDirectCallee(); + if (DirectCallee == nullptr) + return; + + bool isReference = + DirectCallee->getReturnType().getTypePtr()->isReferenceType(); + if (isReference) { ---------------- BaLiKfromUA wrote:
maybe this check is redundant https://github.com/llvm/llvm-project/pull/128437 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits