RedDocMD added inline comments.
================ Comment at: clang/lib/StaticAnalyzer/Checkers/SmartPtrModeling.cpp:440 + State, {std::make_pair(CC->getCXXThisVal(), ArgVal)}, + C.getLocationContext(), PSK_DirectEscapeOnCall, &Call); ---------------- It seems to me that this pointer escape doesn't work. For the following code: ```lang=cpp void foo() { auto ptr = std::unique_ptr<int>(new int(13)); // Leak warning emitted here } ``` the exploded graph shows the SVal for `new int(13)` as allocated instead of escaped (which eventually triggers the warning). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105821/new/ https://reviews.llvm.org/D105821 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits