[PATCH] D121451: [clang-format] Add space to comments starting with '#'.

2022-03-28 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. In D121451#3402167 , @curdeius wrote: > You comment the whole block and it becomes (with this patch): > > // #include > // > // int something; > > whereas it was: > > //#include > // > // int something; > > which s

[PATCH] D121451: [clang-format] Add space to comments starting with '#'.

2022-03-23 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. In D121451#3402167 , @curdeius wrote: > In D121451#3401947 , > @MyDeveloperDay wrote: > >> I'm a little uncomfortable with >> >> //# >> >> becoming >> >> // # >> >> At least wi

[PATCH] D121451: [clang-format] Add space to comments starting with '#'.

2022-03-23 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added a comment. In D121451#3401947 , @MyDeveloperDay wrote: > I'm a little uncomfortable with > > //# > > becoming > > // # > > At least without an option for it to not make changes Don't you think that `//#PPdirective` should be indented

[PATCH] D121451: [clang-format] Add space to comments starting with '#'.

2022-03-23 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. I'm a little uncomfortable with //# becoming // # Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121451/new/ https://reviews.llvm.org/D121451 ___ cfe-commits mailing

[PATCH] D121451: [clang-format] Add space to comments starting with '#'.

2022-03-22 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. > So I'd rather keep the old behaviour for # in Proto but not in C-like > languages. Is that acceptable? Sounds good. I'll work on a patch doing that. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121451/new/ https://rev

[PATCH] D121451: [clang-format] Add space to comments starting with '#'.

2022-03-22 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added a comment. In D121451#3395801 , @krasimir wrote: > This makes me think that we should really consider not adding indent if the > first character is punctuation WAI, with rationale: That was the case before this patch. > - comments starti

[PATCH] D121451: [clang-format] Add space to comments starting with '#'.

2022-03-21 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. This is getting more fun: the reason why `///` isn't broken up is because the first character `/` after the comment leader `//` is considered punctuation per isPunctuation's CHAR_RAWDEL, which includes all these `{}[]#<>%:;?*+-/^&|~!=,"'`: - https://github.com/llvm/l

[PATCH] D121451: [clang-format] Add space to comments starting with '#'.

2022-03-21 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. In D121451#3395611 , @curdeius wrote: > In D121451#3395578 , @krasimir > wrote: > >> This appears to have broken a relatively common pattern we see in text proto >> comments where secti

[PATCH] D121451: [clang-format] Add space to comments starting with '#'.

2022-03-21 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added a comment. In D121451#3395578 , @krasimir wrote: > This appears to have broken a relatively common pattern we see in text proto > comments where sections use a style like this: > > > #

[PATCH] D121451: [clang-format] Add space to comments starting with '#'.

2022-03-21 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. This appears to have broken a relatively common pattern we see in text proto comments where sections use a style like this: # Big section name ##

[PATCH] D121451: [clang-format] Add space to comments starting with '#'.

2022-03-13 Thread Marek Kurdej via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG36d13d3f8adb: [clang-format] Add space to comments starting with '#'. (authored by curdeius). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121451/new/ http

[PATCH] D121451: [clang-format] Add space to comments starting with '#'.

2022-03-11 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added a comment. In D121451#3375229 , @MyDeveloperDay wrote: > Is this conforming to `SpacesInLineCommentPrefix` Yes it is, nothing changed in this regard, I added tests anyway. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D121451: [clang-format] Add space to comments starting with '#'.

2022-03-11 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius updated this revision to Diff 414669. curdeius added a comment. Add tests for SpacesInLineCommentPrefix. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121451/new/ https://reviews.llvm.org/D121451 Files: clang/lib/Format/BreakableToken.c

[PATCH] D121451: [clang-format] Add space to comments starting with '#'.

2022-03-11 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. Is this conforming to `SpacesInLineCommentPrefix` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121451/new/ https://reviews.llvm.org/D121451 ___ cfe-commits mailing list c

[PATCH] D121451: [clang-format] Add space to comments starting with '#'.

2022-03-11 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added a comment. I'm not sure whether we should consider this a breaking change, there were no tests at all verifying this behaviour. I think that not adding a space in comments starting with a punctuation is a mistake unless for some special comments like `///`, `//!` etc. (which are

[PATCH] D121451: [clang-format] Add space to comments starting with '#'.

2022-03-11 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius created this revision. curdeius added reviewers: MyDeveloperDay, HazardyKnusperkeks, owenpan. Herald added a project: All. curdeius requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fixes https://github.com/llvm/llvm-project/issues/3