[clang] Update IntegerLiteralSeparatorFixer.cpp (PR #181213)

John Mitchell via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 16 07:10:03 PST 2026


================
@@ -50,6 +50,9 @@ IntegerLiteralSeparatorFixer::process(const Environment &Env,
   case FormatStyle::LK_JavaScript:
     Separator = '_';
     break;
+  case FormatStyle::LK_C:
----------------
fauxprogrammer wrote:

Not opposed to your suggestion, however, the default for IntegerLiteralSeparator.Binary is 0 (leave literal as is).  Unless a person specifically sets IntegerLiteralSeparator to a non-zero value and has the language set to C there wouldn't be any impact.  In my mind the onus should be on the developer to ensure only formatting options are enabled if the compiler can support the end result.

But going back to your suggestion you are proposing that the 'LanguageStandard' enum be extended with LS_C23, not an entire new standard enum be created, correct?  Happy to do so if you feel that's the best way.

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


More information about the cfe-commits mailing list