Szelethus added a comment.

Thanks for the review!

I spend some time thinking about the support for lambda functions, and I start 
to think that checking for lambda misuse shouldn't be the responsibility of 
this checker. I created a new revision for that discussion, I wouldn't like to 
abandon this one until I heard what you think of this! :)
https://reviews.llvm.org/D48318



================
Comment at: lib/StaticAnalyzer/Checkers/UninitializedObjectChecker.cpp:687
+    CXXRecordDecl::capture_const_iterator CapturedVar =
+        std::find_if(CXXParent->captures_begin(), CXXParent->captures_end(),
+                     [&Field](const LambdaCapture &L) {
----------------
george.karpenkov wrote:
> Could we just use a for-each here? Sorry for being opinionated, I'm pretty 
> sure it would be both shorter and more readable.
Great idea! :) I completely agree, to be honest I scratched my head too while I 
wrote it down.


Repository:
  rC Clang

https://reviews.llvm.org/D48291



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

Reply via email to