format tidy

This commit is contained in:
angie 2022-12-19 15:12:12 -03:00
parent ef2acdb328
commit 8a9824bbd3
8 changed files with 9 additions and 9 deletions

View File

@ -1,4 +1,4 @@
Checks: 'readability-*,-readability-magic-numbers,clang-diagnostic-*,clang-analyzer-*,-clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling,bugprone*,-bugprone-branch-clone,modernize*,performance*,portability*,diagnostic-*,analyzer-*,misc*,-misc-no-recursion'
Checks: 'readability-*,-readability-magic-numbers,clang-diagnostic-*,clang-analyzer-*,-clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling,-clang-analyzer-optin.performance.Padding,bugprone*,-bugprone-branch-clone,modernize*,performance*,portability*,diagnostic-*,analyzer-*,misc*,-misc-no-recursion'
WarningsAsErrors: ''
HeaderFilterRegex: '(src|include)\/.*\.h$'
FormatStyle: 'file'

View File

@ -117,7 +117,7 @@ format:
clang-format-11 -i -style=file $(CXX_FILES)
tidy:
clang-tidy-11 -p . --fix --fix-errors $(C_FILES) $(H_FILES) -- $(CSTD) $(OPTFLAGS) $(IINC) $(WARNINGS) $(WARNINGS_C) $(CFLAGS)
clang-tidy-11 -p . --fix --fix-errors $(C_FILES) -- $(CSTD) $(OPTFLAGS) $(IINC) $(WARNINGS) $(WARNINGS_C) $(CFLAGS)
tests: $(TESTS_ELFS)

View File

@ -30,6 +30,7 @@ class OperandType:
cpu_immediate: Enum
cpu_branch_target_label: Enum
cpu_immediate_base: Enum
cpu_maybe_rd_rs: Enum
rsp_rs: Enum
rsp_rt: Enum
@ -46,6 +47,7 @@ class OperandType:
rsp_vs_index: Enum
rsp_offset_rs: Enum
rsp_immediate_base: Enum
rsp_maybe_rd_rs: Enum
r5900_I: Enum
r5900_Q: Enum

View File

@ -76,7 +76,7 @@ bool RabbitizerInstrDescriptor_hasOperandAlias(const RabbitizerInstrDescriptor *
case RAB_OPERAND_cpu_sa:
case RAB_OPERAND_cpu_zero:
// case RAB_OPERAND_cpu_function:
// case RAB_OPERAND_cpu_function:
break;
case RAB_OPERAND_cpu_cop0d:
@ -478,7 +478,6 @@ bool RabbitizerInstrDescriptor_hasOperandAlias(const RabbitizerInstrDescriptor *
return RabbitizerInstrDescriptor_hasSpecificOperand(self, operand);
}
bool RabbitizerInstrDescriptor_isUnknownType(const RabbitizerInstrDescriptor *self) {
return self->instrType == RABBITIZER_INSTR_TYPE_UNKNOWN;
}

View File

@ -15,7 +15,7 @@ bool RabbitizerInstrId_isValid(RabbitizerInstrId uniqueId) {
case RABBITIZER_INSTR_ID_cpu_MAX:
case RABBITIZER_INSTR_ID_rsp_MAX:
case RABBITIZER_INSTR_ID_r5900_MAX:
// case RABBITIZER_INSTR_ID_ALL_MAX: Same as last MAX
// case RABBITIZER_INSTR_ID_ALL_MAX: Same as last MAX
return false;
default:

View File

@ -9,7 +9,6 @@
#include "common/RabbitizerConfig.h"
size_t RabbitizerInstruction_getSizeForBufferInstrDisasm(const RabbitizerInstruction *self, size_t immOverrideLength, int extraLJust) {
size_t totalSize = 0;
size_t opcodeNameLength;

View File

@ -117,7 +117,7 @@ const char *RabbitizerInstruction_mapInstrToType(const RabbitizerInstruction *se
}
bool RabbitizerInstruction_sameOpcode(const RabbitizerInstruction *self, const RabbitizerInstruction *other) {
if (!RabbitizerInstrId_isValid(self->uniqueId) || !RabbitizerInstrId_isValid(self->uniqueId)) {
if (!RabbitizerInstrId_isValid(self->uniqueId) || !RabbitizerInstrId_isValid(other->uniqueId)) {
return false;
}
return self->uniqueId == other->uniqueId;

View File

@ -7,7 +7,6 @@
#include "instrOpercandCallbacks_array.table.h"
size_t RabbitizerOperandType_getBufferSize(RabbitizerOperandType operand, const RabbitizerInstruction *instr, size_t immOverrideLength) {
char auxBuffer[0x100] = { 0 };
char immOverride[0x100] = { 0 };
@ -36,7 +35,8 @@ size_t RabbitizerInstruction_getSizeForBufferOperandsDisasm(const RabbitizerInst
return totalSize;
}
size_t RabbitizerOperandType_disassemble(RabbitizerOperandType operand, const RabbitizerInstruction *instr, char *dst, const char *immOverride, size_t immOverrideLength) {
size_t RabbitizerOperandType_disassemble(RabbitizerOperandType operand, const RabbitizerInstruction *instr, char *dst, const char *immOverride,
size_t immOverrideLength) {
OperandCallback callback;
assert(operand > RAB_OPERAND_ALL_INVALID);