[clang-tools-extra] [clang] [clang][NFC] Refactor `CXXNewExpr::InitializationStyle` (re-land) (PR #71417)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 18 06:27:18 PST 2024
tomasz-kaminski-sonarsource wrote:
And what will the desired use of having the distinction `Implicit` vs `NoInit` in its current form?
The current differentiates between the allocation object of class `Trivial` and `int[2]` where there, actually there is none in the emitted code. And proper analysis of the initializer is needed anyway.
I would be very supportive of updating the names, so we replace `Call` with `ParenList` and `List` with `BraceList` as that will reduce the confusion. This is regardless of the effort that is required on downstream.
But this PR added a new enum that is equivalent to `getInit() != nullptr`, that I see no use of. If that would be a separate method, that would check if the new performs non-trivial initialization of the object in the allocated memory, it would be also very welcomed and usefull.
https://github.com/llvm/llvm-project/pull/71417
More information about the cfe-commits
mailing list