Run clang-format on everything (#1332)

This commit is contained in:
Sylvie
2024-03-04 14:22:49 -05:00
committed by GitHub
parent b004648a13
commit e74073e480
66 changed files with 6091 additions and 4957 deletions

View File

@@ -31,10 +31,11 @@ extern bool isWRAM0Mode;
extern bool disablePadding;
// Helper macro for printing verbose-mode messages
#define verbosePrint(...) do { \
if (beVerbose) \
fprintf(stderr, __VA_ARGS__); \
} while (0)
#define verbosePrint(...) \
do { \
if (beVerbose) \
fprintf(stderr, __VA_ARGS__); \
} while (0)
struct FileStackNode {
FileStackNode *parent;
@@ -43,10 +44,11 @@ struct FileStackNode {
enum FileStackNodeType type;
std::variant<
std::monostate, // Default constructed; `.type` and `.data` must be set manually
std::vector<uint32_t>, // NODE_REPT
std::string // NODE_FILE, NODE_MACRO
> data;
std::monostate, // Default constructed; `.type` and `.data` must be set manually
std::vector<uint32_t>, // NODE_REPT
std::string // NODE_FILE, NODE_MACRO
>
data;
// REPT iteration counts since last named node, in reverse depth order
std::vector<uint32_t> &iters();
@@ -58,8 +60,10 @@ struct FileStackNode {
std::string const *dumpFileStack() const;
};
void warning(FileStackNode const *where, uint32_t lineNo, char const *fmt, ...) format_(printf, 3, 4);
void warning(FileStackNode const *where, uint32_t lineNo, char const *fmt, ...)
format_(printf, 3, 4);
void error(FileStackNode const *where, uint32_t lineNo, char const *fmt, ...) format_(printf, 3, 4);
[[noreturn]] void fatal(FileStackNode const *where, uint32_t lineNo, char const *fmt, ...) format_(printf, 3, 4);
[[noreturn]] void fatal(FileStackNode const *where, uint32_t lineNo, char const *fmt, ...)
format_(printf, 3, 4);
#endif // RGBDS_LINK_MAIN_H

View File

@@ -8,10 +8,10 @@
#include <stdint.h>
#include <vector>
#include "link/section.hpp"
#include "linkdefs.hpp"
#include "link/section.hpp"
struct Assertion {
Patch patch; // Also used for its `.type`
std::string message;

View File

@@ -10,10 +10,10 @@
#include <string>
#include <vector>
#include "link/main.hpp"
#include "linkdefs.hpp"
#include "link/main.hpp"
struct FileStackNode;
struct Section;
struct Symbol;

View File

@@ -30,9 +30,10 @@ struct Symbol {
FileStackNode const *src;
int32_t lineNo;
std::variant<
int32_t, // Constants just have a numeric value
Label // Label values refer to an offset within a specific section
> data;
int32_t, // Constants just have a numeric value
Label // Label values refer to an offset within a specific section
>
data;
Label &label();
Label const &label() const;