diff options
author | Chris Lattner <sabre@nondot.org> | 2008-11-19 05:27:50 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-11-19 05:27:50 +0000 |
commit | f490e15729331cd99dcc470754a3ce2fa534415c (patch) | |
tree | ed0168bea34bc358b90ef99df76e97845f65b66d /clang/lib/Sema/SemaExprCXX.cpp | |
parent | 3b05413e9dc471ea4f809b7ff26e0d8e0f068b23 (diff) | |
download | bcm5719-llvm-f490e15729331cd99dcc470754a3ce2fa534415c.tar.gz bcm5719-llvm-f490e15729331cd99dcc470754a3ce2fa534415c.zip |
remove one more old-style Diag method.
llvm-svn: 59589
Diffstat (limited to 'clang/lib/Sema/SemaExprCXX.cpp')
-rw-r--r-- | clang/lib/Sema/SemaExprCXX.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/clang/lib/Sema/SemaExprCXX.cpp b/clang/lib/Sema/SemaExprCXX.cpp index 5864f222df1..94fca007792 100644 --- a/clang/lib/Sema/SemaExprCXX.cpp +++ b/clang/lib/Sema/SemaExprCXX.cpp @@ -156,8 +156,8 @@ Sema::ActOnCXXTypeConstructExpr(SourceRange TypeRange, TypeTy *TypeRep, // be a class with a suitably declared constructor. // if (NumExprs > 1) - return Diag(CommaLocs[0], diag::err_builtin_func_cast_more_than_one_arg, - FullRange); + return Diag(CommaLocs[0], diag::err_builtin_func_cast_more_than_one_arg) + << FullRange; assert(NumExprs == 0 && "Expected 0 expressions"); @@ -167,10 +167,10 @@ Sema::ActOnCXXTypeConstructExpr(SourceRange TypeRange, TypeTy *TypeRep, // rvalue of the specified type, which is value-initialized. // if (Ty->isArrayType()) - return Diag(TyBeginLoc, diag::err_value_init_for_array_type, FullRange); + return Diag(TyBeginLoc, diag::err_value_init_for_array_type) << FullRange; if (Ty->isIncompleteType() && !Ty->isVoidType()) - return Diag(TyBeginLoc, diag::err_invalid_incomplete_type_use, - Ty.getAsString(), FullRange); + return Diag(TyBeginLoc, diag::err_invalid_incomplete_type_use) + << Ty.getAsString() << FullRange; return new CXXZeroInitValueExpr(Ty, TyBeginLoc, RParenLoc); } @@ -199,11 +199,11 @@ Sema::ActOnCXXConditionDeclarationExpr(Scope *S, SourceLocation StartLoc, if (Ty->isFunctionType()) { // The declarator shall not specify a function... // We exit without creating a CXXConditionDeclExpr because a FunctionDecl // would be created and CXXConditionDeclExpr wants a VarDecl. - return Diag(StartLoc, diag::err_invalid_use_of_function_type, - SourceRange(StartLoc, EqualLoc)); + return Diag(StartLoc, diag::err_invalid_use_of_function_type) + << SourceRange(StartLoc, EqualLoc); } else if (Ty->isArrayType()) { // ...or an array. - Diag(StartLoc, diag::err_invalid_use_of_array_type, - SourceRange(StartLoc, EqualLoc)); + Diag(StartLoc, diag::err_invalid_use_of_array_type) + << SourceRange(StartLoc, EqualLoc); } else if (const RecordType *RT = Ty->getAsRecordType()) { RecordDecl *RD = RT->getDecl(); // The type-specifier-seq shall not declare a new class... |