Page MenuHomePhabricator

shuaiwang (Shuai Wang)
User

Projects

User does not belong to any projects.

User Details

User Since
Feb 22 2016, 11:24 AM (178 w, 1 d)

Recent Activity

Feb 10 2019

shuaiwang added a comment to D54399: Move ExprMutationAnalyzer to Tooling/Analysis (1/3).

Hi @rsmith what do you think of just get this in since Eric is not responding? Or do you think I should run certain test to verify?

I'm having a déjà vu.
Wasn't there already an attempt to have EMA in clang proper,
and it was scrapped with reasoning along the lines of "it is slow by design"?
If yes, what changed? (one might expect that to be in the description..)

Feb 10 2019, 12:03 PM · Restricted Project

Feb 9 2019

Herald added a project to D54399: Move ExprMutationAnalyzer to Tooling/Analysis (1/3): Restricted Project.

Hi @rsmith what do you think of just get this in since Eric is not responding? Or do you think I should run certain test to verify?

Feb 9 2019, 5:25 PM · Restricted Project

Jan 23 2019

shuaiwang added a comment to D54399: Move ExprMutationAnalyzer to Tooling/Analysis (1/3).

Friendly ping @EricWF

Jan 23 2019, 4:08 PM · Restricted Project

Nov 23 2018

shuaiwang added a comment to D54399: Move ExprMutationAnalyzer to Tooling/Analysis (1/3).

Could you fix the modulemap (might amount to reverting the change Eric made in r342827? or maybe it's more involved than that) & validate that the modules build is working with this change (probably undo Eric's change, validate that you see the breakage that Eric was trying to fix, then apply your change & see if it clears up as well)?

Nov 23 2018, 12:45 AM · Restricted Project
shuaiwang updated subscribers of D54399: Move ExprMutationAnalyzer to Tooling/Analysis (1/3).
Nov 23 2018, 12:43 AM · Restricted Project

Nov 11 2018

shuaiwang added a parent revision for D54400: Move ExprMutationAnalyzer to Tooling/Analysis (2/3): D54399: Move ExprMutationAnalyzer to Tooling/Analysis (1/3).
Nov 11 2018, 2:05 PM
shuaiwang created D54400: Move ExprMutationAnalyzer to Tooling/Analysis (2/3).
Nov 11 2018, 2:05 PM
shuaiwang added a child revision for D54399: Move ExprMutationAnalyzer to Tooling/Analysis (1/3): D54400: Move ExprMutationAnalyzer to Tooling/Analysis (2/3).
Nov 11 2018, 2:05 PM · Restricted Project
shuaiwang added reviewers for D54399: Move ExprMutationAnalyzer to Tooling/Analysis (1/3): rsmith, dblaikie.
Nov 11 2018, 1:57 PM · Restricted Project
shuaiwang created D54399: Move ExprMutationAnalyzer to Tooling/Analysis (1/3).
Nov 11 2018, 1:52 PM · Restricted Project

Oct 6 2018

shuaiwang updated the diff for D52219: [analyzer] (1/n) Support pointee mutation analysis in ExprMutationAnalyzer..

Resolved review comments.

Oct 6 2018, 4:19 PM

Sep 25 2018

shuaiwang updated the diff for D52219: [analyzer] (1/n) Support pointee mutation analysis in ExprMutationAnalyzer..

Addressed review comments.

Sep 25 2018, 10:43 AM

Sep 24 2018

shuaiwang updated the diff for D52219: [analyzer] (1/n) Support pointee mutation analysis in ExprMutationAnalyzer..

Added test case place holder for cases that should be supported in later patches.

Sep 24 2018, 10:03 AM

Sep 22 2018

shuaiwang added inline comments to D52219: [analyzer] (1/n) Support pointee mutation analysis in ExprMutationAnalyzer..
Sep 22 2018, 10:37 AM

Sep 21 2018

shuaiwang updated the diff for D52219: [analyzer] (1/n) Support pointee mutation analysis in ExprMutationAnalyzer..

Addresses review comments.

Sep 21 2018, 10:12 PM
shuaiwang added inline comments to D52219: [analyzer] (1/n) Support pointee mutation analysis in ExprMutationAnalyzer..
Sep 21 2018, 10:12 PM

Sep 20 2018

shuaiwang added inline comments to D52219: [analyzer] (1/n) Support pointee mutation analysis in ExprMutationAnalyzer..
Sep 20 2018, 9:30 AM

Sep 19 2018

shuaiwang added inline comments to D52219: [analyzer] (1/n) Support pointee mutation analysis in ExprMutationAnalyzer..
Sep 19 2018, 10:35 PM
shuaiwang committed rL342586: [NFC] Declare instead of define non-void functions in unit tests..
[NFC] Declare instead of define non-void functions in unit tests.
Sep 19 2018, 1:29 PM
shuaiwang committed rC342586: [NFC] Declare instead of define non-void functions in unit tests..
[NFC] Declare instead of define non-void functions in unit tests.
Sep 19 2018, 1:29 PM
shuaiwang committed rC342562: [analyzer] Fix nullptr access when processing instantiated function in….
[analyzer] Fix nullptr access when processing instantiated function in…
Sep 19 2018, 11:02 AM
shuaiwang committed rL342562: [analyzer] Fix nullptr access when processing instantiated function in….
[analyzer] Fix nullptr access when processing instantiated function in…
Sep 19 2018, 11:02 AM

Sep 18 2018

shuaiwang added a comment to D52219: [analyzer] (1/n) Support pointee mutation analysis in ExprMutationAnalyzer..

Do you think it would be possible to the analysis for >const?< int ***-cases? (recursively checking through the pointer levels)

I think that should be possible, will do after single-layer pointee analysis is done. I believe we can build multi-layer analysis based on much of the single-layer analysis.

Sep 18 2018, 9:39 PM
shuaiwang updated the diff for D52219: [analyzer] (1/n) Support pointee mutation analysis in ExprMutationAnalyzer..

[WIP] Addressed some of review comments.

Sep 18 2018, 9:39 PM
shuaiwang updated the diff for D52219: [analyzer] (1/n) Support pointee mutation analysis in ExprMutationAnalyzer..

Rebase

Sep 18 2018, 9:07 PM
shuaiwang committed rL342525: [NFC] Fix uncompilable test cases of ExprMutationAnalyzer..
[NFC] Fix uncompilable test cases of ExprMutationAnalyzer.
Sep 18 2018, 8:55 PM
shuaiwang committed rC342525: [NFC] Fix uncompilable test cases of ExprMutationAnalyzer..
[NFC] Fix uncompilable test cases of ExprMutationAnalyzer.
Sep 18 2018, 8:55 PM

Sep 17 2018

shuaiwang created D52219: [analyzer] (1/n) Support pointee mutation analysis in ExprMutationAnalyzer..
Sep 17 2018, 10:53 PM
shuaiwang added a comment to rCTE342403: [clang-tidy] Remove duplicated logic in UnnecessaryValueParamCheck and use….

@shuaiwang This patch introduces test failures for std::move not considered as a mutation.
Adding move operations to Mutable did not change that. Could you take a look at it? What happens if Move operations are defaulted, does the EMA analyze still correct?

Sep 17 2018, 2:37 PM
shuaiwang committed rCTE342417: [clang-tidy] Fix tests for performance-for-range-copy.
[clang-tidy] Fix tests for performance-for-range-copy
Sep 17 2018, 2:30 PM
shuaiwang committed rL342417: [clang-tidy] Fix tests for performance-for-range-copy.
[clang-tidy] Fix tests for performance-for-range-copy
Sep 17 2018, 2:30 PM
shuaiwang committed rL342409: [analyzer] Treat std::{move,forward} as casts in ExprMutationAnalyzer..
[analyzer] Treat std::{move,forward} as casts in ExprMutationAnalyzer.
Sep 17 2018, 1:14 PM
shuaiwang committed rC342409: [analyzer] Treat std::{move,forward} as casts in ExprMutationAnalyzer..
[analyzer] Treat std::{move,forward} as casts in ExprMutationAnalyzer.
Sep 17 2018, 1:14 PM
shuaiwang closed D52120: [analyzer] Treat std::{move,forward} as casts in ExprMutationAnalyzer..
Sep 17 2018, 1:14 PM
shuaiwang closed D52120: [analyzer] Treat std::{move,forward} as casts in ExprMutationAnalyzer..
Sep 17 2018, 1:14 PM
shuaiwang committed rCTE342408: Fix build failure caused by D52157.
Fix build failure caused by D52157
Sep 17 2018, 1:14 PM
shuaiwang committed rL342408: Fix build failure caused by D52157.
Fix build failure caused by D52157
Sep 17 2018, 1:13 PM
shuaiwang updated the diff for D52120: [analyzer] Treat std::{move,forward} as casts in ExprMutationAnalyzer..

Added test case with copy-ctor & assignment operator taking value as param.

Sep 17 2018, 11:56 AM
shuaiwang committed rC342407: [ASTMatchers] Let isArrow also support UnresolvedMemberExpr….
[ASTMatchers] Let isArrow also support UnresolvedMemberExpr…
Sep 17 2018, 11:50 AM
shuaiwang committed rL342407: [ASTMatchers] Let isArrow also support UnresolvedMemberExpr….
[ASTMatchers] Let isArrow also support UnresolvedMemberExpr…
Sep 17 2018, 11:50 AM
shuaiwang closed D52157: [ASTMatchers] Let isArrow also support UnresolvedMemberExpr, CXXDependentScopeMemberExpr.
Sep 17 2018, 11:50 AM
shuaiwang updated the diff for D52157: [ASTMatchers] Let isArrow also support UnresolvedMemberExpr, CXXDependentScopeMemberExpr.

Addressed review comment.

Sep 17 2018, 11:50 AM
shuaiwang committed rCTE342403: [clang-tidy] Remove duplicated logic in UnnecessaryValueParamCheck and use….
[clang-tidy] Remove duplicated logic in UnnecessaryValueParamCheck and use…
Sep 17 2018, 11:01 AM
shuaiwang committed rL342403: [clang-tidy] Remove duplicated logic in UnnecessaryValueParamCheck and use….
[clang-tidy] Remove duplicated logic in UnnecessaryValueParamCheck and use…
Sep 17 2018, 11:01 AM
shuaiwang closed D52158: [clang-tidy] Remove duplicated logic in UnnecessaryValueParamCheck and use FunctionParmMutationAnalyzer instead..
Sep 17 2018, 11:01 AM

Sep 16 2018

shuaiwang created D52158: [clang-tidy] Remove duplicated logic in UnnecessaryValueParamCheck and use FunctionParmMutationAnalyzer instead..
Sep 16 2018, 3:59 PM
shuaiwang created D52157: [ASTMatchers] Let isArrow also support UnresolvedMemberExpr, CXXDependentScopeMemberExpr.
Sep 16 2018, 3:39 PM
shuaiwang committed rC342353: [NFC] Minor refactoring to setup the stage for supporting pointers in….
[NFC] Minor refactoring to setup the stage for supporting pointers in…
Sep 16 2018, 2:11 PM
shuaiwang committed rL342353: [NFC] Minor refactoring to setup the stage for supporting pointers in….
[NFC] Minor refactoring to setup the stage for supporting pointers in…
Sep 16 2018, 2:11 PM
shuaiwang updated the diff for D52120: [analyzer] Treat std::{move,forward} as casts in ExprMutationAnalyzer..

Added more test cases around std::move

Sep 16 2018, 10:41 AM
shuaiwang added inline comments to D52120: [analyzer] Treat std::{move,forward} as casts in ExprMutationAnalyzer..
Sep 16 2018, 10:40 AM

Sep 15 2018

shuaiwang committed rC342340: [NFC] cosmetic tweaks to ExprMutationAnalyzer to be more consistent.
[NFC] cosmetic tweaks to ExprMutationAnalyzer to be more consistent
Sep 15 2018, 2:40 PM
shuaiwang committed rL342340: [NFC] cosmetic tweaks to ExprMutationAnalyzer to be more consistent.
[NFC] cosmetic tweaks to ExprMutationAnalyzer to be more consistent
Sep 15 2018, 2:39 PM

Sep 14 2018

shuaiwang added a comment to D52120: [analyzer] Treat std::{move,forward} as casts in ExprMutationAnalyzer..

@lebedev.ri could you help test whether this fully resolves PR38891? Thanks!

Sep 14 2018, 1:31 PM
shuaiwang updated the summary of D52120: [analyzer] Treat std::{move,forward} as casts in ExprMutationAnalyzer..
Sep 14 2018, 1:16 PM
shuaiwang created D52120: [analyzer] Treat std::{move,forward} as casts in ExprMutationAnalyzer..
Sep 14 2018, 1:16 PM
shuaiwang committed rC342271: [analyzer] Handle forwarding reference better in ExprMutationAnalyzer..
[analyzer] Handle forwarding reference better in ExprMutationAnalyzer.
Sep 14 2018, 1:10 PM
shuaiwang committed rL342271: [analyzer] Handle forwarding reference better in ExprMutationAnalyzer..
[analyzer] Handle forwarding reference better in ExprMutationAnalyzer.
Sep 14 2018, 1:10 PM
shuaiwang closed D52008: [analyzer] Handle forwarding reference better in ExprMutationAnalyzer..
Sep 14 2018, 1:10 PM
shuaiwang added a comment to D52008: [analyzer] Handle forwarding reference better in ExprMutationAnalyzer..

The std::move as cast is a follow up patch?

Yes I'll send a follow up patch.

Sep 14 2018, 11:31 AM
shuaiwang updated the diff for D52008: [analyzer] Handle forwarding reference better in ExprMutationAnalyzer..

Addressed review comments.

Sep 14 2018, 11:31 AM
shuaiwang committed rC342246: Remove PseudoConstantAnalysis.
Remove PseudoConstantAnalysis
Sep 14 2018, 10:31 AM
shuaiwang committed rL342246: Remove PseudoConstantAnalysis.
Remove PseudoConstantAnalysis
Sep 14 2018, 10:31 AM
shuaiwang closed D51946: [analyzer] Remove PseudoConstantAnalysis.
Sep 14 2018, 10:31 AM

Sep 13 2018

shuaiwang added a comment to D52008: [analyzer] Handle forwarding reference better in ExprMutationAnalyzer..

Thanks for working on this! I tried, and it appears to not fix the issue at hand.

  • ` struct C1 { C1(const C1* c, int num); };

    int x = 0; auto y = std::make_unique<C1>(nullptr, x); <- still considered a mutation? ` * ` struct C3 {}; some class

    struct C2 { C2(const int* whatever, int n, C3 zz); };

    int x = 0; std::vector<C2> v; v.emplace_back(nullptr, x, {}); // <- still considered a mutation? `

    And so on. These are hand-reduced, so hopefully you can reproduce?

I've patched D51870 and tried these cases, they work correctly with this change plus the change making std::move & std::forward considered casts. I also tested

struct D {
  D(int&);
};
void h() {
  std::vector<D> v;
  for (int i = 0; i < 10; ++i) {
    v.emplace_back(i);
  }
}

and that's also correctly considered as mutation at emplace_back

Sep 13 2018, 9:55 PM
shuaiwang updated the diff for D52008: [analyzer] Handle forwarding reference better in ExprMutationAnalyzer..

More test cases addressing review comments

Sep 13 2018, 9:55 PM
shuaiwang added a comment to D52008: [analyzer] Handle forwarding reference better in ExprMutationAnalyzer..

Just some quick comments, I'll take a deeper look into other comments later.

Sep 13 2018, 10:36 AM
shuaiwang updated the summary of D52008: [analyzer] Handle forwarding reference better in ExprMutationAnalyzer..
Sep 13 2018, 10:30 AM

Sep 12 2018

shuaiwang created D52008: [analyzer] Handle forwarding reference better in ExprMutationAnalyzer..
Sep 12 2018, 5:45 PM

Sep 11 2018

shuaiwang committed rL342012: [NFC] Fix build breakage due to missing dep caused by D51950.
[NFC] Fix build breakage due to missing dep caused by D51950
Sep 11 2018, 5:33 PM
shuaiwang committed rCTE342012: [NFC] Fix build breakage due to missing dep caused by D51950.
[NFC] Fix build breakage due to missing dep caused by D51950
Sep 11 2018, 5:33 PM
shuaiwang committed rL342006: [clangtidy] Remove old copy of ExprMutationAnalyzer.
[clangtidy] Remove old copy of ExprMutationAnalyzer
Sep 11 2018, 4:01 PM
shuaiwang committed rCTE342006: [clangtidy] Remove old copy of ExprMutationAnalyzer.
[clangtidy] Remove old copy of ExprMutationAnalyzer
Sep 11 2018, 4:01 PM
shuaiwang closed D51950: [clangtidy] Remove old copy of ExprMutationAnalyzer.
Sep 11 2018, 4:00 PM
shuaiwang committed rL342005: [NFC] Fix build breakage caused by D51948.
[NFC] Fix build breakage caused by D51948
Sep 11 2018, 3:42 PM
shuaiwang committed rC342005: [NFC] Fix build breakage caused by D51948.
[NFC] Fix build breakage caused by D51948
Sep 11 2018, 3:42 PM
shuaiwang created D51950: [clangtidy] Remove old copy of ExprMutationAnalyzer.
Sep 11 2018, 2:43 PM
shuaiwang committed rL341994: [analyzer] Add ExprMutationAnalyzer.
[analyzer] Add ExprMutationAnalyzer
Sep 11 2018, 2:14 PM
shuaiwang committed rC341994: [analyzer] Add ExprMutationAnalyzer.
[analyzer] Add ExprMutationAnalyzer
Sep 11 2018, 2:14 PM
shuaiwang closed D51948: [analyzer] Add ExprMutationAnalyzer.
Sep 11 2018, 2:14 PM · Restricted Project
shuaiwang closed D51948: [analyzer] Add ExprMutationAnalyzer.
Sep 11 2018, 2:14 PM · Restricted Project
shuaiwang created D51948: [analyzer] Add ExprMutationAnalyzer.
Sep 11 2018, 2:07 PM · Restricted Project
shuaiwang retitled D51946: [analyzer] Remove PseudoConstantAnalysis from Remove PseudoConstantAnalysis to [analyzer] Remove PseudoConstantAnalysis.
Sep 11 2018, 1:22 PM
shuaiwang created D51946: [analyzer] Remove PseudoConstantAnalysis.
Sep 11 2018, 1:16 PM
shuaiwang committed rCTE341986: [clang-tidy] Handle sugared reference types in ExprMutationAnalyzer.
[clang-tidy] Handle sugared reference types in ExprMutationAnalyzer
Sep 11 2018, 1:10 PM
shuaiwang committed rL341986: [clang-tidy] Handle sugared reference types in ExprMutationAnalyzer.
[clang-tidy] Handle sugared reference types in ExprMutationAnalyzer
Sep 11 2018, 1:09 PM
shuaiwang closed D50953: [clang-tidy] Handle sugared reference types in ExprMutationAnalyzer.
Sep 11 2018, 1:09 PM
shuaiwang updated the diff for D50953: [clang-tidy] Handle sugared reference types in ExprMutationAnalyzer.

More test cases:

  • Mutating pointers
  • Const values
Sep 11 2018, 11:41 AM
shuaiwang added a comment to D50953: [clang-tidy] Handle sugared reference types in ExprMutationAnalyzer.

What happens to pointers in a typedef (in the sense of * instead of &)?

I checked around and I believe reference type is the only type we're explicitly matching right now. We'll need to handle carefully when handling pointer types in the future.

We match on pointers as values. So figure this out int * >const< ptr = nullptr.
And the constness transformation is especially intersting for pointer typedefs, because in typedef int * IntPtr; const IntPtr p1; IntPtr const p2; p1 and p2 are different things. It would be nice if you could check, that the value semantic of the pointer is detected through the typedef as well.

Sep 11 2018, 11:03 AM
shuaiwang updated the diff for D50953: [clang-tidy] Handle sugared reference types in ExprMutationAnalyzer.

more test cases

Sep 11 2018, 10:56 AM
shuaiwang committed rL341967: [clang-tidy] Handle unique owning smart pointers in ExprMutationAnalyzer.
[clang-tidy] Handle unique owning smart pointers in ExprMutationAnalyzer
Sep 11 2018, 10:38 AM
shuaiwang committed rCTE341967: [clang-tidy] Handle unique owning smart pointers in ExprMutationAnalyzer.
[clang-tidy] Handle unique owning smart pointers in ExprMutationAnalyzer
Sep 11 2018, 10:38 AM
shuaiwang closed D50883: [clang-tidy] Handle unique owning smart pointers in ExprMutationAnalyzer.
Sep 11 2018, 10:38 AM
shuaiwang added a comment to D50883: [clang-tidy] Handle unique owning smart pointers in ExprMutationAnalyzer.

Yeah let's see what happens in the wild and decide whether we need further actions. In any case I think that deserves a separate diff.
Is there other concerns about this diff?

Sep 11 2018, 10:07 AM
shuaiwang added inline comments to D50883: [clang-tidy] Handle unique owning smart pointers in ExprMutationAnalyzer.
Sep 11 2018, 9:15 AM

Sep 10 2018

shuaiwang added inline comments to D50883: [clang-tidy] Handle unique owning smart pointers in ExprMutationAnalyzer.
Sep 10 2018, 11:15 PM
shuaiwang updated the diff for D50883: [clang-tidy] Handle unique owning smart pointers in ExprMutationAnalyzer.

rebase & add test case

Sep 10 2018, 11:15 PM
shuaiwang added a comment to D50953: [clang-tidy] Handle sugared reference types in ExprMutationAnalyzer.

What happens to pointers in a typedef (in the sense of * instead of &)?

I checked around and I believe reference type is the only type we're explicitly matching right now. We'll need to handle carefully when handling pointer types in the future.

Sep 10 2018, 10:29 PM
shuaiwang updated the diff for D50953: [clang-tidy] Handle sugared reference types in ExprMutationAnalyzer.

more test cases.

Sep 10 2018, 10:29 PM
shuaiwang committed rCTE341891: Revert "Revert "[clang-tidy] Handle unresolved expressions in….
Revert "Revert "[clang-tidy] Handle unresolved expressions in…
Sep 10 2018, 7:25 PM