[clang] [clang-format] Add an option to format integer and float literal case (PR #151590)
Björn Schäpers via cfe-commits
cfe-commits at lists.llvm.org
Sun Aug 3 01:58:18 PDT 2025
================
@@ -0,0 +1,347 @@
+//===--- NumericLiteralCaseFixer.cpp -----------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+///
+/// \file
+/// This file implements NumericLiteralCaseFixer that standardizes character
+/// case within numeric literal constants.
+///
+//===----------------------------------------------------------------------===//
+
+#include "NumericLiteralCaseFixer.h"
+
+#include "llvm/ADT/StringExtras.h"
+
+#include <algorithm>
+
+namespace clang {
+namespace format {
+
+using CharTransformFn = char (*)(char C);
+namespace {
+
+/// @brief Collection of std::transform predicates for each part of a numeric
+/// literal
----------------
HazardyKnusperkeks wrote:
```suggestion
/// literal.
```
https://github.com/llvm/llvm-project/pull/151590
More information about the cfe-commits
mailing list