Anastasia added inline comments.

================
Comment at: lib/CodeGen/CGBlocks.cpp:723
+                            ? CGM.getNSConcreteStackBlock()
+                            : llvm::Constant::getNullValue(
+                                  CGM.getNSConcreteStackBlock()->getType());
----------------
yaxunl wrote:
> should use CGM.getNullPointer to create a null pointer.
Btw, does it mean we can no longer use generic llvm::Constant::getNullValue 
helper for PointerTypes? This feels wrong! Is it possible to extend the helper?

Also I find it a bit counter intuitive to use getNullPointer with the second 
argument QualType for the case like this where we don't have an actual AST 
type. Why is it needed? Some documentation might be helpful here. :) Could we 
extend this helper to use default second argument or an overload with one 
argument only. 


https://reviews.llvm.org/D28814



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

Reply via email to