vrnithinkumar added inline comments.
================ Comment at: clang/test/Analysis/smart-ptr.cpp:295 + P->foo(); // No warning. +} ---------------- I was trying to test the below code. ``` void foo_() { std::unique_ptr<A> PToMove; std::unique_ptr<A>&& AfterRValeRefCast = std::move(functionReturnsRValueRef()); std::unique_ptr<A> P(AfterRValeRefCast); P->foo(); // expected-warning {{Dereference of null smart pointer 'P' [alpha.cplusplus.SmartPtr]}} } ``` But passing the local RValue reference variable to move constructor is always invoking the deleted copy constructor. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86373/new/ https://reviews.llvm.org/D86373 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits