If a macro is used in the expansion of another macro, that can cause
a compile error if the macro is replaced with an enum. Token-pasting is
an example where converting a macro defined as an integral constant can
cause code to no longer compile.
This change causes such macros to be skipped from the conversion
process in order to prevent fixits from creating code that no longer
compiles.
A subsequent enhancement will examine macro usage in more detail to
allow more cases to be handled without breaking code.
Fixes #54948
ArrayRef is intended to be cheap in the same way as StringRef, so we don't pass const references for it.