This trivial patch runs clang-format on some unformatted files before doing logic changes and prevent hard to review diffs.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
In general doing a clang-format before extensive work on some files is an obvious NFC, but I can see why you might have wanted some review on this.
LGTM, although the one thing I'd really like you to try is reflowing that one awkward function description. All the other trivial spacing stuff is purely optional.
llvm/include/llvm/IR/DebugInfoMetadata.h | ||
---|---|---|
610 | It looks like clang-format preserved the spaces around the first asterisk (MDString * Filename) but handled the next case correctly (MDString *Directory). Can you manually remove the space before Filename and see if clang-format leaves it that way? | |
1788 | This reflowing is awkward. Try moving each \p to a new line, and maybe indent a couple of spaces, see if that causes clang-format to behave better. You might need an empty /// line before the \p lines. | |
2150 | Try removing the space before Scope and see if clang-format will preserve that. | |
2154 | Try removing the space before Scope and see whether clang-format will preserve that. | |
2201 | And another Scope with an incorrect space. | |
2316 | Man, these are everywhere. I'm going to stop pointing out each one. | |
llvm/lib/Bitcode/Reader/MetadataLoader.cpp | ||
1677 | I think putting an = at the end of DIFlagMainSubprogram will avoid that space. | |
llvm/lib/IR/DIBuilder.cpp | ||
786 | /*AlignInBits=*/ |
Thanks for the review! I'm aware that such code style patches don't need approval, according to the LLVM developers policy, but since I'm currently an outside contributor without commit access, I'm obligated to do it. I think these are also good for me to get used to this nit things clang-format is not able to fix, although I don't expect any extensive review.
@probinson Can you check now? If it looks good, can you land it, please?
llvm/include/llvm/IR/DebugInfoMetadata.h | ||
---|---|---|
1788 | I added a blank /// similar to the above documentation. | |
2150 | clang-format insists on this, because of the macro. | |
2201 | It is very weird because the second parameter doesn't get indented. |
Sure. It looks like your email address is <contact@lsferreira.net> is that correct? We do want to be careful about attributions.
It looks like clang-format preserved the spaces around the first asterisk (MDString * Filename) but handled the next case correctly (MDString *Directory). Can you manually remove the space before Filename and see if clang-format leaves it that way?