First off: I'm not happy about having this extension in upstream clang until we 
have a strong indication that this is the direction that will end up 
standardized. For now, I'd recommend maintaining this as a clang fork on github 
or similar. With that said, I'm going to review this as if for upstream clang.

I don't like that you create two variables here. We try to maintain as much 
source fidelity as we can, and I think we can do better here -- how about 
instead introducing a new form of expression that represents "stack-allocate a 
certain amount of memory" (with a subexpression for the initialization, if you 
allow these variables to have an initializer), much like 
MaterializeTemporaryExpr does for a SD_Automatic temporary, but parameterized 
by an expression specifying the array size? Then create just a single 
expression of the std::arb type, initialized by that expression.

You should also introduce a Type subclass to represent type sugar for the ARB 
type, so that we can model that int[n] desugars to std::arb<int> but should be 
pretty-printed as an array type.


http://reviews.llvm.org/D9714

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/



_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to