aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-11-19 05:08:23 +0000
committerChris Lattner <sabre@nondot.org>2008-11-19 05:08:23 +0000
commitfa25bbb351f4fdd977f51254119cdfc2b525ce90 (patch)
tree3dc2b468f4dea74285acbed68b61a8da94b9a848 /lib/Sema/SemaDecl.cpp
parent447b69e55e1098d8df46dd99f171bfaace9ff8a0 (diff)
Switch several more Sema Diag methods over. This simplifies the
__builtin_prefetch code to only emit one diagnostic per builtin_prefetch. While this has nothing to do with the rest of the patch, the code seemed like overkill when I was updating it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59588 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r--lib/Sema/SemaDecl.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index 98f4c01e5e..24308f6b4a 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -802,8 +802,8 @@ Sema::ActOnDeclarator(Scope *S, Declarator &D, DeclTy *lastDecl) {
if (!Name) {
if (!D.getInvalidType()) // Reject this if we think it is valid.
Diag(D.getDeclSpec().getSourceRange().getBegin(),
- diag::err_declarator_need_ident,
- D.getDeclSpec().getSourceRange(), D.getSourceRange());
+ diag::err_declarator_need_ident)
+ << D.getDeclSpec().getSourceRange() << D.getSourceRange();
return 0;
}
@@ -846,8 +846,8 @@ Sema::ActOnDeclarator(Scope *S, Declarator &D, DeclTy *lastDecl) {
Diag(L, diag::err_invalid_declarator_in_function, Name.getAsString(),
R);
} else {
- Diag(L, diag::err_invalid_declarator_scope, Name.getAsString(),
- cast<NamedDecl>(DC)->getName(), R);
+ Diag(L, diag::err_invalid_declarator_scope)
+ << Name.getAsString() << cast<NamedDecl>(DC)->getName() << R;
}
}
}