summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaExprCXX.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Sema/SemaExprCXX.cpp')
-rw-r--r--clang/lib/Sema/SemaExprCXX.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/clang/lib/Sema/SemaExprCXX.cpp b/clang/lib/Sema/SemaExprCXX.cpp
index a8eb2cbc7e6..22d01ec0c80 100644
--- a/clang/lib/Sema/SemaExprCXX.cpp
+++ b/clang/lib/Sema/SemaExprCXX.cpp
@@ -272,7 +272,8 @@ Sema::ActOnCXXTypeConstructExpr(SourceRange TypeRange, TypeTy *TypeRep,
diag::err_value_init_for_array_type) << FullRange);
if (!Ty->isDependentType() && !Ty->isVoidType() &&
RequireCompleteType(TyBeginLoc, Ty,
- diag::err_invalid_incomplete_type_use, FullRange))
+ PDiag(diag::err_invalid_incomplete_type_use)
+ << FullRange))
return ExprError();
if (RequireNonAbstractType(TyBeginLoc, Ty,
@@ -486,8 +487,8 @@ bool Sema::CheckAllocatedType(QualType AllocType, SourceLocation Loc,
<< AllocType << 1 << R;
else if (!AllocType->isDependentType() &&
RequireCompleteType(Loc, AllocType,
- diag::err_new_incomplete_type,
- R))
+ PDiag(diag::err_new_incomplete_type)
+ << R))
return true;
else if (RequireNonAbstractType(Loc, AllocType,
diag::err_allocation_of_abstract_type))
@@ -727,8 +728,8 @@ Sema::ActOnCXXDelete(SourceLocation StartLoc, bool UseGlobal,
<< Type << Ex->getSourceRange());
else if (!Pointee->isDependentType() &&
RequireCompleteType(StartLoc, Pointee,
- diag::warn_delete_incomplete,
- Ex->getSourceRange()))
+ PDiag(diag::warn_delete_incomplete)
+ << Ex->getSourceRange()))
return ExprError();
// FIXME: This should be shared with the code for finding the delete
OpenPOWER on IntegriCloud