Revise C++ coding style using clang-format with "east const"

Run the `clang-format.bash` script to update all our C and C++ code to a
new style defined by `.clang-format`, now with "east const" enforcement.
Use `clang-format` version 18.

* If you reached this commit for a line in `git blame`, re-run the blame
  operation starting at the parent of this commit to see older history
  for the content.

* See the parent commit for instructions to rebase a change across this
  style transition commit.

Issue: #26123
This commit is contained in:
Kitware Robot
2025-01-23 11:54:40 -05:00
committed by Brad King
parent 6ef947ea97
commit 0b96ae1f6a
887 changed files with 9690 additions and 9692 deletions
+8 -8
View File
@@ -22,7 +22,7 @@
namespace {
std::string EscapeArg(const std::string& arg)
std::string EscapeArg(std::string const& arg)
{
// replace ";" with "\;" so output argument lists will split correctly
std::string escapedArg;
@@ -73,17 +73,17 @@ struct UserArgumentParser : public cmArgumentParser<void>
} // namespace
static void PassParsedArguments(
const std::string& prefix, cmMakefile& makefile, const options_map& options,
const single_map& singleValArgs, const multi_map& multiValArgs,
const std::vector<std::string>& unparsed, const options_set& keywordsSeen,
const options_set& keywordsMissingValues, bool parseFromArgV)
std::string const& prefix, cmMakefile& makefile, options_map const& options,
single_map const& singleValArgs, multi_map const& multiValArgs,
std::vector<std::string> const& unparsed, options_set const& keywordsSeen,
options_set const& keywordsMissingValues, bool parseFromArgV)
{
for (auto const& iter : options) {
makefile.AddDefinition(cmStrCat(prefix, iter.first),
iter.second ? "TRUE" : "FALSE");
}
const cmPolicies::PolicyStatus cmp0174 =
cmPolicies::PolicyStatus const cmp0174 =
makefile.GetPolicyStatus(cmPolicies::CMP0174);
for (auto const& iter : singleValArgs) {
if (keywordsSeen.find(iter.first) == keywordsSeen.end()) {
@@ -170,7 +170,7 @@ bool cmParseArgumentsCommand(std::vector<std::string> const& args,
argIter++; // move past N
}
// the first argument is the prefix
const std::string prefix = (*argIter++) + "_";
std::string const prefix = (*argIter++) + "_";
UserArgumentParser parser;
@@ -220,7 +220,7 @@ bool cmParseArgumentsCommand(std::vector<std::string> const& args,
return true;
}
for (unsigned long i = argvStart; i < count; ++i) {
const std::string argName{ cmStrCat("ARGV", i) };
std::string const argName{ cmStrCat("ARGV", i) };
cmValue arg = status.GetMakefile().GetDefinition(argName);
if (!arg) {
status.GetMakefile().IssueMessage(