clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we
need to reformat the code with the latest version. The way clang-18
handles lambda formatting also changed, so we have made changes to the
organization default style format to better handle lambda formatting.
See I5e08687e696dd240402a2780158664b7113def0e for updated style.
See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement.
Change-Id: I21d2ca8065f24fd73509229c517f5caf48934b60
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/extensions/openpower-pels/repository.cpp b/extensions/openpower-pels/repository.cpp
index 70738b0..a5a0b8c 100644
--- a/extensions/openpower-pels/repository.cpp
+++ b/extensions/openpower-pels/repository.cpp
@@ -60,9 +60,8 @@
Repository::Repository(const std::filesystem::path& basePath, size_t repoSize,
size_t maxNumPELs) :
- _logPath(basePath / "logs"),
- _maxRepoSize(repoSize), _maxNumPELs(maxNumPELs),
- _archivePath(basePath / "logs" / "archive")
+ _logPath(basePath / "logs"), _maxRepoSize(repoSize),
+ _maxNumPELs(maxNumPELs), _archivePath(basePath / "logs" / "archive")
{
if (!fs::exists(_logPath))
{
@@ -495,8 +494,8 @@
bool Repository::isServiceableSev(const PELAttributes& pel)
{
auto sevType = static_cast<SeverityType>(pel.severity & 0xF0);
- auto sevPVEntry = pel_values::findByValue(pel.severity,
- pel_values::severityValues);
+ auto sevPVEntry =
+ pel_values::findByValue(pel.severity, pel_values::severityValues);
std::string sevName = std::get<pel_values::registryNamePos>(*sevPVEntry);
bool check1 = (sevType == SeverityType::predictive) ||
@@ -593,18 +592,19 @@
{
std::vector<Repository::AttributesReference> attributes;
- std::for_each(
- _pelAttributes.begin(), _pelAttributes.end(),
- [&attributes](auto& pelEntry) { attributes.push_back(pelEntry); });
+ std::for_each(_pelAttributes.begin(), _pelAttributes.end(),
+ [&attributes](auto& pelEntry) {
+ attributes.push_back(pelEntry);
+ });
std::sort(attributes.begin(), attributes.end(),
[order](const auto& left, const auto& right) {
- if (order == SortOrder::ascending)
- {
- return left.get().second.path < right.get().second.path;
- }
- return left.get().second.path > right.get().second.path;
- });
+ if (order == SortOrder::ascending)
+ {
+ return left.get().second.path < right.get().second.path;
+ }
+ return left.get().second.path > right.get().second.path;
+ });
return attributes;
}
@@ -721,16 +721,16 @@
// Pass 4: delete all PELs
static const std::vector<std::function<bool(const PELAttributes& pel)>>
stateChecks{[](const auto& pel) {
- return pel.hmcState == TransmissionState::acked;
- },
+ return pel.hmcState == TransmissionState::acked;
+ },
[](const auto& pel) {
- return pel.hostState == TransmissionState::acked;
- },
+ return pel.hostState == TransmissionState::acked;
+ },
[](const auto& pel) {
- return pel.hostState == TransmissionState::sent;
- },
+ return pel.hostState == TransmissionState::sent;
+ },
[](const auto& /*pel*/) { return true; }};