================
@@ -2454,13 +2455,19 @@ ExprResult Sema::BuildCXXNew(SourceRange Range, bool
UseGlobal,
SourceRange AllocationParameterRange = Range;
if (PlacementLParen.isValid() && PlacementRParen.isValid())
AllocationParameterRange = SourceRange(PlacementLParen, PlacementRParen);
- if (!AllocType->isDependentType() &&
- !Expr::hasAnyTypeDependentArguments(PlacementArgs) &&
- FindAllocationFunctions(StartLoc, AllocationParameterRange, Scope, Scope,
- AllocType, ArraySize.has_value(), IAP,
- PlacementArgs, OperatorNew, OperatorDelete))
- return ExprError();
+ if (!AllocType->isDependentType() &&
+ !Expr::hasAnyTypeDependentArguments(PlacementArgs)) {
+ auto FoundAllocation = FindAllocationFunctions(
+ StartLoc, AllocationParameterRange, Scope, Scope, AllocType,
+ ArraySize.has_value(), IAP, PlacementArgs);
----------------
cor3ntin wrote:
```suggestion
/*IsArray=*/ ArraySize.has_value(), IAP, PlacementArgs);
```
https://github.com/llvm/llvm-project/pull/211482
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits