ayokunle321 wrote: Hey @erichkeane, I'm back! So I'd thought to generalize a bit with the replacements. I saw one with magic numbers in the switch statement just before the diag call and tried to use an enum select there as well. The variable DiagSelect is one-indexed so the default value in the switch steatment is zero. If I change it to use enum_select (which is zero indexed) I would have to change the default value to -1 instead. My question is that why is DiagSelect one-indexed if it's just gonna be subreacted by 1 later on? Is it just legacy to have defaults as 0? And if so, this case should not be up for replacement?
<img width="688" alt="Screenshot 2025-06-17 at 12 02 07 PM" src="https://github.com/user-attachments/assets/155e1065-1aed-40a2-940c-73600211aaa7" /> https://github.com/llvm/llvm-project/pull/130868 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits