[PATCH] D52443: Thread safety analysis: Examine constructor arguments

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 26 16:49:39 PDT 2018


aaron.ballman added a comment.

This generally looks sensible to me.



================
Comment at: lib/Analysis/ThreadSafety.cpp:1970
+  // There can be default arguments, so we stop when one iterator is at end().
+  for (auto Arg = ArgBegin; Param != Params.end() && Arg != ArgEnd;
+       ++Param, ++Arg) {
----------------
How should this interact with variadic functions? Either ones that use `...` with a C varargs function, or ones that use parameter packs in C++. (I realize this is basically existing code, but the question remains.)


================
Comment at: lib/Analysis/ThreadSafety.cpp:2050
+  } else {
+    ExamineCallArguments(D, Exp->arg_begin(), Exp->arg_end(), false);
   }
----------------
Can you add a comment for the bool argument? e.g., `/*OperatorFun*/false`


Repository:
  rC Clang

https://reviews.llvm.org/D52443





More information about the cfe-commits mailing list