[clang-tools-extra] [clang] [clang][NFC] Refactor `CXXNewExpr::InitializationStyle` (re-land) (PR #71417)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 19 10:43:40 PST 2024


AaronBallman wrote:

I had an offline discussion with @Endilll during my morning office hours today, and our current plan is:

1) Remove `Implicit` from the enumeration, rename `Call` and `List` to `ParenList` and `BraceList`, respectively
2) Add a new bit to the bit-field for `CXXNewExpr` to track "has an initializer" instead of encoding it as in-band information in the initialization style.
3) Use that new bit internally in `CXXNewExpr`, update serialization and whatnot accordingly.

This should bring us back to the enumeration mapping directly to syntax but removes the strange in-band nature of how the original enumeration was being used.

https://github.com/llvm/llvm-project/pull/71417


More information about the cfe-commits mailing list