C++23 P0330

Hello,

I was inspired by a recent tweet that said the C++23 feature of adding size_t suffixes was checked into gcc. I have never worked on the clang code base, much less tried to implement a feature, but I figured since the scope of this feature was relatively small, it might be a good place to start.

Attached is my initial patch.

I am looking for some guidance as to what kind of unit tests and other considerations would be required before this patch could be accepted.

Any feedback would be greatly appreciated.

Thank you!

P0330.diff (1.23 KB)

Clang tests generally go in clang/test/<directories matching the
library/header directories> - usually the way I go about finding if
there's a related test to add more functionality to, is by breaking
something nearby that works, and seeing which tests fail. (make
check-clang)

Hello,

I was inspired by a recent tweet that said the C++23 feature of adding size_t suffixes was checked into gcc. I have never worked on the clang code base, much less tried to implement a feature, but I figured since the scope of this feature was relatively small, it might be a good place to start.

Attached is my initial patch.

I am looking for some guidance as to what kind of unit tests and other considerations would be required before this patch could be accepted.

Any feedback would be greatly appreciated.

‘size_t’ isn’t necessarily ‘unsigned long’; I think we’ll need a flag separate from ‘isLong’ to track whether ‘z’ was present.