diff options
author | David Blaikie <dblaikie@gmail.com> | 2012-04-05 16:56:02 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2012-04-05 16:56:02 +0000 |
commit | a82354563ebf9ed03b32ff5405e312425e6c1cad (patch) | |
tree | f2acf9e98d9f13f09b8b29c191a8bc40ea563e24 /lib/Parse | |
parent | b98b998e9a5637012ab39ad1dabdad7c798721e8 (diff) |
Improve & simplify diagnostic for missing 'class' in template template parameter.
Change suggested by Sebastian Redl on review feedback from r153887.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154102 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse')
-rw-r--r-- | lib/Parse/ParseTemplate.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/Parse/ParseTemplate.cpp b/lib/Parse/ParseTemplate.cpp index 17274337ce..91a9d723a6 100644 --- a/lib/Parse/ParseTemplate.cpp +++ b/lib/Parse/ParseTemplate.cpp @@ -541,14 +541,12 @@ Parser::ParseTemplateTemplateParameter(unsigned Depth, unsigned Position) { // Generate a meaningful error if the user forgot to put class before the // identifier, comma, or greater. if (Tok.is(tok::kw_typename) || Tok.is(tok::kw_struct)) { - Diag(Tok.getLocation(), diag::err_expected_class_instead) - << PP.getSpelling(Tok) + Diag(Tok.getLocation(), diag::err_expected_class_on_template_template_param) << FixItHint::CreateReplacement(Tok.getLocation(), "class"); ConsumeToken(); } else if (!Tok.is(tok::kw_class)) - Diag(Tok.getLocation(), diag::err_expected_class_before) - << PP.getSpelling(Tok) - << FixItHint::CreateInsertion(Tok.getLocation(), "class "); + Diag(Tok.getLocation(), diag::err_expected_class_on_template_template_param) + << FixItHint::CreateInsertion(Tok.getLocation(), "class "); else ConsumeToken(); |