Page MenuHomePhabricator

Wizard (Yan Zhang)
Software Engineer

Projects

User does not belong to any projects.

User Details

User Since
Oct 20 2017, 1:37 PM (91 w, 2 d)

Recent Activity

Mar 14 2019

Wizard committed rG787a7734982f: Fixed global constant/variable naming check on C++ class for ObjC++ files. (authored by Wizard).
Fixed global constant/variable naming check on C++ class for ObjC++ files.
Mar 14 2019, 5:17 PM
Wizard committed rCTE356220: Fixed global constant/variable naming check on C++ class for ObjC++ files..
Fixed global constant/variable naming check on C++ class for ObjC++ files.
Mar 14 2019, 5:17 PM
Wizard committed rL356220: Fixed global constant/variable naming check on C++ class for ObjC++ files..
Fixed global constant/variable naming check on C++ class for ObjC++ files.
Mar 14 2019, 5:16 PM
Wizard closed D59283: Fixed global constant/variable naming check on C++ class for ObjC++ files..
Mar 14 2019, 5:16 PM · Restricted Project, Restricted Project
Wizard updated the diff for D59283: Fixed global constant/variable naming check on C++ class for ObjC++ files..

add new line

Mar 14 2019, 4:19 PM · Restricted Project, Restricted Project

Mar 13 2019

Wizard updated the diff for D59283: Fixed global constant/variable naming check on C++ class for ObjC++ files..

fix ObjC++ test

Mar 13 2019, 11:47 AM · Restricted Project, Restricted Project
Wizard updated the diff for D59283: Fixed global constant/variable naming check on C++ class for ObjC++ files..

Resolve comments

Mar 13 2019, 11:46 AM · Restricted Project, Restricted Project

Mar 12 2019

Wizard updated the summary of D59283: Fixed global constant/variable naming check on C++ class for ObjC++ files..
Mar 12 2019, 7:24 PM · Restricted Project, Restricted Project
Wizard created D59283: Fixed global constant/variable naming check on C++ class for ObjC++ files..
Mar 12 2019, 7:22 PM · Restricted Project, Restricted Project

Feb 20 2019

Wizard committed rG19bceda8790e: Update property prefix regex to allow numbers. (authored by Wizard).
Update property prefix regex to allow numbers.
Feb 20 2019, 9:32 AM
Wizard committed rCTE354485: Update property prefix regex to allow numbers..
Update property prefix regex to allow numbers.
Feb 20 2019, 9:32 AM
Wizard committed rL354485: Update property prefix regex to allow numbers..
Update property prefix regex to allow numbers.
Feb 20 2019, 9:32 AM
Wizard closed D56896: Update property prefix regex to allow numbers..
Feb 20 2019, 9:32 AM · Restricted Project

Jan 17 2019

Wizard updated the summary of D56896: Update property prefix regex to allow numbers..
Jan 17 2019, 7:17 PM · Restricted Project
Wizard created D56896: Update property prefix regex to allow numbers..
Jan 17 2019, 7:17 PM · Restricted Project

Dec 4 2018

Wizard accepted D51832: [clang-tidy/checks] Update objc-property-declaration check to allow arbitrary acronyms and initialisms 🔧.
Dec 4 2018, 7:39 PM

Nov 9 2018

Wizard committed rC346566: Fix ClangFormat issue of recognizing ObjC subscript as C++ attributes when….
Fix ClangFormat issue of recognizing ObjC subscript as C++ attributes when…
Nov 9 2018, 3:21 PM
Wizard committed rL346566: Fix ClangFormat issue of recognizing ObjC subscript as C++ attributes when….
Fix ClangFormat issue of recognizing ObjC subscript as C++ attributes when…
Nov 9 2018, 3:21 PM
Wizard closed D54288: Fix ClangFormat issue of recognizing ObjC subscript as C++ attributes when message target is a result of a C-style method..
Nov 9 2018, 3:21 PM
Wizard closed D54288: Fix ClangFormat issue of recognizing ObjC subscript as C++ attributes when message target is a result of a C-style method..
Nov 9 2018, 3:21 PM

Nov 8 2018

Wizard updated the diff for D54288: Fix ClangFormat issue of recognizing ObjC subscript as C++ attributes when message target is a result of a C-style method..

remove blank lines

Nov 8 2018, 6:49 PM
Wizard retitled D54288: Fix ClangFormat issue of recognizing ObjC subscript as C++ attributes when message target is a result of a C-style method. from Fix ClangFormat issue of recognizing ObjC subscription as C++ attributes when message target is a result of a C-style method. to Fix ClangFormat issue of recognizing ObjC subscript as C++ attributes when message target is a result of a C-style method..
Nov 8 2018, 6:46 PM
Wizard created D54288: Fix ClangFormat issue of recognizing ObjC subscript as C++ attributes when message target is a result of a C-style method..
Nov 8 2018, 6:41 PM

Nov 1 2018

Wizard committed rCTE345858: Fix the issue that not recognizing single acronym with prefix as ObjC property….
Fix the issue that not recognizing single acronym with prefix as ObjC property…
Nov 1 2018, 10:40 AM
Wizard committed rL345858: Fix the issue that not recognizing single acronym with prefix as ObjC property….
Fix the issue that not recognizing single acronym with prefix as ObjC property…
Nov 1 2018, 10:38 AM
Wizard closed D53955: Fix the issue that not recognizing single acronym with prefix as ObjC property name..
Nov 1 2018, 10:38 AM
Wizard updated the diff for D53955: Fix the issue that not recognizing single acronym with prefix as ObjC property name..

format change

Nov 1 2018, 10:35 AM
Wizard updated the diff for D53955: Fix the issue that not recognizing single acronym with prefix as ObjC property name..

Format code.

Nov 1 2018, 10:34 AM

Oct 31 2018

Wizard retitled D53955: Fix the issue that not recognizing single acronym with prefix as ObjC property name. from :Fix the issue that not recognizing single acronym with prefix as ObjC property name. to Fix the issue that not recognizing single acronym with prefix as ObjC property name..
Oct 31 2018, 3:52 PM
Wizard updated the summary of D53955: Fix the issue that not recognizing single acronym with prefix as ObjC property name..
Oct 31 2018, 3:52 PM
Wizard created D53955: Fix the issue that not recognizing single acronym with prefix as ObjC property name..
Oct 31 2018, 3:48 PM

Sep 4 2018

Wizard added inline comments to D51575: [clang-tidy/checks] Implement a clang-tidy check to verify Google Objective-C function naming conventions 📜.
Sep 4 2018, 1:13 PM · Restricted Project

Jul 11 2018

Wizard accepted D49190: [clang-tidy/ObjC] Add SQL to list of acronyms.
Jul 11 2018, 10:52 AM

Jun 27 2018

Wizard accepted D48652: [clang-tidy/ObjC] Add hashing algorithm acronyms to objc-property-declaration.
Jun 27 2018, 11:05 AM

Jun 11 2018

Wizard committed rCTE334448: - Add "AV" as new default acronym. - Add support for "I" and "A" in….
- Add "AV" as new default acronym. - Add support for "I" and "A" in…
Jun 11 2018, 3:50 PM
Wizard committed rL334448: - Add "AV" as new default acronym. - Add support for "I" and "A" in….
- Add "AV" as new default acronym. - Add support for "I" and "A" in…
Jun 11 2018, 3:50 PM
Wizard closed D48039: - Add "AV" as new default acronym. - Add support for "I" and "A" in lowerCamelCase pattern.
Jun 11 2018, 3:50 PM
Wizard updated the summary of D48039: - Add "AV" as new default acronym. - Add support for "I" and "A" in lowerCamelCase pattern.
Jun 11 2018, 11:19 AM
Wizard created D48039: - Add "AV" as new default acronym. - Add support for "I" and "A" in lowerCamelCase pattern.
Jun 11 2018, 11:19 AM

May 25 2018

Wizard accepted D46922: [checks/property-decls] Fix comment in clang-tidy/objc/PropertyDeclarationCheck.cpp ✍️.
May 25 2018, 5:12 PM

May 18 2018

Wizard added a comment to D44539: [Sema][Objective-C] Add check to warn when property of objc type has assign attribute.

Is there any case for property of ObjC types that we should use unsafe_unretained or assign rather than weak? In my understanding, weak is for properties of ObjC types as the replacement of unsafe_unretained and assign is for properties of primitive types.

May 18 2018, 2:18 PM · Restricted Project

May 15 2018

Wizard committed rL332382: add AR to acronyms of clang-tidy property check.
add AR to acronyms of clang-tidy property check
May 15 2018, 11:17 AM
Wizard committed rCTE332382: add AR to acronyms of clang-tidy property check.
add AR to acronyms of clang-tidy property check
May 15 2018, 11:17 AM
Wizard closed D46895: add AR to acronyms of clang-tidy property check.
May 15 2018, 11:17 AM
Wizard added reviewers for D46895: add AR to acronyms of clang-tidy property check: hokein, benhamilton.
May 15 2018, 10:28 AM
Wizard created D46895: add AR to acronyms of clang-tidy property check.
May 15 2018, 10:27 AM

May 9 2018

Wizard accepted D46659: [clang-tidy/google-readability-casting] Disable check for Objective-C++.
May 9 2018, 12:55 PM

May 4 2018

Wizard committed rCTE331545: Add support for ObjC property name to be a single acronym..
Add support for ObjC property name to be a single acronym.
May 4 2018, 11:17 AM
Wizard committed rL331545: Add support for ObjC property name to be a single acronym..
Add support for ObjC property name to be a single acronym.
May 4 2018, 11:17 AM
Wizard closed D46374: Add support for ObjC property name to be a single acronym..
May 4 2018, 11:17 AM · Restricted Project
Wizard added inline comments to D46374: Add support for ObjC property name to be a single acronym..
May 4 2018, 11:15 AM · Restricted Project
Wizard updated the diff for D46374: Add support for ObjC property name to be a single acronym..

optimize matching

May 4 2018, 11:14 AM · Restricted Project

May 3 2018

Wizard updated the diff for D46374: Add support for ObjC property name to be a single acronym..

resolve comments

May 3 2018, 9:01 PM · Restricted Project
Wizard added inline comments to D46374: Add support for ObjC property name to be a single acronym..
May 3 2018, 9:01 PM · Restricted Project
Wizard added inline comments to D46374: Add support for ObjC property name to be a single acronym..
May 3 2018, 1:48 PM · Restricted Project

May 2 2018

Wizard updated the diff for D46374: Add support for ObjC property name to be a single acronym..

fix format

May 2 2018, 6:48 PM · Restricted Project
Wizard updated the summary of D46374: Add support for ObjC property name to be a single acronym..
May 2 2018, 6:46 PM · Restricted Project
Wizard created D46374: Add support for ObjC property name to be a single acronym..
May 2 2018, 6:44 PM · Restricted Project

Apr 28 2018

Wizard accepted D46206: [clang-tidy] Add Apple prefix acronyms to objc-property-declaration.
Apr 28 2018, 3:26 PM

Apr 22 2018

Wizard committed rL330562: update readability-identifier-naming-objc test to use interface ivar..
update readability-identifier-naming-objc test to use interface ivar.
Apr 22 2018, 6:08 PM
Wizard committed rCTE330562: update readability-identifier-naming-objc test to use interface ivar..
update readability-identifier-naming-objc test to use interface ivar.
Apr 22 2018, 6:08 PM
Wizard closed D45936: update readability-identifier-naming-objc test to use interface ivar. Implementation ivars are not supported in 32-bits OS..
Apr 22 2018, 6:08 PM
Wizard added reviewers for D45936: update readability-identifier-naming-objc test to use interface ivar. Implementation ivars are not supported in 32-bits OS.: alexfh, chandlerc.
Apr 22 2018, 5:44 PM
Wizard created D45936: update readability-identifier-naming-objc test to use interface ivar. Implementation ivars are not supported in 32-bits OS..
Apr 22 2018, 5:42 PM
Wizard committed rCTE330559: update test to use ivar in implementation instead of class extension.
update test to use ivar in implementation instead of class extension
Apr 22 2018, 5:21 PM
Wizard committed rL330559: update test to use ivar in implementation instead of class extension.
update test to use ivar in implementation instead of class extension
Apr 22 2018, 5:18 PM
Wizard closed D45912: update test to use ivar in implementation instead of class extension.
Apr 22 2018, 5:18 PM
Wizard updated the diff for D45912: update test to use ivar in implementation instead of class extension.

add back objc update for identifier naming check.

Apr 22 2018, 5:14 PM

Apr 20 2018

Wizard updated the summary of D45912: update test to use ivar in implementation instead of class extension.
Apr 20 2018, 5:34 PM
Wizard created D45912: update test to use ivar in implementation instead of class extension.
Apr 20 2018, 5:33 PM
Wizard committed rL330492: [clang-tidy] add new check to find out objc ivars which do not have prefix '_'.
[clang-tidy] add new check to find out objc ivars which do not have prefix '_'
Apr 20 2018, 4:21 PM
Wizard committed rCTE330492: [clang-tidy] add new check to find out objc ivars which do not have prefix '_'.
[clang-tidy] add new check to find out objc ivars which do not have prefix '_'
Apr 20 2018, 4:21 PM
Wizard closed D45392: [clang-tidy] add new check to find out objc ivars which do not have prefix '_'.
Apr 20 2018, 4:21 PM · Restricted Project

Apr 18 2018

Wizard committed rCTE330286: add extra acronyms for objc property names.
add extra acronyms for objc property names
Apr 18 2018, 1:12 PM
Wizard committed rL330286: add extra acronyms for objc property names.
add extra acronyms for objc property names
Apr 18 2018, 1:12 PM
Wizard closed D45750: add extra acronyms for objc property names.
Apr 18 2018, 1:12 PM
Wizard added inline comments to D45750: add extra acronyms for objc property names.
Apr 18 2018, 1:05 PM
Wizard updated the diff for D45750: add extra acronyms for objc property names.

resolve comments

Apr 18 2018, 1:05 PM

Apr 17 2018

Wizard updated the summary of D45750: add extra acronyms for objc property names.
Apr 17 2018, 4:44 PM
Wizard created D45750: add extra acronyms for objc property names.
Apr 17 2018, 4:43 PM

Apr 12 2018

Wizard added inline comments to D45392: [clang-tidy] add new check to find out objc ivars which do not have prefix '_'.
Apr 12 2018, 11:12 AM · Restricted Project

Apr 11 2018

Wizard added inline comments to D45392: [clang-tidy] add new check to find out objc ivars which do not have prefix '_'.
Apr 11 2018, 12:01 PM · Restricted Project
Wizard updated the diff for D45392: [clang-tidy] add new check to find out objc ivars which do not have prefix '_'.

remove unnecessary flags

Apr 11 2018, 11:58 AM · Restricted Project

Apr 10 2018

Wizard added a comment to D45392: [clang-tidy] add new check to find out objc ivars which do not have prefix '_'.

I wonder whether the readability-identifier-naming check could be extended to support this use case instead of adding a new check specifically for underscores in ivar names?

Hmm readability-identifier-naming is a C++ check but this one is only for ObjC. I prefer putting them in separate places unless they work for both languages.

I see no reasons why this check can't work for ObjC, if the handling of ObjC-specific AST nodes is added to it.

Moreover, readability-identifier-naming always runs all matchers and apply the same checks on all identifiers.

It has some sort of a hierarchical structure of rules that allow it to only touch a certain subset of identifiers. E.g. configure different naming styles for local variables and local constants. What it's lacking is a good documentation for all of these options =\

We have to change at least part of the structure to make it applicable for this check.

Yes, the existing check may need some modifications to do what this check needs to do, but I'd expect these modifications to be quite small, and we would potentially get a much more useful and generic tool instead of "one check per type of named entity per naming style" situation.

And readability-identifier-naming is not in google default clang-tidy check list yet. We will even need more work to import it.

IIUC, it can be configured to only verify certain kinds of named entities. Thus there's no requirement to make it work with every aspect of our naming rules.

So I think creating a new simple ObjC-specific check is a better way here.

I'll respectfully disagree here. I would prefer to have a generic solution, if it's feasible. And so far, it looks like it is.

Apr 10 2018, 6:08 PM · Restricted Project
Wizard updated the diff for D45392: [clang-tidy] add new check to find out objc ivars which do not have prefix '_'.

move check to readability-identifier-naming

Apr 10 2018, 6:06 PM · Restricted Project

Apr 9 2018

Wizard added a comment to D45392: [clang-tidy] add new check to find out objc ivars which do not have prefix '_'.

I wonder whether the readability-identifier-naming check could be extended to support this use case instead of adding a new check specifically for underscores in ivar names?

Apr 9 2018, 11:07 AM · Restricted Project

Apr 8 2018

Wizard updated the diff for D45392: [clang-tidy] add new check to find out objc ivars which do not have prefix '_'.

reorder release note for alphabetical order

Apr 8 2018, 4:11 PM · Restricted Project
Wizard added a comment to D45392: [clang-tidy] add new check to find out objc ivars which do not have prefix '_'.

If this is Apple guideline, check name should reflect this. I think will be good idea to have general check for Apple naming conventions instead of separate checks for specific situations like objc-ivar-declaration and objc-property-declaration.

Thanks for the suggestion. I understand your point that they are both naming convention, however, they are about different components and using totally different naming rules. PropertyDeclarationCheck is already a very complicated check (the most complicated one for ObjC), I would rather not make it more heavy and try my best to split independent logic to different checks.

See readability-identifier-naming as example of multiple rules in one check.

I took a look at IdentifierNamingCheck. Here's my thought:

  1. IdentifierNamingCheck is trying to apply configurable naming convention to C++ identifiers, and all the identifiers will share the same style set. That is not the case of ObjC, where we follow Apple's programming guide, and different types of identifiers are using different style.
  2. Such pattern can handle complicated requirements but to me it is not simple enough to read and maintain. I would rather keep things simple and clear as long as we have choice.

    However, this check provides a good example of refactoring if in the future we have the needs of organizing complicated naming styles. Moving from simplicity to complexity is always easier. Thanks for pointing this out for us.

My point is not flexibility of configuration, but handling of various types of identifiers in same check, even if conventions are different.

Apr 8 2018, 12:15 PM · Restricted Project

Apr 7 2018

Wizard added a comment to D45392: [clang-tidy] add new check to find out objc ivars which do not have prefix '_'.

If this is Apple guideline, check name should reflect this. I think will be good idea to have general check for Apple naming conventions instead of separate checks for specific situations like objc-ivar-declaration and objc-property-declaration.

Thanks for the suggestion. I understand your point that they are both naming convention, however, they are about different components and using totally different naming rules. PropertyDeclarationCheck is already a very complicated check (the most complicated one for ObjC), I would rather not make it more heavy and try my best to split independent logic to different checks.

See readability-identifier-naming as example of multiple rules in one check.

Apr 7 2018, 11:34 PM · Restricted Project
Wizard updated the diff for D45392: [clang-tidy] add new check to find out objc ivars which do not have prefix '_'.

resolve comments

Apr 7 2018, 7:45 PM · Restricted Project
Wizard added a comment to D45392: [clang-tidy] add new check to find out objc ivars which do not have prefix '_'.

If this is Apple guideline, check name should reflect this. I think will be good idea to have general check for Apple naming conventions instead of separate checks for specific situations like objc-ivar-declaration and objc-property-declaration.

Apr 7 2018, 7:43 PM · Restricted Project

Apr 6 2018

Wizard updated the summary of D45392: [clang-tidy] add new check to find out objc ivars which do not have prefix '_'.
Apr 6 2018, 3:42 PM · Restricted Project
Wizard updated the diff for D45392: [clang-tidy] add new check to find out objc ivars which do not have prefix '_'.

fix doc

Apr 6 2018, 3:42 PM · Restricted Project
Wizard created D45392: [clang-tidy] add new check to find out objc ivars which do not have prefix '_'.
Apr 6 2018, 3:38 PM · Restricted Project

Mar 21 2018

Wizard added a comment to D44634: [clang-format] Detect Objective-C for #import <Foundation/Foundation.h>.

For some ObjC headers it uses #import to import other headers instead of system framework, so I think we should also detect #import "*.h" as well.

Mar 21 2018, 1:58 PM
Wizard added a comment to D44634: [clang-format] Detect Objective-C for #import <Foundation/Foundation.h>.
Mar 21 2018, 1:27 PM

Mar 19 2018

Wizard accepted D44638: [clang-format] Fix ObjC selectors with multiple params passed to macro.
Mar 19 2018, 4:00 PM

Mar 7 2018

Wizard committed rL326928: do not register matcher for objc-only checks when analyzing non-objc sources to….
do not register matcher for objc-only checks when analyzing non-objc sources to…
Mar 7 2018, 11:02 AM
Wizard committed rCTE326928: do not register matcher for objc-only checks when analyzing non-objc sources to….
do not register matcher for objc-only checks when analyzing non-objc sources to…
Mar 7 2018, 11:02 AM
Wizard closed D44174: do not register matcher for objc-only checks when analyzing non-objc sources to save resources.
Mar 7 2018, 11:02 AM