[Fix] new clang -Wthread-safety-analysis warnings (#34614)
Returning a reference to a GUARDED_BY variable while only holding the lock in the getter lets callers access the variable without holding the lock. See https://github.com/llvm/llvm-project/pull/67776. This is only used for testing, so just return a copy for simplicity. <!-- If you know who should review your pull request, please assign it to that person, otherwise the pull request would get assigned randomly. If your pull request is for a specific language, please add the appropriate lang label. -->pull/34752/head
parent
652e9093fd
commit
4e34078eaf
1 changed files with 2 additions and 2 deletions
Loading…
Reference in new issue