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 | 3a7efa22405dd41893f0f1633a2e308bf041305a (patch) | |
tree | 4d2f724f8c276540dde9956f48e31dd54ed194c7 /clang/lib/Parse/ParseTemplate.cpp | |
parent | af3c79f0acf7ddbc7167d55d302619b6a2078e1b (diff) | |
download | bcm5719-llvm-3a7efa22405dd41893f0f1633a2e308bf041305a.tar.gz bcm5719-llvm-3a7efa22405dd41893f0f1633a2e308bf041305a.zip |
Improve & simplify diagnostic for missing 'class' in template template parameter.
Change suggested by Sebastian Redl on review feedback from r153887.
llvm-svn: 154102
Diffstat (limited to 'clang/lib/Parse/ParseTemplate.cpp')
-rw-r--r-- | clang/lib/Parse/ParseTemplate.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/clang/lib/Parse/ParseTemplate.cpp b/clang/lib/Parse/ParseTemplate.cpp index 17274337ce2..91a9d723a6c 100644 --- a/clang/lib/Parse/ParseTemplate.cpp +++ b/clang/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(); |