halbi2 wrote:

This is a good idea, thank you!
But, does it matter that the moved-from state equate to the default-constructed 
state? That is true of smart pointers but perhaps that is not true of all types 
of which `bugprone-use-after-move` would care to be suppressed. What are the 
risks and benefits of `[[default_constructed_after_move]]` as compared to 
`[[usable_after_move]]`?

Does `bugprone-use-after-move` already know that a default-constructed 
`unique_ptr` is null therefore not dereferencable? If yes why does 
`bugprone-use-after-move` not also know that a moved-from `unique_ptr` is null? 
If no how would this help `bugprone-use-after-move`?

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

Reply via email to