]> granicus.if.org Git - clang/commitdiff
Removing some more unnecessary manual quotes from diagnostics.
authorAaron Ballman <aaron@aaronballman.com>
Fri, 3 Jan 2014 02:20:27 +0000 (02:20 +0000)
committerAaron Ballman <aaron@aaronballman.com>
Fri, 3 Jan 2014 02:20:27 +0000 (02:20 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198395 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/SemaDecl.cpp

index c5608ba8e05c29c544b641f7b68d90f176fcd66a..b2af7973974321a9ee2a4d24352f0de6fc1d97a8 100644 (file)
@@ -425,7 +425,7 @@ def ext_noreturn_main : ExtWarn<
 def note_main_remove_noreturn : Note<"remove '_Noreturn'">;
 def err_constexpr_main : Error<
   "'main' is not allowed to be declared constexpr">;
-def err_mainlike_template_decl : Error<"'%0' cannot be a template">;
+def err_mainlike_template_decl : Error<"%0 cannot be a template">;
 def err_main_returns_nonint : Error<"'main' must return 'int'">;
 def ext_main_returns_nonint : ExtWarn<"return type of 'main' is not 'int'">,
     InGroup<MainReturnType>;
index b89ccce832def50b6e6bdb9af05b82be187c8462..1dec6954625754a1d30ad681b1d37454e8990c02 100644 (file)
@@ -7849,7 +7849,7 @@ void Sema::CheckMain(FunctionDecl* FD, const DeclSpec& DS) {
   }
   
   if (!FD->isInvalidDecl() && FD->getDescribedFunctionTemplate()) {
-    Diag(FD->getLocation(), diag::err_mainlike_template_decl) << FD->getName();
+    Diag(FD->getLocation(), diag::err_mainlike_template_decl) << FD;
     FD->setInvalidDecl();
   }
 }
@@ -7869,7 +7869,7 @@ void Sema::CheckMSVCRTEntryPoint(FunctionDecl *FD) {
       FD->setHasImplicitReturnZero(true);
 
   if (!FD->isInvalidDecl() && FD->getDescribedFunctionTemplate()) {
-    Diag(FD->getLocation(), diag::err_mainlike_template_decl) << FD->getName();
+    Diag(FD->getLocation(), diag::err_mainlike_template_decl) << FD;
     FD->setInvalidDecl();
   }
 }