[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 Sep 8 22:08:02 PDT 2025
================
@@ -162,10 +162,10 @@ NumericLiteralCaseFixer::process(const Environment &Env,
continue;
}
- const auto Formatted = format(Text, Style);
+ auto Formatted = format(Text, Style);
if (Formatted != Text) {
- cantFail(Result.add(
- tooling::Replacement(SourceMgr, Location, Length, Formatted)));
+ cantFail(Result.add(tooling::Replacement(SourceMgr, Location, Length,
+ std::move(Formatted))));
----------------
owenca wrote:
I would revert this change and rely on copy elision. See https://github.com/llvm/llvm-project/pull/151590#discussion_r2312272807.
https://github.com/llvm/llvm-project/pull/151590
More information about the cfe-commits
mailing list