Use clang-19

This commit is contained in:
Konstantin Bogdanov
2024-11-20 23:08:47 +01:00
parent 44b4bd38b9
commit b2c81981fb
133 changed files with 276 additions and 228 deletions
+12 -12
View File
@@ -243,7 +243,7 @@ enum class FileChangeType : uint8_t
Type,
};
void writeText(FileChangeType type, WriteBuffer & out)
static void writeText(FileChangeType type, WriteBuffer & out)
{
switch (type)
{
@@ -299,7 +299,7 @@ enum class LineType : uint8_t
Code,
};
void writeText(LineType type, WriteBuffer & out)
static void writeText(LineType type, WriteBuffer & out)
{
switch (type)
{
@@ -429,7 +429,7 @@ using CommitDiff = std::map<std::string /* path */, FileDiff>;
/** Parsing helpers */
void skipUntilWhitespace(ReadBuffer & buf)
static void skipUntilWhitespace(ReadBuffer & buf)
{
while (!buf.eof())
{
@@ -444,7 +444,7 @@ void skipUntilWhitespace(ReadBuffer & buf)
}
}
void skipUntilNextLine(ReadBuffer & buf)
static void skipUntilNextLine(ReadBuffer & buf)
{
while (!buf.eof())
{
@@ -462,7 +462,7 @@ void skipUntilNextLine(ReadBuffer & buf)
}
}
void readStringUntilNextLine(std::string & s, ReadBuffer & buf)
static void readStringUntilNextLine(std::string & s, ReadBuffer & buf)
{
s.clear();
while (!buf.eof())
@@ -680,7 +680,7 @@ using Snapshot = std::map<std::string /* path */, FileBlame>;
* - the author, time and commit of the previous change to every found line (blame).
* And update the snapshot.
*/
void updateSnapshot(Snapshot & snapshot, const Commit & commit, CommitDiff & file_changes)
static void updateSnapshot(Snapshot & snapshot, const Commit & commit, CommitDiff & file_changes)
{
/// Renames and copies.
for (auto & elem : file_changes)
@@ -755,7 +755,7 @@ void updateSnapshot(Snapshot & snapshot, const Commit & commit, CommitDiff & fil
*/
using DiffHashes = std::unordered_set<UInt128>;
UInt128 diffHash(const CommitDiff & file_changes)
static UInt128 diffHash(const CommitDiff & file_changes)
{
SipHash hasher;
@@ -791,7 +791,7 @@ UInt128 diffHash(const CommitDiff & file_changes)
* :100644 100644 828dedf6b5 828dedf6b5 R100 dbms/src/Functions/GeoUtils.h dbms/src/Functions/PolygonUtils.h
* according to the output of 'git show --raw'
*/
void processFileChanges(
static void processFileChanges(
ReadBuffer & in,
const Options & options,
Commit & commit,
@@ -883,7 +883,7 @@ void processFileChanges(
* - we expect some specific format of the diff; but it may actually depend on git config;
* - non-ASCII file names are not processed correctly (they will not be found and will be ignored).
*/
void processDiffs(
static void processDiffs(
ReadBuffer & in,
std::optional<size_t> size_limit,
Commit & commit,
@@ -1055,7 +1055,7 @@ void processDiffs(
/** Process the "git show" result for a single commit. Append the result to tables.
*/
void processCommit(
static void processCommit(
ReadBuffer & in,
const Options & options,
size_t commit_num,
@@ -1123,7 +1123,7 @@ void processCommit(
/** Runs child process and allows to read the result.
* Multiple processes can be run for parallel processing.
*/
auto gitShow(const std::string & hash)
static auto gitShow(const std::string & hash)
{
std::string command = fmt::format(
"git show --raw --pretty='format:%ct%x00%aN%x00%P%x00%s%x00' --patch --unified=0 {}",
@@ -1135,7 +1135,7 @@ auto gitShow(const std::string & hash)
/** Obtain the list of commits and process them.
*/
void processLog(const Options & options)
static void processLog(const Options & options)
{
ResultWriter result;