Page MenuHomePhabricator

Please use GitHub pull requests for new patches. Phabricator shutdown timeline

Feed Advanced Search

Yesterday

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

Address review comments, and adjusting the patch to address other merges since this patch was started.

Mon, Oct 2, 3:36 PM · Restricted Project, Restricted Project, Restricted Project

Wed, Sep 27

jaredgrubb added a comment to D150083: [clang-format] ObjCPropertyAttributeOrder to sort ObjC property attributes.
Wed, Sep 27, 9:57 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project

Sat, Sep 23

jaredgrubb added a comment to D150083: [clang-format] ObjCPropertyAttributeOrder to sort ObjC property attributes.

@MyDeveloperDay addressed your comments. Thanks!

Sat, Sep 23, 3:31 PM · Restricted Project, Restricted Project, Restricted Project, Restricted Project
jaredgrubb updated the diff for D150083: [clang-format] ObjCPropertyAttributeOrder to sort ObjC property attributes.

Rebased and adjusted docs to reflect that this patch would appear in clang-format 18 (not 17 now).
Removed extraneous comment change (will do NFC later for that)
Removed other build-system changes (as requested).

Sat, Sep 23, 3:30 PM · Restricted Project, Restricted Project, Restricted Project, Restricted Project
jaredgrubb added inline comments to D145262: [clang-format] Treat AttributeMacros more like __attribute__.
Sat, Sep 23, 3:17 PM · Restricted Project, Restricted Project, Restricted Project
jaredgrubb updated the diff for D145262: [clang-format] Treat AttributeMacros more like __attribute__.

Hopefully this will satisfy and we can merge! I didn't notice the Phabricator timeline and I'm hoping we can finish this before Oct 1.

Sat, Sep 23, 3:15 PM · Restricted Project, Restricted Project, Restricted Project

Jul 14 2023

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

Rebased (no other updates) to re-run build and hopefully get some eyes on this.

Jul 14 2023, 10:43 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project
jaredgrubb updated the diff for D146434: [clang-format] Fix support for ObjC blocks with pointer return types.

Address review comment and rebase to re-run tests. Intend to merge if everything is green! (If there are further comments, I will commit to address them!)

Jul 14 2023, 10:36 AM · Restricted Project, Restricted Project, Restricted Project
Herald added a reviewer for D146434: [clang-format] Fix support for ObjC blocks with pointer return types: rymiel.
Jul 14 2023, 10:34 AM · Restricted Project, Restricted Project, Restricted Project
jaredgrubb updated the diff for D145262: [clang-format] Treat AttributeMacros more like __attribute__.

Rebased and added a line to Release Notes, no other changes. Have requested this to be merged if all builds are green (since this patch has been approved).

Jul 14 2023, 10:14 AM · Restricted Project, Restricted Project, Restricted Project

Jun 7 2023

jaredgrubb added a comment to D150083: [clang-format] ObjCPropertyAttributeOrder to sort ObjC property attributes.

Are there any other comments on this patch? I would love to make this into clang-17!

Jun 7 2023, 2:32 PM · Restricted Project, Restricted Project, Restricted Project, Restricted Project

May 22 2023

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.

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

May 13 2023

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

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
May 13 2023, 3:18 PM · Restricted Project, Restricted Project, Restricted Project
jaredgrubb added inline comments to D145262: [clang-format] Treat AttributeMacros more like __attribute__.
May 13 2023, 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)
May 13 2023, 3:04 PM · Restricted Project, Restricted Project, Restricted Project, Restricted Project

May 7 2023

jaredgrubb added inline comments to D145262: [clang-format] Treat AttributeMacros more like __attribute__.
May 7 2023, 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!).

May 7 2023, 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.
May 7 2023, 9:16 PM · Restricted Project, Restricted Project, Restricted Project, Restricted Project
jaredgrubb requested review of D150083: [clang-format] ObjCPropertyAttributeOrder to sort ObjC property attributes.
May 7 2023, 9:02 PM · Restricted Project, Restricted Project, Restricted Project, Restricted Project
jaredgrubb updated the diff for D145262: [clang-format] Treat AttributeMacros more like __attribute__.

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 :)

May 7 2023, 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__.

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__.

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__.
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__.
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__.
  • 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__.

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__.

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__.

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__.
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