[PATCH] PR10405 Missing actual type (aka) in error message when using decltype as a template parameter

Nikola Smiljanić popizdeh at gmail.com
Thu May 29 20:25:11 PDT 2014


================
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?

http://reviews.llvm.org/D3588






More information about the cfe-commits mailing list