File tree 4 files changed +2
-47
lines changed 4 files changed +2
-47
lines changed Original file line number Diff line number Diff line change @@ -557,7 +557,6 @@ Bug Fixes to C++ Support
557
557
- Fix a crash in requires expression with templated base class member function. Fixes (#GH84020).
558
558
- Fix a crash caused by defined struct in a type alias template when the structure
559
559
has fields with dependent type. Fixes (#GH75221).
560
- - Fix placement new initializes typedef array with correct size. Fixes (#GH41441).
561
560
- Fix the Itanium mangling of lambdas defined in a member of a local class (#GH88906)
562
561
- Fixed a crash when trying to evaluate a user-defined ``static_assert `` message whose ``size() ``
563
562
function returns a large or negative value. Fixes (#GH89407).
Original file line number Diff line number Diff line change @@ -12943,19 +12943,6 @@ TreeTransform<Derived>::TransformCXXNewExpr(CXXNewExpr *E) {
12943
12943
ArraySize = NewArraySize.get();
12944
12944
}
12945
12945
12946
- // Per C++0x [expr.new]p5, the type being constructed may be a
12947
- // typedef of an array type.
12948
- QualType AllocType = AllocTypeInfo->getType();
12949
- if (ArraySize && E->isTypeDependent()) {
12950
- if (const ConstantArrayType *Array =
12951
- SemaRef.Context.getAsConstantArrayType(AllocType)) {
12952
- ArraySize = IntegerLiteral::Create(SemaRef.Context, Array->getSize(),
12953
- SemaRef.Context.getSizeType(),
12954
- E->getBeginLoc());
12955
- AllocType = Array->getElementType();
12956
- }
12957
- }
12958
-
12959
12946
// Transform the placement arguments (if any).
12960
12947
bool ArgumentChanged = false;
12961
12948
SmallVector<Expr*, 8> PlacementArgs;
@@ -13017,6 +13004,7 @@ TreeTransform<Derived>::TransformCXXNewExpr(CXXNewExpr *E) {
13017
13004
return E;
13018
13005
}
13019
13006
13007
+ QualType AllocType = AllocTypeInfo->getType();
13020
13008
if (!ArraySize) {
13021
13009
// If no array size was specified, but the new expression was
13022
13010
// instantiated with an array type (e.g., "new T" where T is
Original file line number Diff line number Diff line change @@ -5097,7 +5097,7 @@ void ASTWriter::WriteSpecialDeclRecords(Sema &SemaRef) {
5097
5097
DeclsToCheckForDeferredDiags.push_back (getDeclID (D));
5098
5098
if (!DeclsToCheckForDeferredDiags.empty ())
5099
5099
Stream.EmitRecord (DECLS_TO_CHECK_FOR_DEFERRED_DIAGS,
5100
- DeclsToCheckForDeferredDiags);
5100
+ DeclsToCheckForDeferredDiags);
5101
5101
5102
5102
// Write the record containing CUDA-specific declaration references.
5103
5103
RecordData CUDASpecialDeclRefs;
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments