r198371 - Removing some more unnecessary manual quotes from attribute diagnostics.
Aaron Ballman
aaron at aaronballman.com
Thu Jan 2 15:02:01 PST 2014
Author: aaronballman
Date: Thu Jan 2 17:02:01 2014
New Revision: 198371
URL: http://llvm.org/viewvc/llvm-project?rev=198371&view=rev
Log:
Removing some more unnecessary manual quotes from attribute diagnostics.
Modified:
cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
cfe/trunk/lib/Sema/SemaDeclAttr.cpp
Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=198371&r1=198370&r2=198371&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Thu Jan 2 17:02:01 2014
@@ -2019,9 +2019,9 @@ def warn_attribute_invalid_on_definition
def err_attribute_weakref_not_static : Error<
"weakref declaration must have internal linkage">;
def err_attribute_weakref_not_global_context : Error<
- "weakref declaration of '%0' must be in a global context">;
+ "weakref declaration of %0 must be in a global context">;
def err_attribute_weakref_without_alias : Error<
- "weakref declaration of '%0' must also have an alias attribute">;
+ "weakref declaration of %0 must also have an alias attribute">;
def err_alias_not_supported_on_darwin : Error <
"only weak aliases are supported on darwin">;
def err_alias_to_undefined : Error<
Modified: cfe/trunk/lib/Sema/SemaDeclAttr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclAttr.cpp?rev=198371&r1=198370&r2=198371&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclAttr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclAttr.cpp Thu Jan 2 17:02:01 2014
@@ -1369,8 +1369,8 @@ static void handleWeakRefAttr(Sema &S, D
// we reject them
const DeclContext *Ctx = D->getDeclContext()->getRedeclContext();
if (!Ctx->isFileContext()) {
- S.Diag(Attr.getLoc(), diag::err_attribute_weakref_not_global_context) <<
- nd->getNameAsString();
+ S.Diag(Attr.getLoc(), diag::err_attribute_weakref_not_global_context)
+ << nd;
return;
}
@@ -4127,8 +4127,8 @@ void Sema::ProcessDeclAttributeList(Scop
// static int a9 __attribute__((weakref));
// but that looks really pointless. We reject it.
if (D->hasAttr<WeakRefAttr>() && !D->hasAttr<AliasAttr>()) {
- Diag(AttrList->getLoc(), diag::err_attribute_weakref_without_alias) <<
- cast<NamedDecl>(D)->getNameAsString();
+ Diag(AttrList->getLoc(), diag::err_attribute_weakref_without_alias)
+ << cast<NamedDecl>(D);
D->dropAttr<WeakRefAttr>();
return;
}
More information about the cfe-commits
mailing list