Skip to content

Commit ad15dc4

Browse files
authored
Don't handle ArraySize/AllocType early.
1 parent 45a7af7 commit ad15dc4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

clang/lib/Sema/SemaExprCXX.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2174,7 +2174,8 @@ ExprResult Sema::BuildCXXNew(SourceRange Range, bool UseGlobal,
21742174

21752175
// Per C++0x [expr.new]p5, the type being constructed may be a
21762176
// typedef of an array type.
2177-
if (!ArraySize) {
2177+
// Dependent case will be handled separately.
2178+
if (!ArraySize && !AllocType->isDependentType()) {
21782179
if (const ConstantArrayType *Array
21792180
= Context.getAsConstantArrayType(AllocType)) {
21802181
ArraySize = IntegerLiteral::Create(Context, Array->getSize(),

0 commit comments

Comments
 (0)