Removing some more unnecessary manual quotes from diagnostics. Updated the related test case to ensure correctness.

llvm-svn: 198412
This commit is contained in:
Aaron Ballman 2014-01-03 13:34:55 +00:00
parent 352dae199a
commit fee0cd45fe
3 changed files with 3 additions and 3 deletions

View File

@ -146,7 +146,7 @@ def ext_flexible_array_init : Extension<
def err_bad_variable_name : Error<
"%0 cannot be the name of a variable or data member">;
def err_bad_parameter_name : Error<
"'%0' cannot be the name of a parameter">;
"%0 cannot be the name of a parameter">;
def err_parameter_name_omitted : Error<"parameter name omitted">;
def warn_unused_parameter : Warning<"unused parameter %0">,
InGroup<UnusedParameter>, DefaultIgnore;

View File

@ -9169,7 +9169,7 @@ Decl *Sema::ActOnParamDeclarator(Scope *S, Declarator &D) {
II = D.getIdentifier();
if (!II) {
Diag(D.getIdentifierLoc(), diag::err_bad_parameter_name)
<< GetNameForDeclarator(D).getName().getAsString();
<< GetNameForDeclarator(D).getName();
D.setInvalidType(true);
}
}

View File

@ -1,3 +1,3 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++11
void foo (int operator+); // expected-error{{cannot be the name of a parameter}}
void foo(int operator+); // expected-error{{'operator+' cannot be the name of a parameter}}