owenpan added a comment.
Herald added reviewers: rymiel, HazardyKnusperkeks, owenpan, MyDeveloperDay.
It seems that this patch caused a regression. See
https://github.com/llvm/llvm-project/issues/62768.
Herald added a comment.
NOTE: Clang-Format Team Automated Review Comment
Your review conta
HazardyKnusperkeks added inline comments.
Comment at: clang/include/clang/Format/Format.h:4343
+ WhitespaceSensitiveMacros == R.WhitespaceSensitiveMacros &&
+ Macros == R.Macros;
}
I put a lot of effort into bringing the stuff sorted. And n
I am so sorry, thanks for sending out the patch already and fixing the
layout!
On Thu, Mar 23, 2023 at 10:08 AM MyDeveloperDay via Phabricator <
revi...@reviews.llvm.org> wrote:
> MyDeveloperDay added a comment.
>
> I know this is like "telling my grandmother to suck eggs" but @klimek the
> chan
MyDeveloperDay added a comment.
I know this is like "telling my grandmother to suck eggs" but @klimek the
change here to Format.h means you need to regenerate
ClangFormatStyleOptions.rst via docs/tools/dump_format_style.py
Impacting the next change to generate - D125171: Add a new clang-format
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG01402831aaae: [clang-format] Add simple macro replacements
in formatting. (authored by klimek).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE
klimek added inline comments.
Comment at: clang/lib/Format/UnwrappedLineParser.cpp:4592
+ !Macros.hasArity(ID->TokenText, Args->size())) {
+// The macro is overloaded to be both object-like and function-like,
+// but none of the function-like arities matc
klimek updated this revision to Diff 500191.
klimek added a comment.
Address review comments.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144170/new/
https://reviews.llvm.org/D144170
Files:
clang/include/clang/Format/Format.h
clang/lib/Forma
sammccall added a comment.
Still LG
Comment at: clang/lib/Format/MacroExpander.cpp:172
assert(defined(ID->TokenText));
+ assert(
+ (!OptionalArgs && ObjectLike.find(ID->TokenText) != ObjectLike.end()) ||
klimek wrote:
> sammccall wrote:
> > this assert
klimek added inline comments.
Comment at: clang/lib/Format/MacroExpander.cpp:172
assert(defined(ID->TokenText));
+ assert(
+ (!OptionalArgs && ObjectLike.find(ID->TokenText) != ObjectLike.end()) ||
sammccall wrote:
> this assertion failure isn't going to
klimek updated this revision to Diff 500181.
klimek marked 5 inline comments as done.
klimek added a comment.
Address review comments.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144170/new/
https://reviews.llvm.org/D144170
Files:
clang/includ
sammccall accepted this revision.
sammccall added a comment.
This revision is now accepted and ready to land.
Great!
The overloading impl is a little surprising to me.
I was assuming that object would always win over function (or that it would be
disallowed to combine the two).
I think that is s
klimek added inline comments.
Comment at: clang/unittests/Format/FormatTest.cpp:22584
+ Style.Macros.push_back("CALL(x)=f([] { x })");
+ Style.Macros.push_back("ASSIGN_OR_RETURN(a, b, c)=a = (b) || (c)");
+
sammccall wrote:
> klimek wrote:
> > sammccall wrote:
klimek updated this revision to Diff 500121.
klimek marked 6 inline comments as done.
klimek added a comment.
Address review comments.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144170/new/
https://reviews.llvm.org/D144170
Files:
clang/includ
sammccall added a comment.
Thanks, this all looks good, at least as far as I understand it! The
two-passes-over-the-whole-file approach is easier for me to follow, too.
Mostly just comment nits, but I have one annoying question left about using
macros with the wrong arity - I thought this was j
klimek updated this revision to Diff 499777.
klimek added a comment.
Add comment.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144170/new/
https://reviews.llvm.org/D144170
Files:
clang/include/clang/Format/Format.h
clang/lib/Format/Continuati
klimek added inline comments.
Comment at: clang/lib/Format/ContinuationIndenter.cpp:744
+ // Align following lines within parenthesis / brackets if configured.
+ // For a line of macro parents, the commas that follow the opening
parenthesis
+ // in the line come after the ope
klimek updated this revision to Diff 499771.
klimek marked 9 inline comments as done.
klimek added a comment.
Address reviewer comments.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144170/new/
https://reviews.llvm.org/D144170
Files:
clang/incl
sammccall added a comment.
It's happening!
Comment at: clang/lib/Format/ContinuationIndenter.cpp:743
+ // Align following lines within parenthesis / brackets if configured.
+ // For a line of macro parents, the commas that follow the opening
parenthesis
ni
klimek created this revision.
klimek added a reviewer: sammccall.
Herald added a project: All.
klimek requested review of this revision.
Herald added a project: clang.
Add configuration to specify macros.
Macros will be expanded, and the code will be parsed and annotated
in the expanded state. In
19 matches
Mail list logo