Well, after this PR is pulled! https://github.com/dlang/dmd/pull/14151 It's working with cpp, cl, and sppn. Of course, the only pattern it currently detects is the simplest: #define XYZ 1 becomes: enum XYZ = 1;