rjmccall added inline comments.

================
Comment at: include/clang/AST/ASTContext.h:248
+  /// Mapping from __block VarDecls to their copy initialization expr. The
+  /// boolean flag indicates whether the expression can throw.
+  typedef llvm::DenseMap<const VarDecl *,
----------------
Maybe you should just make a type for this pairing.  You can put this 
documentation there, and the access functions can take and return it.


================
Comment at: lib/Sema/SemaDecl.cpp:11851
+        if (canThrow(init))
+          Context.setBlockVarCopyExprCanThrow(var);
       }
----------------
Can we just make this a parameter to `setBlockVarCopyInits`?  The caller always 
needs to set this correctly, so making it a required parameter makes sense — 
and it avoids doing the hash-lookup twice.


Repository:
  rC Clang

https://reviews.llvm.org/D50152



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

Reply via email to