Skip to content

Commit fb8ff4c

Browse files
committed
[clang][NFC] Add a missing comment to #71322 changes
It was an unfortunate oversight from my side to forget to include this comment into the PR.
1 parent 03a92f0 commit fb8ff4c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

clang/lib/Sema/SemaExprCXX.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -2443,6 +2443,11 @@ ExprResult Sema::BuildCXXNew(SourceRange Range, bool UseGlobal,
24432443
FullInit = Binder->getSubExpr();
24442444

24452445
Initializer = FullInit.get();
2446+
// We don't know that we're generating an implicit initializer until now, so
2447+
// we have to update the initialization style as well.
2448+
//
2449+
// FIXME: it would be nice to determine the correct initialization style
2450+
// earlier so InitStyle doesn't need adjusting.
24462451
if (InitStyle == CXXNewInitializationStyle::None && Initializer) {
24472452
InitStyle = CXXNewInitializationStyle::Implicit;
24482453
}

0 commit comments

Comments
 (0)