aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaType.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-11-20 06:38:18 +0000
committerChris Lattner <sabre@nondot.org>2008-11-20 06:38:18 +0000
commitf3a41af4d5c98a72a1d6720bbbfd658e57ef2541 (patch)
tree5823148d0d979d990d06938aa79f08c342d02ca8 /lib/Sema/SemaType.cpp
parent5dc266abe0e8de69788ba67e38047a919f4bc383 (diff)
remove the last old-fashioned Diag method. Transition complete!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59714 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaType.cpp')
-rw-r--r--lib/Sema/SemaType.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/Sema/SemaType.cpp b/lib/Sema/SemaType.cpp
index 8c46fab586..a622c8afb8 100644
--- a/lib/Sema/SemaType.cpp
+++ b/lib/Sema/SemaType.cpp
@@ -46,14 +46,14 @@ QualType Sema::ConvertDeclSpecToType(const DeclSpec &DS) {
if (DS.getTypeSpecSign() == DeclSpec::TSS_unspecified)
Result = Context.WCharTy;
else if (DS.getTypeSpecSign() == DeclSpec::TSS_signed) {
- Diag(DS.getTypeSpecSignLoc(), diag::ext_invalid_sign_spec,
- DS.getSpecifierName(DS.getTypeSpecType()));
+ Diag(DS.getTypeSpecSignLoc(), diag::ext_invalid_sign_spec)
+ << DS.getSpecifierName(DS.getTypeSpecType());
Result = Context.getSignedWCharType();
} else {
assert(DS.getTypeSpecSign() == DeclSpec::TSS_unsigned &&
"Unknown TSS value");
- Diag(DS.getTypeSpecSignLoc(), diag::ext_invalid_sign_spec,
- DS.getSpecifierName(DS.getTypeSpecType()));
+ Diag(DS.getTypeSpecSignLoc(), diag::ext_invalid_sign_spec)
+ << DS.getSpecifierName(DS.getTypeSpecType());
Result = Context.getUnsignedWCharType();
}
break;
@@ -430,8 +430,8 @@ QualType Sema::GetTypeForDeclarator(Declarator &D, Scope *S) {
// C99 6.7.5.3p1: The return type may not be a function or array type.
if (T->isArrayType() || T->isFunctionType()) {
- Diag(DeclType.Loc, diag::err_func_returning_array_function,
- T.getAsString());
+ Diag(DeclType.Loc, diag::err_func_returning_array_function)
+ << T.getAsString();
T = Context.IntTy;
D.setInvalidType(true);
}
@@ -654,8 +654,7 @@ static void HandleAddressSpaceTypeAttribute(QualType &Type,
// Check the attribute arguments.
if (Attr.getNumArgs() != 1) {
- S.Diag(Attr.getLoc(), diag::err_attribute_wrong_number_arguments,
- std::string("1"));
+ S.Diag(Attr.getLoc(), diag::err_attribute_wrong_number_arguments) << 1;
return;
}
Expr *ASArgExpr = static_cast<Expr *>(Attr.getArg(0));