I think we should do this, and I'll try to give a plausibly principled 
rationale.

We have two uses of {}s that I care about: braced init lists and blocks. For 
braced init lists, we routinely omit padding spaces around the {}s:

  foo({x, y z});
  return {{1, 2, 3}};

On the other hand, with every block example I can come up with, we have spaces 
around the {}s:

  if (...) {
  }
  
  int f() {
  }
  
  auto f() {
  }
  
  auto f() -> int {
  }
  
  [] {}, []() {}, []() mutable {}, []() -> int {}

It makes much more sense to me to have a space even in the presence of a 
pointer (or reference).


http://reviews.llvm.org/D10410

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