thread-safety warnings, specifically try_acquire_capability

I'm trying to use the annotations on some existing code, with (I
think) success, mostly. There's some code that conditionally locks
mutexes, and I note that's not supported so some code reorganisation
was needed.

What I can't seem to get to work is trylock(). I have some code which
does something like

    if (!mutex_.trylock()) {
       return;
    }
    ...
    mutex_.unlock();

and that doesn't work at all. I always seem to get complaints that
mutex_ might not be locked. Is this just an extension of the
unsupported nature of conditional locking? i.e., is there currently no
useful way to use the try_acquire_capability attribute (beyond
documentation)? (Not a horrible restriction for this code, but I'd
have thought it would be useful to mention it in the docs.)

I'm trying to use the annotations on some existing code, with (I
think) success, mostly. There's some code that conditionally locks
mutexes, and I note that's not supported so some code reorganisation
was needed.

What I can't seem to get to work is trylock(). I have some code which
does something like

    if (!mutex_.trylock()) {
       return;
    }
    ...
    mutex_.unlock();

and that doesn't work at all. I always seem to get complaints that
mutex_ might not be locked. Is this just an extension of the
unsupported nature of conditional locking? i.e., is there currently no
useful way to use the try_acquire_capability attribute (beyond
documentation)? (Not a horrible restriction for this code, but I'd
have thought it would be useful to mention it in the docs.)

I believe i have reported the same bug already:
https://bugs.llvm.org/show_bug.cgi?id=32954

Roman.

Oh yes, that's the same. (I should have checked the bug database first.)