faisalv added inline comments.

================
Comment at: lib/Parse/ParseExprCXX.cpp:1116
+  if (HasExplicitTemplateParams) {
+    SmallVector<Decl*, 4> TemplateParams;
+    SourceLocation LAngleLoc, RAngleLoc;
----------------
hamzasood wrote:
> faisalv wrote:
> > Why not Just use/pass LSI->TemplateParams?
> I thought that Parser and Sema stay separate, and communicate through various 
> ActOn functions? Directly accessing LSI would violate that.
Aah yes - you're right.  Still it does seem a little wasteful to create two of 
those (and then append).  What are your thoughts about passing the argument by 
(moved from) value, and then swapping their guts within ActOn (i..e 
value-semantics) ?  (I suppose the only concern would be the small array case - 
but i think that would be quite easy for any optimizer to inline).   



https://reviews.llvm.org/D36527



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

Reply via email to