Page MenuHomePhabricator

owenpan (Owen Pan)
User

Projects

User does not belong to any projects.

User Details

User Since
Aug 14 2018, 4:06 AM (203 w, 2 h)

Recent Activity

Yesterday

owenpan requested review of D129105: [clang-format][NFC] Clean up IndentForLevel in LevelIndentTracker.
Mon, Jul 4, 10:07 PM · Restricted Project, Restricted Project, Restricted Project
owenpan added inline comments to D129064: [clang-format] Avoid crash in LevelIndentTracker..
Mon, Jul 4, 2:46 PM · Restricted Project, Restricted Project, Restricted Project
owenpan added a project to D128984: [clang-format] Tweak help text a bit: Restricted Project.
Mon, Jul 4, 12:48 PM · Restricted Project, Restricted Project, Restricted Project
owenpan added a project to D129050: [clang-format] Update documentation: Restricted Project.
Mon, Jul 4, 12:45 PM · Restricted Project, Restricted Project, Restricted Project
owenpan updated subscribers of D128706: [Clang] Disable clang-format entirely for clang/test tree..
Mon, Jul 4, 12:37 PM · Restricted Project, Restricted Project
owenpan committed rG47bdf53a5dba: [clang-format] Break on AfterColon only if not followed by comment (authored by owenpan).
[clang-format] Break on AfterColon only if not followed by comment
Mon, Jul 4, 12:35 PM · Restricted Project, Restricted Project
owenpan closed D129057: [clang-format] Break on AfterColon only if not followed by comment.
Mon, Jul 4, 12:35 PM · Restricted Project, Restricted Project, Restricted Project
owenpan added a comment to D129057: [clang-format] Break on AfterColon only if not followed by comment.

LGTM. Thanks for addressing my comments.

Mon, Jul 4, 12:33 PM · Restricted Project, Restricted Project, Restricted Project

Sun, Jul 3

owenpan updated the diff for D129057: [clang-format] Break on AfterColon only if not followed by comment.

Handle PackContructorInitializers: NextLine and address review comments.

Sun, Jul 3, 11:54 PM · Restricted Project, Restricted Project, Restricted Project
owenpan requested review of D129057: [clang-format] Break on AfterColon only if not followed by comment.
Sun, Jul 3, 6:36 PM · Restricted Project, Restricted Project, Restricted Project

Fri, Jul 1

owenpan committed rG40d2ef841b68: [clang-format][NFC] Replace an EXPECT_EQ with a verifyFormat (authored by owenpan).
[clang-format][NFC] Replace an EXPECT_EQ with a verifyFormat
Fri, Jul 1, 9:21 PM · Restricted Project, Restricted Project
owenpan added a comment to D123450: [clang-format] Parse Verilog if statements.

clang/docs/ClangFormatStyleOptions.rst was out of sync because dump_format_style.py had not been run. Fixed in cc55d97.

Fri, Jul 1, 7:08 PM · Restricted Project, Restricted Project
owenpan committed rGcc55d97cebf2: [clang-format] Run dump_format_style.py for LK_Verilog (authored by owenpan).
[clang-format] Run dump_format_style.py for LK_Verilog
Fri, Jul 1, 7:01 PM · Restricted Project, Restricted Project

Wed, Jun 29

owenpan accepted D128713: [clang-format] Handle Verilog user-defined primitives.
Wed, Jun 29, 12:39 PM · Restricted Project, Restricted Project, Restricted Project
owenpan accepted D128711: [clang-format] Handle Verilog blocks.
Wed, Jun 29, 12:38 PM · Restricted Project, Restricted Project, Restricted Project

Tue, Jun 28

owenpan added inline comments to D128709: [clang-format] Handle Verilog attributes.
Tue, Jun 28, 10:32 PM · Restricted Project, Restricted Project, Restricted Project

Sun, Jun 26

owenpan committed rG664ce34e81d9: [clang-format] Quit analyzing solution space for large state count (authored by owenpan).
[clang-format] Quit analyzing solution space for large state count
Sun, Jun 26, 1:16 PM · Restricted Project, Restricted Project
owenpan closed D128574: [clang-format] Quit analyzing solution space for large state count.
Sun, Jun 26, 1:15 PM · Restricted Project, Restricted Project, Restricted Project
owenpan accepted D128607: [clang-format] NFC Fix uninitialized memory problem.

Can you remove NFC? IMO, fixing a memory error is not NFC.

Sun, Jun 26, 12:50 PM · Restricted Project, Restricted Project

Fri, Jun 24

owenpan updated the summary of D128574: [clang-format] Quit analyzing solution space for large state count.
Fri, Jun 24, 10:37 PM · Restricted Project, Restricted Project, Restricted Project
owenpan requested review of D128574: [clang-format] Quit analyzing solution space for large state count.
Fri, Jun 24, 10:22 PM · Restricted Project, Restricted Project, Restricted Project
owenpan accepted D128496: [clang-format] Further improve requires clause detection.
Fri, Jun 24, 4:27 PM · Restricted Project, Restricted Project, Restricted Project
owenpan added inline comments to D128496: [clang-format] Further improve requires clause detection.
Fri, Jun 24, 12:14 AM · Restricted Project, Restricted Project, Restricted Project

Wed, Jun 22

owenpan added a comment to D127873: [clang-format] Fix misplacement of `*` in declaration of pointer to struct.

Thanks. I am not sure which modification will be better, the patch I submitted or the following code.

FormatToken *BeforeLBraceToken = nullptr;
if (MatchingLBrace)
  BeforeLBraceToken = MatchingLBrace->getPreviousNonComment();

if (BeforeLBraceToken && BeforeLBraceToken->is(TT_TemplateCloser))
  return TT_BinaryOperator;

How about the following?

if (!MatchingLBrace)
  return TT_PointerOrReference;
const FormatToken *BeforeLBrace = MatchingLBrace->getPreviousNonComment();
if (!BeforeLBrace || BeforeLBrace->isNot(TT_TemplateCloser))
  return TT_PointerOrReference;
return TT_BinaryOperator;
Wed, Jun 22, 10:03 AM · Restricted Project, Restricted Project, Restricted Project

Tue, Jun 21

owenpan accepted D127873: [clang-format] Fix misplacement of `*` in declaration of pointer to struct.
Tue, Jun 21, 7:29 PM · Restricted Project, Restricted Project, Restricted Project
owenpan retitled D127873: [clang-format] Fix misplacement of `*` in declaration of pointer to struct from [clang-format] Fix misplacemnt of `*` in declaration of pointer to struct to [clang-format] Fix misplacement of `*` in declaration of pointer to struct.
Tue, Jun 21, 7:28 PM · Restricted Project, Restricted Project, Restricted Project

Wed, Jun 15

owenpan added reviewers for D127873: [clang-format] Fix misplacement of `*` in declaration of pointer to struct: curdeius, HazardyKnusperkeks.
Wed, Jun 15, 1:00 PM · Restricted Project, Restricted Project, Restricted Project
owenpan committed rG2d82c9ccf32c: [clang-format][NFC] Fix braces in ClangFormat.cpp (authored by owenpan).
[clang-format][NFC] Fix braces in ClangFormat.cpp
Wed, Jun 15, 12:58 PM · Restricted Project, Restricted Project
owenpan closed D127827: [clang-format][NFC] Fix braces in ClangFormat.cpp.
Wed, Jun 15, 12:58 PM · Restricted Project, Restricted Project, Restricted Project
owenpan committed rG462b49f18c6c: [libcxx] Remove extraneous '---' lines in .clang-format files (authored by owenpan).
[libcxx] Remove extraneous '---' lines in .clang-format files
Wed, Jun 15, 1:35 AM · Restricted Project, Restricted Project

Tue, Jun 14

owenpan committed rG485c18c11bd5: [mlir] Add missing newline at end of .clang-format file (authored by owenpan).
[mlir] Add missing newline at end of .clang-format file
Tue, Jun 14, 11:59 PM · Restricted Project, Restricted Project
owenpan requested review of D127827: [clang-format][NFC] Fix braces in ClangFormat.cpp.
Tue, Jun 14, 11:51 PM · Restricted Project, Restricted Project, Restricted Project
owenpan committed rG07b3446d7243: [clang-format] Never analyze insert/remove braces in the same pass (authored by owenpan).
[clang-format] Never analyze insert/remove braces in the same pass
Tue, Jun 14, 10:44 PM · Restricted Project, Restricted Project
owenpan closed D127685: [clang-format] Never analyze insert/remove braces in the same pass.
Tue, Jun 14, 10:43 PM · Restricted Project, Restricted Project, Restricted Project

Mon, Jun 13

owenpan requested review of D127685: [clang-format] Never analyze insert/remove braces in the same pass.
Mon, Jun 13, 12:50 PM · Restricted Project, Restricted Project, Restricted Project
owenpan committed rG7cb0bc8abf6e: [clang-format] Handle more cases for RemoveBracesLLVM (authored by owenpan).
[clang-format] Handle more cases for RemoveBracesLLVM
Mon, Jun 13, 12:11 PM · Restricted Project, Restricted Project
owenpan closed D127614: [clang-format] Handle more cases for RemoveBracesLLVM.
Mon, Jun 13, 12:10 PM · Restricted Project, Restricted Project, Restricted Project
owenpan requested review of D127614: [clang-format] Handle more cases for RemoveBracesLLVM.
Mon, Jun 13, 12:23 AM · Restricted Project, Restricted Project, Restricted Project

Sun, Jun 12

owenpan closed D127578: [clang-format] Handle deprecated options in dump_format_style.py.

Landed in b1c300f.

Sun, Jun 12, 11:41 PM · Restricted Project, Restricted Project, Restricted Project
owenpan committed rGb1c300fe6849: [clang-format] Handle deprecated options in dump_format_style.py (authored by owenpan).
[clang-format] Handle deprecated options in dump_format_style.py
Sun, Jun 12, 11:36 PM · Restricted Project, Restricted Project
owenpan added a comment to D127484: [clang-format] Use tabs on GNU style.

Interesting.

I measured some development branch (targeting *.c, *.cc, *.cpp and *.h):

Programprefix: 8 spacesprefix: 1 tab8sp percentage
Coreutils2349446198.08%
Sun, Jun 12, 12:35 AM · Restricted Project, Restricted Project, Restricted Project

Sat, Jun 11

owenpan added a comment to D127390: [clang-format][NFC] Remove unused FormatStyle members.

See D127578.

Sat, Jun 11, 1:17 PM · Restricted Project, Restricted Project, Restricted Project
owenpan requested review of D127578: [clang-format] Handle deprecated options in dump_format_style.py.
Sat, Jun 11, 1:16 PM · Restricted Project, Restricted Project, Restricted Project
owenpan added a comment to D127390: [clang-format][NFC] Remove unused FormatStyle members.

If we remove it from here, then it will get removed from the documentation

Also if you remove it, then the ClangFormatStyleOptions.rst needs to be regenerated.

Sat, Jun 11, 12:13 PM · Restricted Project, Restricted Project, Restricted Project
owenpan committed rG05d771021ad9: [clang-format] Fix a bug in RemoveBracesLLVM (authored by owenpan).
[clang-format] Fix a bug in RemoveBracesLLVM
Sat, Jun 11, 1:12 AM · Restricted Project, Restricted Project
owenpan closed D127532: [clang-format] Fix a bug in RemoveBracesLLVM.
Sat, Jun 11, 1:12 AM · Restricted Project, Restricted Project, Restricted Project

Fri, Jun 10

owenpan added a comment to D127484: [clang-format] Use tabs on GNU style.

It seems like a breaking change that may be painful for users of GNU style.

Fri, Jun 10, 11:25 PM · Restricted Project, Restricted Project, Restricted Project
owenpan added a comment to D127484: [clang-format] Use tabs on GNU style.

Oh gosh! It hard to make such changes and someone else not call them a regression, I’m not sure how I feel. We do kind of have to be able to fix bugs and if this gets closer to gnu style then I guess it’s better

Fri, Jun 10, 5:08 PM · Restricted Project, Restricted Project, Restricted Project
owenpan requested review of D127532: [clang-format] Fix a bug in RemoveBracesLLVM.
Fri, Jun 10, 1:12 PM · Restricted Project, Restricted Project, Restricted Project

Thu, Jun 9

owenpan committed rGe9f2d47bfe29: [clang-format][NFC] Remove unused FormatStyle members (authored by owenpan).
[clang-format][NFC] Remove unused FormatStyle members
Thu, Jun 9, 10:35 PM · Restricted Project, Restricted Project
owenpan closed D127390: [clang-format][NFC] Remove unused FormatStyle members.
Thu, Jun 9, 10:34 PM · Restricted Project, Restricted Project, Restricted Project
owenpan accepted D126934: [clang-format] NFC Sort names of format token types.

LGTM

Thu, Jun 9, 8:29 PM · Restricted Project, Restricted Project
owenpan requested review of D127390: [clang-format][NFC] Remove unused FormatStyle members.
Thu, Jun 9, 3:43 AM · Restricted Project, Restricted Project, Restricted Project
owenpan added inline comments to D127366: [clang-format][NFC] Format lib/Format and unittests/Format in clang.
Thu, Jun 9, 3:00 AM · Restricted Project, Restricted Project, Restricted Project
owenpan committed rG40a5d79a5cb4: [clang-format][NFC] Format lib/Format and unittests/Format in clang (authored by owenpan).
[clang-format][NFC] Format lib/Format and unittests/Format in clang
Thu, Jun 9, 2:26 AM · Restricted Project, Restricted Project
owenpan closed D127366: [clang-format][NFC] Format lib/Format and unittests/Format in clang.
Thu, Jun 9, 2:26 AM · Restricted Project, Restricted Project, Restricted Project

Wed, Jun 8

owenpan requested review of D127366: [clang-format][NFC] Format lib/Format and unittests/Format in clang.
Wed, Jun 8, 5:26 PM · Restricted Project, Restricted Project, Restricted Project
owenpan committed rG5ead1f13a2d8: [clang-format] Remove braces of else blocks that embody an if block (authored by owenpan).
[clang-format] Remove braces of else blocks that embody an if block
Wed, Jun 8, 4:05 PM · Restricted Project, Restricted Project
owenpan closed D127260: [clang-format] Remove braces of else blocks that embody an if block.
Wed, Jun 8, 4:05 PM · Restricted Project, Restricted Project, Restricted Project
owenpan added inline comments to D126157: [clang-format][NFC] Insert/remove braces in clang/lib/Format/.
Wed, Jun 8, 4:03 PM · Restricted Project, Restricted Project, Restricted Project
owenpan added a comment to D127260: [clang-format] Remove braces of else blocks that embody an if block.

Still looks good. Was there a particular case where the previous version didn't work?

Wed, Jun 8, 3:02 PM · Restricted Project, Restricted Project, Restricted Project
owenpan requested review of D127260: [clang-format] Remove braces of else blocks that embody an if block.
Wed, Jun 8, 8:50 AM · Restricted Project, Restricted Project, Restricted Project
owenpan updated the diff for D127260: [clang-format] Remove braces of else blocks that embody an if block.

Update IfLeftBrace in parseLevel() only if the level is a simple block.

Wed, Jun 8, 8:48 AM · Restricted Project, Restricted Project, Restricted Project

Tue, Jun 7

owenpan added inline comments to D127260: [clang-format] Remove braces of else blocks that embody an if block.
Tue, Jun 7, 11:56 PM · Restricted Project, Restricted Project, Restricted Project
owenpan added inline comments to D127260: [clang-format] Remove braces of else blocks that embody an if block.
Tue, Jun 7, 11:29 PM · Restricted Project, Restricted Project, Restricted Project
owenpan requested review of D127260: [clang-format] Remove braces of else blocks that embody an if block.
Tue, Jun 7, 4:17 PM · Restricted Project, Restricted Project, Restricted Project
owenpan committed rGb5b33fbffb08: [clang-format] Skip parsing a block if it's nested too deep (authored by owenpan).
[clang-format] Skip parsing a block if it's nested too deep
Tue, Jun 7, 3:28 PM · Restricted Project, Restricted Project
owenpan closed D127183: [clang-format] Skip parsing a block if it's nested too deep.
Tue, Jun 7, 3:28 PM · Restricted Project, Restricted Project, Restricted Project
owenpan updated the diff for D127183: [clang-format] Skip parsing a block if it's nested too deep.

Inadvertently moved the added code down when rebasing. Fixed.

Tue, Jun 7, 4:34 AM · Restricted Project, Restricted Project, Restricted Project
owenpan updated the diff for D127183: [clang-format] Skip parsing a block if it's nested too deep.

Rebased.

Tue, Jun 7, 3:43 AM · Restricted Project, Restricted Project, Restricted Project
owenpan committed rGec90bc0ea438: [clang-format][NFC] Clean up the unwrapped line parser (authored by owenpan).
[clang-format][NFC] Clean up the unwrapped line parser
Tue, Jun 7, 2:59 AM · Restricted Project, Restricted Project
owenpan closed D127005: [clang-format][NFC] Clean up the unwrapped line parser.
Tue, Jun 7, 2:59 AM · Restricted Project, Restricted Project, Restricted Project

Mon, Jun 6

owenpan requested review of D127183: [clang-format] Skip parsing a block if it's nested too deep.
Mon, Jun 6, 11:17 PM · Restricted Project, Restricted Project, Restricted Project

Sun, Jun 5

owenpan updated the diff for D127005: [clang-format][NFC] Clean up the unwrapped line parser.

Restored the return type of parseLevel() and reordered the parameters of parseStructuralElement().

Sun, Jun 5, 7:00 PM · Restricted Project, Restricted Project, Restricted Project
owenpan committed rGfc1c160f7330: [clang-format] Handle attributes for for/while loops (authored by owenpan).
[clang-format] Handle attributes for for/while loops
Sun, Jun 5, 3:46 PM · Restricted Project, Restricted Project
owenpan closed D127054: [clang-format] Handle attributes for for/while loops.
Sun, Jun 5, 3:46 PM · Restricted Project, Restricted Project, Restricted Project

Jun 4 2022

owenpan planned changes to D127005: [clang-format][NFC] Clean up the unwrapped line parser.
Jun 4 2022, 8:47 PM · Restricted Project, Restricted Project, Restricted Project
owenpan updated the diff for D127005: [clang-format][NFC] Clean up the unwrapped line parser.

Restored the prototype of parseStructuralElement().

Jun 4 2022, 2:34 PM · Restricted Project, Restricted Project, Restricted Project
owenpan planned changes to D127005: [clang-format][NFC] Clean up the unwrapped line parser.
Jun 4 2022, 2:23 PM · Restricted Project, Restricted Project, Restricted Project
owenpan requested review of D127054: [clang-format] Handle attributes for for/while loops.
Jun 4 2022, 12:30 PM · Restricted Project, Restricted Project, Restricted Project

Jun 3 2022

owenpan requested review of D127005: [clang-format][NFC] Clean up the unwrapped line parser.
Jun 3 2022, 2:50 PM · Restricted Project, Restricted Project, Restricted Project

Jun 2 2022

owenpan added inline comments to D126845: [clang-format] Handle Verilog numbers and operators.
Jun 2 2022, 9:55 PM · Restricted Project, Restricted Project, Restricted Project
owenpan added inline comments to D126934: [clang-format] NFC Sort names of format token types.
Jun 2 2022, 7:07 PM · Restricted Project, Restricted Project
owenpan committed rGdb15e3121243: [clang-format] Handle do-while loops for RemoveBracesLLVM (authored by owenpan).
[clang-format] Handle do-while loops for RemoveBracesLLVM
Jun 2 2022, 1:09 AM · Restricted Project, Restricted Project
owenpan closed D126758: [clang-format] Handle do-while loops for RemoveBracesLLVM.
Jun 2 2022, 1:08 AM · Restricted Project, Restricted Project, Restricted Project

Jun 1 2022

owenpan added inline comments to D126758: [clang-format] Handle do-while loops for RemoveBracesLLVM.
Jun 1 2022, 3:36 PM · Restricted Project, Restricted Project, Restricted Project
owenpan updated the diff for D126758: [clang-format] Handle do-while loops for RemoveBracesLLVM.

Removed the numbering of the examples from the coding standards.

Jun 1 2022, 9:38 AM · Restricted Project, Restricted Project, Restricted Project
owenpan added inline comments to D126758: [clang-format] Handle do-while loops for RemoveBracesLLVM.
Jun 1 2022, 9:23 AM · Restricted Project, Restricted Project, Restricted Project
owenpan requested review of D126758: [clang-format] Handle do-while loops for RemoveBracesLLVM.
Jun 1 2022, 1:29 AM · Restricted Project, Restricted Project, Restricted Project
owenpan added inline comments to D126512: [Docs] Clarify the guideline on omitting braces.
Jun 1 2022, 1:20 AM · Restricted Project, Restricted Project

May 31 2022

owenpan committed rG3d56131bf6dd: [Docs] Clarify the guideline on omitting braces (authored by owenpan).
[Docs] Clarify the guideline on omitting braces
May 31 2022, 11:36 PM · Restricted Project, Restricted Project
owenpan closed D126512: [Docs] Clarify the guideline on omitting braces.
May 31 2022, 11:35 PM · Restricted Project, Restricted Project
owenpan added inline comments to D126512: [Docs] Clarify the guideline on omitting braces.
May 31 2022, 11:23 PM · Restricted Project, Restricted Project
owenpan updated the summary of D126512: [Docs] Clarify the guideline on omitting braces.
May 31 2022, 3:28 PM · Restricted Project, Restricted Project
owenpan updated the diff for D126512: [Docs] Clarify the guideline on omitting braces.

Dropped the controversial clarification on complex single-statement body. Also cleaned up the original examples (indentation, column limit, grammar, etc.)

May 31 2022, 3:22 PM · Restricted Project, Restricted Project
owenpan added inline comments to D126512: [Docs] Clarify the guideline on omitting braces.
May 31 2022, 3:10 PM · Restricted Project, Restricted Project
owenpan added inline comments to D126512: [Docs] Clarify the guideline on omitting braces.
May 31 2022, 2:10 PM · Restricted Project, Restricted Project
owenpan added inline comments to D126512: [Docs] Clarify the guideline on omitting braces.
May 31 2022, 10:52 AM · Restricted Project, Restricted Project
owenpan added inline comments to D126512: [Docs] Clarify the guideline on omitting braces.
May 31 2022, 10:35 AM · Restricted Project, Restricted Project
owenpan added a comment to D126512: [Docs] Clarify the guideline on omitting braces.

I will undo the clarification on complex single-statement body but keep the change to the potential dangling else example if everyone is ok with that.

May 31 2022, 10:09 AM · Restricted Project, Restricted Project