Ah, thanks a lot for the explanation DeLesley! Makes sense.
So, if I define get_foo_copy in terms of get_foo_reference, no safety
warnings can be given because the GUARDED_BY was casted away when returning
foo_ from get_foo_reference.
Is there some way to eliminate the implicit cast by making the
+cfe-dev -- in case anyone knows why this happens.
Thanks!
On Sat, Apr 23, 2016 at 1:41 PM, RJ Ryan wrote:
> Hi there,
>
> The following code only produces thread safety warnings for me in
> get_foo_copy, not get_foo_reference. Is this expected? Sorry if this is a
> FAQ / known issue.
>
> $ cla
Hi there,
The following code only produces thread safety warnings for me in
get_foo_copy, not get_foo_reference. Is this expected? Sorry if this is a
FAQ / known issue.
$ clang --version
Apple LLVM version 7.0.2 (clang-700.1.81)
Target: x86_64-apple-darwin15.3.0
Thread model: posix
The problem a