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

Aaron Ballman aaron at aaronballman.com
Fri Jan 3 05:34:56 PST 2014


Author: aaronballman
Date: Fri Jan  3 07:34:55 2014
New Revision: 198412

URL: http://llvm.org/viewvc/llvm-project?rev=198412&view=rev
Log:
Removing some more unnecessary manual quotes from diagnostics. Updated the related test case to ensure correctness.

Modified:
    cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
    cfe/trunk/lib/Sema/SemaDecl.cpp
    cfe/trunk/test/SemaCXX/PR8012.cpp

Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=198412&r1=198411&r2=198412&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Fri Jan  3 07:34:55 2014
@@ -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;

Modified: cfe/trunk/lib/Sema/SemaDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDecl.cpp?rev=198412&r1=198411&r2=198412&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDecl.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDecl.cpp Fri Jan  3 07:34:55 2014
@@ -9169,7 +9169,7 @@ Decl *Sema::ActOnParamDeclarator(Scope *
     II = D.getIdentifier();
     if (!II) {
       Diag(D.getIdentifierLoc(), diag::err_bad_parameter_name)
-        << GetNameForDeclarator(D).getName().getAsString();
+        << GetNameForDeclarator(D).getName();
       D.setInvalidType(true);
     }
   }

Modified: cfe/trunk/test/SemaCXX/PR8012.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/PR8012.cpp?rev=198412&r1=198411&r2=198412&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/PR8012.cpp (original)
+++ cfe/trunk/test/SemaCXX/PR8012.cpp Fri Jan  3 07:34:55 2014
@@ -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}}





More information about the cfe-commits mailing list