mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
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:
parent
0c05566e58
commit
4359e3a6bc
|
@ -1,20 +1,21 @@
|
|||
---
|
||||
exclude:
|
||||
- "**/*.api.h"
|
||||
# shfmt doesn't support this file
|
||||
# shfmt doesn't support this file
|
||||
- "other/analysis/run-clang-tidy"
|
||||
|
||||
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
|
||||
|
|
|
@ -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"],
|
||||
)
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
struct Fuzz_Data {
|
||||
static constexpr bool DEBUG = false;
|
||||
static constexpr std::size_t TRACE_TRAP = -1; // 579;
|
||||
static constexpr std::size_t TRACE_TRAP = -1; // 579;
|
||||
|
||||
private:
|
||||
const uint8_t *data_;
|
||||
|
@ -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);
|
||||
}
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
#include "../../toxcore/tox.h"
|
||||
#include "../../toxcore/tox_private.h"
|
||||
#include "fuzz_support.h"
|
||||
#include "fuzz_support.hh"
|
||||
|
||||
namespace {
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include <cstring>
|
||||
#include <vector>
|
||||
|
||||
#include "../testing/fuzzing/fuzz_support.h"
|
||||
#include "../testing/fuzzing/fuzz_support.hh"
|
||||
|
||||
namespace {
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue
Block a user