From: Aaron Ballman Date: Fri, 3 Jan 2014 02:20:27 +0000 (+0000) Subject: Removing some more unnecessary manual quotes from diagnostics. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=710b1afb7fa0821cfdf8a8e84eca3801f4984e0b;p=clang Removing some more unnecessary manual quotes from diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198395 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td index c5608ba8e0..b2af797397 100644 --- a/include/clang/Basic/DiagnosticSemaKinds.td +++ b/include/clang/Basic/DiagnosticSemaKinds.td @@ -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; diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index b89ccce832..1dec695462 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -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(); } }