Skip to content

Commit

Permalink
[clang][NFC] Add a missing comment to #71322 changes
Browse files Browse the repository at this point in the history
It was an unfortunate oversight from my side to forget to include this comment into the PR.
  • Loading branch information
Endilll committed Nov 7, 2023
1 parent 03a92f0 commit fb8ff4c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions clang/lib/Sema/SemaExprCXX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit fb8ff4c

Please sign in to comment.