On Thu, May 29, 2014 at 8:25 PM, Nikola Smiljanić <[email protected]>
wrote:

> ================
> Comment at: lib/AST/ASTDiagnostic.cpp:72
> @@ +71,3 @@
> +        = dyn_cast<TemplateSpecializationType>(Ty)) {
> +      for (auto Arg : *TST) {
> +          if (Arg.getKind() == TemplateArgument::Type)
> ----------------
> Richard Smith wrote:
> > Please don't use a `TemplateSpecializationType` as a container like
> this; it's not notionally a container of template arguments. Instead, add
> an `arguments` member function to `TemplateSpecializationType` to return
> the arguments list.
> The class already has `getArgs`, `getNumArgs` and `getArg` methods. But
> why does it have `begin` and `end` if not to be used as a container?


Those names predate the use of range-based for loops in Clang, and should
probably be renamed to args_begin() and args_end().
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to