[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.
This commit is contained in:
Vlad Serebrennikov
2023-11-07 22:24:32 +03:00
parent 03a92f0eca
commit fb8ff4cdae

View File

@@ -2443,6 +2443,11 @@ ExprResult Sema::BuildCXXNew(SourceRange Range, bool UseGlobal,
FullInit = Binder->getSubExpr();
Initializer = FullInit.get();
// We don't know that we're generating an implicit initializer until now, so
// we have to update the initialization style as well.
//
// FIXME: it would be nice to determine the correct initialization style
// earlier so InitStyle doesn't need adjusting.
if (InitStyle == CXXNewInitializationStyle::None && Initializer) {
InitStyle = CXXNewInitializationStyle::Implicit;
}