style: add .clang-format file
Review Request #2372 - Created Aug. 31, 2014 and discarded
| Information | |
|---|---|
| Nilay Vaish | |
| gem5 | |
| default | |
| Reviewers | |
| Default | |
Changeset 10318:34b549ec182b --------------------------- style: add .clang-format file The format specified in this file is used by clang-format to fix the formatting of a given file. Hopefully, this will ease the burden on the developers as they no longer need to manually format things.
Issue Summary
8
2
6
0
| Description | From | Last Updated | Status |
|---|---|---|---|
| Has this changed name? The clang documentation lists DerivePointerAlignment, but not DerivePointerBinding. | Andreas Sandberg | Sept. 1, 2014, 10:14 a.m. | Open |
| ?? | Andreas Sandberg | Sept. 1, 2014, 10:14 a.m. | Open |
Posted (Sept. 1, 2014, 8:38 a.m.)
-
.clang-format (Diff revision 1) -
we usually do not use this style
-
.clang-format (Diff revision 1) -
we usually do not use this style
-
.clang-format (Diff revision 1) -
78 or 76 I would say
Somehow we need to be able to tell clang to put the return type on a separate line for methods. This is one major difference with how things are done at the moment. The way we format our stats is also a bit of an odd one with the name .init .desc etc. the formatter really does not like this, and I'm not sure what to do about it.
Posted (Sept. 1, 2014, 10:14 a.m.)
I looked into this tool a couple of months ago. At the time, I encountered some issues relating to indentation (IIRC, the way we indent case labels by 2 spaces wasn't supported). My conclusion at the time was that it wasn't possible to configure clang-format to adhere to the gem5 style. Has this changed? If not, I'd suggest that we don't commit this for now and wait while clang-format matures.
-
.clang-format (Diff revision 1) -
Shouldn't this be -2?
-
.clang-format (Diff revision 1) -
I used 78 here.
-
.clang-format (Diff revision 1) -
Has this changed name? The clang documentation lists DerivePointerAlignment, but not DerivePointerBinding.
-
.clang-format (Diff revision 1) -
Shouldn't this be 'Linux'? That'd add a newline after function/namespace/class definitions.
-
.clang-format (Diff revision 1) -
??
Review request changed
Updated (Sept. 2, 2014, 9:50 p.m.)
Description: |
|
|||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 2 (+46) |
