[clang] [clang-format] Add an option to format integer and float literal case (PR #151590)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 25 23:10:06 PDT 2025
================
@@ -3558,6 +3558,74 @@ struct FormatStyle {
/// \version 9
std::vector<std::string> NamespaceMacros;
+ /// Control over each component in a numeric literal.
+ enum NumericLiteralComponentStyle : int8_t {
+ /// Leave this component of the literal as is.
+ NLCS_Leave,
+ /// Format this component with upper case characters.
+ NLCS_Upper,
+ /// Format this component with lower case characters.
+ NLCS_Lower,
+ };
+
+ /// Separate control for each numeric literal component.
----------------
owenca wrote:
Can you add an example config below using https://github.com/llvm/llvm-project/pull/151590#issuecomment-3148783502? See https://github.com/llvm/llvm-project/blob/7d35e29d7a7f89c828e91c03d3827a43deaa5dec/clang/include/clang/Format/Format.h#L3109-L3117.
https://github.com/llvm/llvm-project/pull/151590
More information about the cfe-commits
mailing list