chore: Rename C++ headers to .hh suffixes.

This helps formatters and other dump (simple) tools know what's C++ and
what's C.
This commit is contained in:
iphydf 2024-02-01 23:41:53 +00:00
parent 0c05566e58
commit 4359e3a6bc
No known key found for this signature in database
GPG Key ID: 3855DBA2D74403C9
17 changed files with 27 additions and 25 deletions

View File

@ -1,6 +1,5 @@
---
exclude:
- "**/*.api.h"
# shfmt doesn't support this file
- "other/analysis/run-clang-tidy"
@ -8,13 +7,15 @@ restylers:
- astyle:
arguments: ["--options=other/astyle/astylerc"]
include:
- "!**/*.cc"
- "**/*.c"
- "**/*.h"
- autopep8
- black
- clang-format:
image: restyled/restyler-clang-format:13.0.1
include:
- "**/*.cc"
- "**/*.hh"
- prettier-yaml
- reorder-python-imports
- shellharden

View File

@ -4,10 +4,10 @@ load("@rules_fuzzing//fuzzing:cc_defs.bzl", "cc_fuzz_test")
cc_library(
name = "fuzz_support",
srcs = [
"func_conversion.h",
"func_conversion.hh",
"fuzz_support.cc",
],
hdrs = ["fuzz_support.h"],
hdrs = ["fuzz_support.hh"],
visibility = ["//c-toxcore:__subpackages__"],
deps = [
"//c-toxcore/toxcore:crypto_core",
@ -18,7 +18,7 @@ cc_library(
cc_library(
name = "fuzz_tox",
hdrs = ["fuzz_tox.h"],
hdrs = ["fuzz_tox.hh"],
visibility = ["//c-toxcore:__subpackages__"],
deps = [":fuzz_support"],
)

View File

@ -1,5 +1,5 @@
# Override network and random functions
add_library(fuzz_support func_conversion.h fuzz_support.cc fuzz_support.h)
add_library(fuzz_support func_conversion.hh fuzz_support.cc fuzz_support.hh)
set(LIBFUZZER_LINKER_FLAGS)
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")

View File

@ -4,8 +4,8 @@
#include "../../toxcore/tox.h"
#include "../../toxcore/tox_dispatch.h"
#include "../../toxcore/tox_events.h"
#include "fuzz_support.h"
#include "fuzz_tox.h"
#include "fuzz_support.hh"
#include "fuzz_tox.hh"
namespace {

View File

@ -12,8 +12,8 @@
#include "../../toxcore/tox.h"
#include "../../toxcore/tox_dispatch.h"
#include "../../toxcore/tox_events.h"
#include "fuzz_support.h"
#include "fuzz_tox.h"
#include "fuzz_support.hh"
#include "fuzz_tox.hh"
namespace {

View File

@ -2,7 +2,7 @@
* Copyright © 2021-2022 The TokTok team.
*/
#include "fuzz_support.h"
#include "fuzz_support.hh"
#include <arpa/inet.h>
#include <sys/socket.h>
@ -18,7 +18,7 @@
#include "../../toxcore/crypto_core.h"
#include "../../toxcore/network.h"
#include "../../toxcore/tox_private.h"
#include "func_conversion.h"
#include "func_conversion.hh"
// TODO(iphydf): Put this somewhere shared.
struct Network_Addr {

View File

@ -303,7 +303,8 @@ struct Record_System : System {
if (recording_.size() == Fuzz_Data::TRACE_TRAP) {
__asm__("int $3");
}
std::printf("%s: produce@%zu(bool %s)\n", name_, recording_.size(), byte ? "true" : "false");
std::printf(
"%s: produce@%zu(bool %s)\n", name_, recording_.size(), byte ? "true" : "false");
}
recording_.push_back(byte);
}

View File

@ -33,7 +33,7 @@
#include "../../toxcore/tox_private.h"
#include "../../toxcore/tox_struct.h"
#include "../../toxcore/util.h"
#include "fuzz_support.h"
#include "fuzz_support.hh"
namespace {

View File

@ -6,8 +6,8 @@
#include "../../toxcore/tox_dispatch.h"
#include "../../toxcore/tox_events.h"
#include "../../toxcore/tox_private.h"
#include "fuzz_support.h"
#include "fuzz_tox.h"
#include "fuzz_support.hh"
#include "fuzz_tox.hh"
namespace {

View File

@ -4,7 +4,7 @@
#include "../../toxcore/tox.h"
#include "../../toxcore/tox_private.h"
#include "fuzz_support.h"
#include "fuzz_support.hh"
namespace {

View File

@ -5,7 +5,7 @@
#include <cstring>
#include <vector>
#include "../testing/fuzzing/fuzz_support.h"
#include "../testing/fuzzing/fuzz_support.hh"
namespace {

View File

@ -5,8 +5,8 @@
#include <memory>
#include <optional>
#include "../testing/fuzzing/fuzz_support.h"
#include "../testing/fuzzing/fuzz_tox.h"
#include "../testing/fuzzing/fuzz_support.hh"
#include "../testing/fuzzing/fuzz_tox.hh"
namespace {

View File

@ -5,7 +5,7 @@
#include <memory>
#include <vector>
#include "../testing/fuzzing/fuzz_support.h"
#include "../testing/fuzzing/fuzz_support.hh"
#include "mem_test_util.hh"
namespace {

View File

@ -1,6 +1,6 @@
#include "group_moderation.h"
#include "../testing/fuzzing/fuzz_support.h"
#include "../testing/fuzzing/fuzz_support.hh"
#include "mem_test_util.hh"
namespace {

View File

@ -5,7 +5,7 @@
#include <cstring>
#include <vector>
#include "../testing/fuzzing/fuzz_support.h"
#include "../testing/fuzzing/fuzz_support.hh"
#include "tox_dispatch.h"
namespace {