clang-format code with new clang
New clang, new formatting.
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Ib20e9ed59f6d6c22e65d54212a096f15071b77b3
diff --git a/format-code.sh b/format-code.sh
index 1eb2232..4f87080 100755
--- a/format-code.sh
+++ b/format-code.sh
@@ -13,7 +13,7 @@
# Use the provided clang-format, only define a version
# if we don't have one provided already
-export CLANG_FORMAT="${CLANG_FORMAT:-clang-format-11}"
+export CLANG_FORMAT="${CLANG_FORMAT:-clang-format-13}"
# phosphor-mboxd is a fork of mboxbridge, the reference mbox daemon
# implementation. mboxbridge is C written with the style of the Linux kernel.
diff --git a/vpnor/table.cpp b/vpnor/table.cpp
index 89fb934..9d601e3 100644
--- a/vpnor/table.cpp
+++ b/vpnor/table.cpp
@@ -2,8 +2,7 @@
// Copyright (C) 2018 IBM Corp.
#include "config.h"
-extern "C"
-{
+extern "C" {
#include "backend.h"
#include "common.h"
#include "mboxd.h"
@@ -15,10 +14,9 @@
#include <endian.h>
#include <syslog.h>
-#include <phosphor-logging/elog-errors.hpp>
-
#include <algorithm>
#include <fstream>
+#include <phosphor-logging/elog-errors.hpp>
#include <regex>
namespace openpower
diff --git a/vpnor/table.hpp b/vpnor/table.hpp
index d3ccb55..e42e8d8 100644
--- a/vpnor/table.hpp
+++ b/vpnor/table.hpp
@@ -8,8 +8,7 @@
#include <numeric>
#include <vector>
-extern "C"
-{
+extern "C" {
#include "backend.h"
#include "common.h"
#include "vpnor/backend.h"
@@ -266,7 +265,8 @@
{
public:
ReasonedError(const std::string&& what) : _what(what)
- {}
+ {
+ }
const char* what() const noexcept
{
return _what.c_str();
@@ -285,7 +285,8 @@
{
public:
TocEntryError(const std::string&& reason) : ReasonedError(std::move(reason))
- {}
+ {
+ }
};
/** @brief The exception thrown on finding a syntax error in the ToC entry
@@ -298,7 +299,8 @@
public:
MalformedTocEntry(const std::string&& reason) :
TocEntryError(std::move(reason))
- {}
+ {
+ }
};
/** @brief The exception thrown on finding a semantic error in the ToC entry
@@ -311,14 +313,16 @@
public:
InvalidTocEntry(const std::string&& reason) :
TocEntryError(std::move(reason))
- {}
+ {
+ }
};
class UnmappedOffset : public std::exception
{
public:
UnmappedOffset(size_t base, size_t next) : base(base), next(next)
- {}
+ {
+ }
const size_t base;
const size_t next;
@@ -329,7 +333,8 @@
public:
OutOfBoundsOffset(const std::string&& reason) :
ReasonedError(std::move(reason))
- {}
+ {
+ }
};
class UnknownPartition : public ReasonedError
@@ -337,7 +342,8 @@
public:
UnknownPartition(const std::string&& reason) :
ReasonedError(std::move(reason))
- {}
+ {
+ }
};
} // namespace virtual_pnor