[PATCH] D87194: Thread safety analysis: Use access specifiers to decide about scope

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 2 08:47:30 PST 2020


aaron.ballman added inline comments.


================
Comment at: clang/lib/Analysis/ThreadSafety.cpp:1283
+      return true;
+    // We are ignoring friends here.
     if (!CurrentMethod)
----------------
This should probably have a FIXME?


================
Comment at: clang/lib/Analysis/ThreadSafety.cpp:1297-1299
+      for (const CXXBasePath &Path : Paths)
+        if (Path.Access != AS_none)
+          return true;
----------------
`llvm::any_of()`?


================
Comment at: clang/test/SemaCXX/warn-thread-safety-negative.cpp:158
+}
+
 }  // end namespace ScopeTest
----------------
Given that this is touching on declaration contexts, it would also be good to have some tests checking for differences between declaration contexts (like out-of-line method definitions)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D87194



More information about the cfe-commits mailing list