================
@@ -279,7 +281,7 @@ void UseAfterMoveFinder::getDeclRefs(
         if (DeclRef && BlockMap->blockContainingStmt(DeclRef) == Block) {
           // Ignore uses of a standard smart pointer that don't dereference the
           // pointer.
-          if (Operator || !isStandardSmartPointer(DeclRef->getDecl())) {
+          if (Operator || !isStandardResettableOwner(DeclRef->getDecl())) {
----------------
higher-performance wrote:

> `has_value` together with `value`

Ahh I see. I was thinking of them separately, but I guess I can see that if 
`has_value` returns true then the next action will be `value` which probably 
shouldn't be relied on, so you could say `has_value` shouldn't be relied on 
either.

> I would've said that this PR should be blocked until the above is handled 
> correctly, but actually, the PR as is, is removing some false-positives by 
> considering the calls to `reset` as resetting the state. So there are no real 
> negatives attached to this PR, that weren't there before, it's only improving 
> the state. The changes outlined above make some negatives positives, which 
> could be done in a follow-up (+issue in case you do not end up implementing 
> it) (in one go would be nicer, of course).

Ah okay. Could we move forward with this PR then? I'll make an issue for this, 
but I'm not sure when I'll find the time to work on that, and I don't want to 
block this on that change.

https://github.com/llvm/llvm-project/pull/114255
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to