[cfe-commits] TypePrinter and C++03 templates

Argyrios Kyrtzidis akyrtzi at gmail.com
Thu Jun 28 14:45:26 PDT 2012


On Jun 28, 2012, at 7:03 AM, Axel Naumann wrote:

> Hi,
> 
> Attached patch inserts a space between closing template brackets: it will print "foo<bar<int> >" instead of "foo<bar<int>>". This is nicer if the type is meant to be used as compiler input for C++ <11.

+    needSpace = (!ArgString.empty() && ArgString[ArgString.size() - 1] == '>');

You can use
ArgString.back() == '>'
otherwise LGTM.

> 
> Objections? Or do you prefer this extra ' ' only for C++ <11?
> 
> Axel.
> <clang_ASTPrinter_template_close_space.diff>_______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits





More information about the cfe-commits mailing list