njames93 marked 2 inline comments as done.
njames93 added inline comments.

================
Comment at: clang-tools-extra/clang-tidy/mpi/BufferDerefCheck.cpp:29-30
 
+  if (!FuncClassifier)
+    FuncClassifier.emplace(*Result.Context);
+
----------------
aaron.ballman wrote:
> njames93 wrote:
> > aaron.ballman wrote:
> > > This is racy, but I don't think we support running multiple checks in 
> > > parallel, do we?
> > This isn't racy as one instance of a check will only ever run on one 
> > thread. 
> I was thinking if the check gets run multiple times in parallel on different 
> source files (e.g., someone downstream who incorporates the checks as a 
> library in a creative way rather than runs clang-tidy as a command line 
> tool). But yeah, I'm not worried about it as I don't think we support that 
> sort of thing.
Plenty of other checks hold state that is mutated in the check callback, so if 
this is a race, all the other checks that mutate state in the callbacks will 
also have a race.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D98275

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to