================
@@ -30,7 +14,7 @@ void Positives() {
   // CHECK-FIXES-NULLPTR: P = nullptr;
   // CHECK-FIXES-RESET: P.reset();
 
-  auto P2 = P;
+  auto &P2 = P;
----------------
vbvictor wrote:

Otherwise get error:
`Call to deleted constructor of 'std::unique_ptr<int>'clang(ovl_deleted_init)`
In real implementation:

```cpp
// Disable copy from lvalue.
      unique_ptr(const unique_ptr&) = delete;
      unique_ptr& operator=(const unique_ptr&) = delete;
```

https://github.com/llvm/llvm-project/pull/186649
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to