[cfe-commits] r153887 - in /cfe/trunk: include/clang/Basic/DiagnosticParseKinds.td lib/Parse/ParseTemplate.cpp test/FixIt/fixit.cpp test/Parser/cxx-template-decl.cpp

Sebastian Redl sebastian.redl at getdesigned.at
Tue Apr 3 08:11:23 PDT 2012

On 02.04.2012, at 21:15, David Blaikie wrote:

> Author: dblaikie
> Date: Mon Apr  2 14:15:28 2012
> New Revision: 153887
> URL: http://llvm.org/viewvc/llvm-project?rev=153887&view=rev
> Log:
> Correct error recovery when missing 'class' in a template template parameter.
> The diagnostic message correctly informs the user that they have omitted the
> 'class' keyword, but neither suggests this insertion as a fixit, nor attempts
> to recover as if they had provided the keyword.
> This fixes the recovery, adds the fixit, and adds a separate diagnostic and
> corresponding replacement fixit for cases where the user wrote 'struct' or
> 'typename' instead of 'class' (suggested by Richard Smith as a possible common
> mistake).
> I'm not sure the diagnostic message for either the original or new cases feel
> very Clang-esque, so I'm open to suggestions there. The fixit hints make it
> fairly easy to see what's required, though.

"Template template parameters require 'class' after the argument list."?


More information about the cfe-commits mailing list