gribozavr added inline comments.
================ Comment at: clang/lib/Sema/SemaInit.cpp:6563 +static bool shouldTrackImplicitObjectArg(const CXXMethodDecl *Callee) { + if (auto *Conv = dyn_cast_or_null<CXXConversionDecl>(Callee)) ---------------- This looks like an ad-hoc rule. Is there a way to express it with attributes instead? ================ Comment at: clang/lib/Sema/SemaInit.cpp:6572 + return false; + return llvm::StringSwitch<bool>(Callee->getName()) + .Cases("begin", "rbegin", "cbegin", "crbegin", true) ---------------- Should we also check that `Callee->getParent` is an owner? Otherwise the check would complain about `begin()` on, for example, a `std::string_view`. ================ Comment at: clang/test/Sema/warn-lifetime-analysis-nocfg.cpp:170 + return std::unique_ptr<int>().get(); // expected-warning {{returning address of local temporary object}} +} ---------------- Please add a newline. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65120/new/ https://reviews.llvm.org/D65120 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits