[PATCH] D84604: Thread safety analysis: Consider global variables in scope

Aaron Puchert via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Oct 24 14:58:49 PDT 2020


aaronpuchert updated this revision to Diff 300507.
aaronpuchert added a comment.

`LiteralPtr`s aren't always globals, local variables are also translated that way. So we ask the stored `ValueDecl` if it `isDefinedOutsideFunctionOrMethod`. That seems like the right thing.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D84604/new/

https://reviews.llvm.org/D84604

Files:
  clang/lib/Analysis/ThreadSafety.cpp
  clang/test/SemaCXX/warn-thread-safety-analysis.cpp
  clang/test/SemaCXX/warn-thread-safety-negative.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D84604.300507.patch
Type: text/x-patch
Size: 3817 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20201024/33b0768c/attachment.bin>


More information about the cfe-commits mailing list