Szelethus added inline comments.

================
Comment at: lib/StaticAnalyzer/Checkers/UninitializedObjectChecker.cpp:685
+
+  if (CXXParent && CXXParent->isLambda()) {
+    CXXRecordDecl::capture_const_iterator CapturedVar =
----------------
george.karpenkov wrote:
> CXXParent is guaranteed to be non-null at this stage, otherwise dyn_cast fails
I found this on 
http://llvm.org/docs/ProgrammersManual.html#the-isa-cast-and-dyn-cast-templates:

>dyn_cast<>:
>
>    The dyn_cast<> operator is a “checking cast” operation. It checks to see 
> if the operand is of the specified type, and if so, returns a pointer to it 
> (this operator does not work with references). If the operand is not of the 
> correct type, a null pointer is returned.

So I guess this should be alright.


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