Skip to content

Commit

Permalink
Merge pull request #181 from chaoticgd/small
Browse files Browse the repository at this point in the history
Make a few small corrections to formatting and fix some typos
  • Loading branch information
chaoticgd authored Feb 20, 2024
2 parents 4062a7b + 69d2a72 commit 4d01035
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/ccc/mdebug_section.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,8 @@ Result<void> SymbolTableReader::print_symbols(FILE* out, bool print_locals, bool
return Result<void>();
}

static void print_symbol(FILE* out, const Symbol& symbol) {
static void print_symbol(FILE* out, const Symbol& symbol)
{
fprintf(out, " %8x ", symbol.value);

const char* symbol_type_str = symbol_type(symbol.symbol_type);
Expand Down
4 changes: 2 additions & 2 deletions src/ccc/stabs_to_ast.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,7 @@ static MemberFunctionInfo check_member_function(
}

bool is_constructor =
info.name == "__ct" || // Takes a parameter to decide whether or not construct virtual base classes.
info.name == "__ct" || // Takes a parameter to decide whether or not to construct virtual base classes.
info.name == "__comp_ctor" || // Constructs virtual base classes.
info.name == "__base_ctor"; // Does not construct virtual base classes.

Expand All @@ -740,7 +740,7 @@ static MemberFunctionInfo check_member_function(
}

bool is_destructor =
info.name == "__dt" || // Takes parameters to decide to construct virtual base classes and/or delete the object.
info.name == "__dt" || // Takes parameters to decide whether or not to construct virtual base classes and/or delete the object.
info.name == "__comp_dtor" || // Destructs virtual base classes.
info.name == "__base_dtor" || // Does not construct virtual base classes.
info.name == "__deleting_dtor"; // Destructs virtual base clases then deletes the entire object.
Expand Down
3 changes: 2 additions & 1 deletion src/ccc/symbol_database.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,8 @@ CCC_FOR_EACH_SYMBOL_TYPE_DO_X
Symbol::Symbol() {}
Symbol::~Symbol() {}

void Symbol::set_type(std::unique_ptr<ast::Node> type) {
void Symbol::set_type(std::unique_ptr<ast::Node> type)
{
m_type = std::move(type);
invalidate_node_handles();
}
Expand Down

0 comments on commit 4d01035

Please sign in to comment.