Skip to content

Restyle spcomp.#340

Merged
dvander merged 6 commits into
masterfrom
restyle
Jun 10, 2019
Merged

Restyle spcomp.#340
dvander merged 6 commits into
masterfrom
restyle

Conversation

@dvander
Copy link
Copy Markdown
Member

@dvander dvander commented Jun 8, 2019

This restyles include/.h and compiler/.{h,cpp} in AMTL style.

@dvander dvander force-pushed the restyle branch 3 times, most recently from cf0a274 to b14af28 Compare June 8, 2019 20:19
Comment thread compiler/amxdbg.h Outdated
ucell address PACKED; /* address in the code segment where generated code (for this file) starts */
char name[1]; /* ASCII string, zero-terminated */
ucell address
PACKED; /* address in the code segment where generated code (for this file) starts */
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ergh.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, will fix this.

Comment thread compiler/assembler.cpp Outdated
{ 90, "zero.alt", sIN_CSEG, parm0 },
{ 89, "zero.pri", sIN_CSEG, parm0 },
{ 92, "zero.s", sIN_CSEG, parm1 },
/* node for "invalid instruction" */
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is probably better before.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree, I'll disable clang-format around this list.

Comment thread compiler/expressions.h Outdated
int hier3(value *lval);
int hier2(value *lval);
int hier1(value *lval1);
int plnge(int *opstr, int opoff, HierFn hier, value *lval, const char *forcetag,
Copy link
Copy Markdown
Contributor

@Fyren Fyren Jun 8, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what the deal is, but it seems like where the asterisk gets nestled by the formatter varies. Here, it's with the variable name and in other places it's with the type.

Example in compiler/assember.h: void assemble(const char* outname, memfile_t* fin);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I have to forcefully disable this in the clang-format config.

Comment thread compiler/amx.h
do { \
enum { assert_static__ = 1/(e) }; \
} while (0)
# define assert_static(e) \
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

didn’t know we had this, if we’re c++11 now we should trash this at some point. Unrelated to this pr, just a note

@dvander
Copy link
Copy Markdown
Member Author

dvander commented Jun 10, 2019

no more shrieks of horror, let's do this

@dvander dvander merged commit c44a169 into master Jun 10, 2019
@dvander dvander deleted the restyle branch June 10, 2019 22:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants