Page MenuHomePhabricator

jaredgrubb (Jared Grubb)
User

Projects

User does not belong to any projects.

User Details

User Since
Jun 20 2017, 12:24 AM (310 w, 1 d)

Recent Activity

Mon, May 22

jaredgrubb updated the diff for D150083: [clang-format] ObjCPropertyAttributeOrder to sort ObjC property attributes.

Address review comments: unroll a loop in unit tests to explicitly test all the property attributes.

Mon, May 22, 9:20 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project

Sat, May 13

jaredgrubb updated the diff for D145262: [clang-format] Treat AttributeMacros more like attribute macros.

Address review comments:

  • remove redundant &&
  • remove part of patch that was not tested by any test and should be its own patch on its own merits
Sat, May 13, 3:18 PM · Restricted Project, Restricted Project, Restricted Project
jaredgrubb added inline comments to D145262: [clang-format] Treat AttributeMacros more like attribute macros.
Sat, May 13, 3:13 PM · Restricted Project, Restricted Project, Restricted Project
jaredgrubb updated the diff for D150083: [clang-format] ObjCPropertyAttributeOrder to sort ObjC property attributes.

Address review comments:

  • fix some style
  • add unit test for each ObjC attribute recognized by the compiler
  • adjust the docs for the style-option to show a YAML example with all of them in a sane order (something people could copy-paste as a starter version)
Sat, May 13, 3:04 PM · Restricted Project, Restricted Project, Restricted Project, Restricted Project

Sun, May 7

jaredgrubb added inline comments to D145262: [clang-format] Treat AttributeMacros more like attribute macros.
Sun, May 7, 10:47 PM · Restricted Project, Restricted Project, Restricted Project
jaredgrubb updated the diff for D150083: [clang-format] ObjCPropertyAttributeOrder to sort ObjC property attributes.

Update ClangFormatStyleOptions.rst as requested by the auto-comment (thanks auto-bot!).

Sun, May 7, 9:26 PM · Restricted Project, Restricted Project, Restricted Project, Restricted Project
jaredgrubb added a comment to D150083: [clang-format] ObjCPropertyAttributeOrder to sort ObjC property attributes.

Some implementation notes:

  • The implementation was modeled after QualifierAlignmentFixer and sortCppIncludes.
  • the additions to the .bazel/.gn build files was done naively based on searching for where "QualifierFixerTest" appeared in the repo; I can't really test these. It looks right, but it's a guess.
  • I considered creating a top-level style similar to QualifierAlignment/QualifierOrder; that one has a few pre-canned values (Leave, Left, Right, Custom), where Custom opens up the style QualifierOrder, an array of qualifier names.
    • Pro: we could create a [Leave, LLVM] that would set them in the same order the DeclPrinter.cpp would dump them
    • Pro: users probably would like not having to think about 18 different attributes (I did try to document them in groups to make them easier to find)
    • Con: I couldn't find any style guides that provide a "standard order", so I don't know any other pre-canned settings that wouldn't just be an opinion of my own personal style. If there are, let me know and that might add weight to going this route.
Sun, May 7, 9:16 PM · Restricted Project, Restricted Project, Restricted Project, Restricted Project
jaredgrubb requested review of D150083: [clang-format] ObjCPropertyAttributeOrder to sort ObjC property attributes.
Sun, May 7, 9:02 PM · Restricted Project, Restricted Project, Restricted Project, Restricted Project
jaredgrubb updated the diff for D145262: [clang-format] Treat AttributeMacros more like attribute macros.

Address review feedback about code/endcode. Otherwise the patch is the same and I hope ready for merge? I'd love to get a green check :)

Sun, May 7, 10:16 AM · Restricted Project, Restricted Project, Restricted Project

Apr 23 2023

jaredgrubb added a comment to D145262: [clang-format] Treat AttributeMacros more like attribute macros.

I have uploaded patch for all the points you called out. (Sorry for delay; I missed the suggestions earlier!)

Apr 23 2023, 4:47 PM · Restricted Project, Restricted Project, Restricted Project
jaredgrubb updated the diff for D145262: [clang-format] Treat AttributeMacros more like attribute macros.

Address review comments from @owenpan

Apr 23 2023, 4:47 PM · Restricted Project, Restricted Project, Restricted Project

Mar 23 2023

jaredgrubb added a comment to D146310: [clang-format] Fix dropped 'else' in 398cddf6acec.

Manuel, if you're happy with the change, do you mind committing it? I don't have commit access (at least I've never requested it, so I assume I can't, I've never tried)

Mar 23 2023, 1:40 PM · Restricted Project, Restricted Project, Restricted Project
jaredgrubb added a comment to D146310: [clang-format] Fix dropped 'else' in 398cddf6acec.

Yeh, I considered trying to craft one as courtesy but this seemed like a very far edge case and didn't seem really worth it. So glad you agree :)

Mar 23 2023, 1:31 PM · Restricted Project, Restricted Project, Restricted Project

Mar 20 2023

jaredgrubb added inline comments to D146434: [clang-format] Fix support for ObjC blocks with pointer return types.
Mar 20 2023, 8:43 PM · Restricted Project, Restricted Project, Restricted Project
jaredgrubb requested review of D146434: [clang-format] Fix support for ObjC blocks with pointer return types.
Mar 20 2023, 9:31 AM · Restricted Project, Restricted Project, Restricted Project

Mar 17 2023

jaredgrubb added a comment to D146310: [clang-format] Fix dropped 'else' in 398cddf6acec.

The difference doesn't appear to affect any unit tests (which is unfortunate), but I think you didn't mean to remove this else, based both on the logic of the original commit and the format of the patched line.

Mar 17 2023, 10:37 AM · Restricted Project, Restricted Project, Restricted Project
jaredgrubb requested review of D146310: [clang-format] Fix dropped 'else' in 398cddf6acec.
Mar 17 2023, 10:34 AM · Restricted Project, Restricted Project, Restricted Project

Mar 12 2023

jaredgrubb added inline comments to D145262: [clang-format] Treat AttributeMacros more like attribute macros.
Mar 12 2023, 4:59 PM · Restricted Project, Restricted Project, Restricted Project
jaredgrubb added inline comments to D145262: [clang-format] Treat AttributeMacros more like attribute macros.
Mar 12 2023, 4:50 PM · Restricted Project, Restricted Project, Restricted Project
jaredgrubb updated the diff for D145262: [clang-format] Treat AttributeMacros more like attribute macros.
  • Fixed an issue in TokenAnnotator about it not breaking between macros properly (it was catching in an ObjC selector-check too early)
  • Add more ObjC tests, covering method and property declarations too. There are still some quirks about reflowing multiple attributes, but those quirks exist in C++ too, so I think those are best left for another patch. I added checks for existing behavior so that patch can improve the ObjC version too.
Mar 12 2023, 4:42 PM · Restricted Project, Restricted Project, Restricted Project

Mar 4 2023

jaredgrubb updated the diff for D145262: [clang-format] Treat AttributeMacros more like attribute macros.

Create unit-tests for the patch (and remove the proposed non-unit test "test").

Mar 4 2023, 2:53 PM · Restricted Project, Restricted Project, Restricted Project

Mar 3 2023

jaredgrubb added a comment to D145262: [clang-format] Treat AttributeMacros more like attribute macros.

I wasn't sure about testing (this is my first patch!) and the test-case I did was in clang/test/Format .. I can look at clang/unittests/Format and see how to model something like it.

Mar 3 2023, 12:43 PM · Restricted Project, Restricted Project, Restricted Project
jaredgrubb added a comment to D145262: [clang-format] Treat AttributeMacros more like attribute macros.

For background, the current clang-format results in the following (-style="{BasedOnStyle: LLVM, ColumnLimit: 0, AttributeMacros: [MACRO]}):

MACRO MACRO(A)
    @interface Foo
@end
Mar 3 2023, 12:38 PM · Restricted Project, Restricted Project, Restricted Project
jaredgrubb requested review of D145262: [clang-format] Treat AttributeMacros more like attribute macros.
Mar 3 2023, 12:01 PM · Restricted Project, Restricted Project, Restricted Project

Jul 29 2019

jaredgrubb added inline comments to rL366696: Update c++2a status page with post-Cologne information.
Jul 29 2019, 11:07 AM