This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGbe9a87fe9bc3: [clang-format] Add IfMacros option (authored
by vlovich).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://r
MyDeveloperDay accepted this revision.
MyDeveloperDay added a comment.
LGTM
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102730/new/
https://reviews.llvm.org/D102730
___
cfe-commits mailing list
cfe-com
vlovich updated this revision to Diff 353823.
vlovich added a comment.
Rebase onto main.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102730/new/
https://reviews.llvm.org/D102730
Files:
clang/docs/ClangFormatStyleOptions.rst
clang/docs/Releas
HazardyKnusperkeks accepted this revision.
HazardyKnusperkeks added a comment.
This revision is now accepted and ready to land.
Seems to be okay for me.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102730/new/
https://reviews.llvm.org/D102730
___
vlovich updated this revision to Diff 353150.
vlovich marked an inline comment as done.
vlovich added a comment.
Fix clang-format issue
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102730/new/
https://reviews.llvm.org/D102730
Files:
clang/docs/
vlovich updated this revision to Diff 352573.
vlovich added a comment.
Review response
I've updated coverage for AllowShortIfStatementsOnASingleLine and
BreakBeforeBraces. SpacesInConditionalStatement is what the existing
tests were covering so I don't think there's anything there to update.
I lo
vlovich added a comment.
Just back from vacation so will try to polish this off today.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102730/new/
https://reviews.llvm.org/D102730
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://
curdeius added a comment.
Thanks for working on this!
Looks pretty nice, but please clang-format the changes and add some more test
cases (cf. inline comment).
Concerning the lexer part, I wouldn't do anything cleaner.
Comment at: clang/unittests/Format/FormatTest.cpp:19719
+
vlovich added inline comments.
Comment at: clang/include/clang/Format/Format.h:2983
/// \endcode
-SBPO_ControlStatementsExceptForEachMacros,
+SBPO_ControlStatementsExceptControlMacros,
/// Put a space before opening parentheses only if the parentheses are not
--
MyDeveloperDay added a subscriber: krasimir.
MyDeveloperDay added a comment.
This kind of looks ok to me, I'm not sure about the "lexer" part, I guess I
don't know the impact but I'd expect it to be small because it's conditional on
your IfMacro
I'd like @curdeius or @krasimir to take a look.
HazardyKnusperkeks added inline comments.
Comment at: clang/include/clang/Format/Format.h:2983
/// \endcode
-SBPO_ControlStatementsExceptForEachMacros,
+SBPO_ControlStatementsExceptControlMacros,
/// Put a space before opening parentheses only if the parentheses
vlovich added inline comments.
Comment at: clang/docs/ReleaseNotes.rst:252
+- Option ``IfMacros`` has been added. This lets you define macros that get
+ formatted like conditionals much like ``ForEachMacros`` get stiled like
+ foreach loops.
MyDeveloperDay wrot
vlovich updated this revision to Diff 347150.
vlovich marked 3 inline comments as done.
vlovich added a comment.
Review response. Updated the options I changed via the dump_format_style.py
script but didn't ingest all the other changes it generated.
Changed the SBPO option to have a more generic
MyDeveloperDay added inline comments.
Comment at: clang/docs/ReleaseNotes.rst:252
+- Option ``IfMacros`` has been added. This lets you define macros that get
+ formatted like conditionals much like ``ForEachMacros`` get stiled like
+ foreach loops.
stiled? did
vlovich updated this revision to Diff 346870.
vlovich added a comment.
Fixed missing _ after the hyperlink to the KJ link in the Style options
documentation. I'm assuming that's required formatting for hyperlinks by what
renders the markdown.
CHANGES SINCE LAST ACTION
https://reviews.llvm.or
vlovich updated this revision to Diff 346864.
vlovich marked an inline comment as done.
vlovich added a comment.
Updated release notes.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102730/new/
https://reviews.llvm.org/D102730
Files:
clang/docs/ClangFormatStyleOptions.rst
clang/doc
vlovich marked an inline comment as done.
vlovich added inline comments.
Comment at: clang/include/clang/Format/Format.h:2098
+ ///
+ /// For example: KJ_IF_MAYBE.
+ std::vector IfMacros;
HazardyKnusperkeks wrote:
> vlovich wrote:
> > Should I put a hyperlink
vlovich updated this revision to Diff 346863.
vlovich added a comment.
Review response:
- Added additional tests.
- Added `KJ_IF_MAYBE` to default `IfMacros`.
- Added links to KJ documentation.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102730/new/
https://reviews.llvm.org/D102730
HazardyKnusperkeks added a comment.
Looks good, but please add a test with the `else IF` and just `else` case.
Also for me it would be ok to add your `KJ_IF_MAYBE` to the default
configuration. But I have no experience on that.
Comment at: clang/include/clang/Format/Format.h:
vlovich added inline comments.
Comment at: clang/include/clang/Format/Format.h:2098
+ ///
+ /// For example: KJ_IF_MAYBE.
+ std::vector IfMacros;
Should I put a hyperlink to
https://github.com/capnproto/capnproto/blob/master/kjdoc/tour.md#maybes?
Repository
vlovich created this revision.
vlovich added reviewers: curdeius, MyDeveloperDay, HazardyKnusperkeks.
vlovich added a project: clang-format.
vlovich requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
Like with ForEachMacros, support user to pr
21 matches
Mail list logo