aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Sema/SemaExprCXX.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaExprCXX.cpp b/lib/Sema/SemaExprCXX.cpp
index 01da9c1c8f..f337a429ca 100644
--- a/lib/Sema/SemaExprCXX.cpp
+++ b/lib/Sema/SemaExprCXX.cpp
@@ -760,7 +760,7 @@ Sema::BuildCXXNew(SourceLocation StartLoc, bool UseGlobal,
ASTOwningVector<&ActionBase::DeleteExpr> ConvertedConstructorArgs(*this);
// Array 'new' can't have any initializers.
- if (NumConsArgs && ArraySize) {
+ if (NumConsArgs && (ResultType->isArrayType() || ArraySize)) {
SourceRange InitRange(ConsArgs[0]->getLocStart(),
ConsArgs[NumConsArgs - 1]->getLocEnd());