Re: r342827 - Fix modules build with shared library.

2018-11-06 Thread Shuai Wang via cfe-commits
r, that seems like a reasonable home for it, but libTooling would >> also make some sense (perhaps a new subdirectory Tooling/Analysis), since >> it's only performing AST matching, not a flow-sensitive / path-sensitive >> static analysis. >> >> On Tue, Oct 2, 2018 at 2:44 PM

Re: r342827 - Fix modules build with shared library.

2018-10-02 Thread Shuai Wang via cfe-commits
On Mon, Oct 1, 2018 at 4:58 PM Richard Smith wrote: > On Mon, 1 Oct 2018 at 16:10, George Karpenkov via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> Hi Richard, >> >> On Oct 1, 2018, at 2:50 PM, Richard Smith via cfe-commits < >> cfe-commits@lists.llvm.org> wrote: >> >> This looks

Re: r342827 - Fix modules build with shared library.

2018-10-01 Thread Shuai Wang via cfe-commits
George wanted to use it from clang (or, at least can't use from anything from clang-tidy.) I was actually assuming the intended usage is from some tooling instead of the frontend itself, but I never checked with George. Personally I don't think ExprMutationAnalyzer should be used in anywhere other

Re: r342827 - Fix modules build with shared library.

2018-09-25 Thread Shuai Wang via cfe-commits
I'd like to understand this better as well, in particular what would be a proper fix? On Tue, Sep 25, 2018 at 2:15 PM David Blaikie wrote: > +Shuai Wang > > On Tue, Sep 25, 2018 at 2:14 PM David Blaikie wrote: > >> Hey Eric - thanks for the fix - but could you explain the issue here in a >>

r342586 - [NFC] Declare instead of define non-void functions in unit tests.

2018-09-19 Thread Shuai Wang via cfe-commits
Author: shuaiwang Date: Wed Sep 19 13:27:25 2018 New Revision: 342586 URL: http://llvm.org/viewvc/llvm-project?rev=342586=rev Log: [NFC] Declare instead of define non-void functions in unit tests. Modified: cfe/trunk/unittests/Analysis/ExprMutationAnalyzerTest.cpp Modified:

r342562 - [analyzer] Fix nullptr access when processing instantiated function in ExprMutationAnalyzer.

2018-09-19 Thread Shuai Wang via cfe-commits
Author: shuaiwang Date: Wed Sep 19 11:00:55 2018 New Revision: 342562 URL: http://llvm.org/viewvc/llvm-project?rev=342562=rev Log: [analyzer] Fix nullptr access when processing instantiated function in ExprMutationAnalyzer. Modified: cfe/trunk/lib/Analysis/ExprMutationAnalyzer.cpp

r342525 - [NFC] Fix uncompilable test cases of ExprMutationAnalyzer.

2018-09-18 Thread Shuai Wang via cfe-commits
Author: shuaiwang Date: Tue Sep 18 20:50:03 2018 New Revision: 342525 URL: http://llvm.org/viewvc/llvm-project?rev=342525=rev Log: [NFC] Fix uncompilable test cases of ExprMutationAnalyzer. And ensure future test cases doesn't have compile errors. Modified:

[clang-tools-extra] r342417 - [clang-tidy] Fix tests for performance-for-range-copy

2018-09-17 Thread Shuai Wang via cfe-commits
Author: shuaiwang Date: Mon Sep 17 14:28:08 2018 New Revision: 342417 URL: http://llvm.org/viewvc/llvm-project?rev=342417=rev Log: [clang-tidy] Fix tests for performance-for-range-copy Test failed as D52120 made ExprMutationAnalyzer smarter, fixed by: - Add move-ctor for `Mutable` to make it

r342409 - [analyzer] Treat std::{move, forward} as casts in ExprMutationAnalyzer.

2018-09-17 Thread Shuai Wang via cfe-commits
Author: shuaiwang Date: Mon Sep 17 13:10:56 2018 New Revision: 342409 URL: http://llvm.org/viewvc/llvm-project?rev=342409=rev Log: [analyzer] Treat std::{move,forward} as casts in ExprMutationAnalyzer. Summary: This is a follow up of D52008 and should make the analyzer being able to handle

[clang-tools-extra] r342408 - Fix build failure caused by D52157

2018-09-17 Thread Shuai Wang via cfe-commits
Author: shuaiwang Date: Mon Sep 17 13:10:33 2018 New Revision: 342408 URL: http://llvm.org/viewvc/llvm-project?rev=342408=rev Log: Fix build failure caused by D52157 Modified: clang-tools-extra/trunk/unittests/clang-query/QueryEngineTest.cpp Modified:

r342407 - [ASTMatchers] Let isArrow also support UnresolvedMemberExpr, CXXDependentScopeMemberExpr

2018-09-17 Thread Shuai Wang via cfe-commits
Author: shuaiwang Date: Mon Sep 17 11:48:43 2018 New Revision: 342407 URL: http://llvm.org/viewvc/llvm-project?rev=342407=rev Log: [ASTMatchers] Let isArrow also support UnresolvedMemberExpr, CXXDependentScopeMemberExpr Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision:

[clang-tools-extra] r342403 - [clang-tidy] Remove duplicated logic in UnnecessaryValueParamCheck and use FunctionParmMutationAnalyzer instead.

2018-09-17 Thread Shuai Wang via cfe-commits
Author: shuaiwang Date: Mon Sep 17 10:59:51 2018 New Revision: 342403 URL: http://llvm.org/viewvc/llvm-project?rev=342403=rev Log: [clang-tidy] Remove duplicated logic in UnnecessaryValueParamCheck and use FunctionParmMutationAnalyzer instead. Reviewers: alexfh, JonasToth, george.karpenkov

r342353 - [NFC] Minor refactoring to setup the stage for supporting pointers in ExprMutationAnalyzer

2018-09-16 Thread Shuai Wang via cfe-commits
Author: shuaiwang Date: Sun Sep 16 14:09:50 2018 New Revision: 342353 URL: http://llvm.org/viewvc/llvm-project?rev=342353=rev Log: [NFC] Minor refactoring to setup the stage for supporting pointers in ExprMutationAnalyzer Modified:

r342340 - [NFC] cosmetic tweaks to ExprMutationAnalyzer to be more consistent

2018-09-15 Thread Shuai Wang via cfe-commits
Author: shuaiwang Date: Sat Sep 15 14:38:18 2018 New Revision: 342340 URL: http://llvm.org/viewvc/llvm-project?rev=342340=rev Log: [NFC] cosmetic tweaks to ExprMutationAnalyzer to be more consistent especially considering future changes. Modified:

r342271 - [analyzer] Handle forwarding reference better in ExprMutationAnalyzer.

2018-09-14 Thread Shuai Wang via cfe-commits
Author: shuaiwang Date: Fri Sep 14 13:07:18 2018 New Revision: 342271 URL: http://llvm.org/viewvc/llvm-project?rev=342271=rev Log: [analyzer] Handle forwarding reference better in ExprMutationAnalyzer. Summary: We used to treat an `Expr` mutated whenever it's passed as non-const reference

r342246 - Remove PseudoConstantAnalysis

2018-09-14 Thread Shuai Wang via cfe-commits
Author: shuaiwang Date: Fri Sep 14 10:27:27 2018 New Revision: 342246 URL: http://llvm.org/viewvc/llvm-project?rev=342246=rev Log: Remove PseudoConstantAnalysis Summary: It's not used anywhere for years. The last usage is removed in https://reviews.llvm.org/rL198476 in 2014. Subscribers:

[clang-tools-extra] r342012 - [NFC] Fix build breakage due to missing dep caused by D51950

2018-09-11 Thread Shuai Wang via cfe-commits
Author: shuaiwang Date: Tue Sep 11 17:32:13 2018 New Revision: 342012 URL: http://llvm.org/viewvc/llvm-project?rev=342012=rev Log: [NFC] Fix build breakage due to missing dep caused by D51950 Modified: clang-tools-extra/trunk/clang-tidy/performance/CMakeLists.txt Modified:

[clang-tools-extra] r342006 - [clangtidy] Remove old copy of ExprMutationAnalyzer

2018-09-11 Thread Shuai Wang via cfe-commits
Author: shuaiwang Date: Tue Sep 11 15:59:46 2018 New Revision: 342006 URL: http://llvm.org/viewvc/llvm-project?rev=342006=rev Log: [clangtidy] Remove old copy of ExprMutationAnalyzer Summary: This is 2/2 of moving ExprMutationAnalyzer from clangtidy to clang/Analysis. ExprMutationAnalyzer is

r342005 - [NFC] Fix build breakage caused by D51948

2018-09-11 Thread Shuai Wang via cfe-commits
Author: shuaiwang Date: Tue Sep 11 15:41:14 2018 New Revision: 342005 URL: http://llvm.org/viewvc/llvm-project?rev=342005=rev Log: [NFC] Fix build breakage caused by D51948 Modified: cfe/trunk/lib/Analysis/CMakeLists.txt Modified: cfe/trunk/lib/Analysis/CMakeLists.txt URL:

r341994 - [analyzer] Add ExprMutationAnalyzer

2018-09-11 Thread Shuai Wang via cfe-commits
Author: shuaiwang Date: Tue Sep 11 14:13:20 2018 New Revision: 341994 URL: http://llvm.org/viewvc/llvm-project?rev=341994=rev Log: [analyzer] Add ExprMutationAnalyzer Summary: This is 1/2 of moving ExprMutationAnalyzer from clangtidy to clang/Analysis. This diff along simply copies the

[clang-tools-extra] r341986 - [clang-tidy] Handle sugared reference types in ExprMutationAnalyzer

2018-09-11 Thread Shuai Wang via cfe-commits
Author: shuaiwang Date: Tue Sep 11 13:05:37 2018 New Revision: 341986 URL: http://llvm.org/viewvc/llvm-project?rev=341986=rev Log: [clang-tidy] Handle sugared reference types in ExprMutationAnalyzer Summary: This handles cases like this: ``` typedef int& IntRef; void mutate(IntRef); void f() {

[clang-tools-extra] r341967 - [clang-tidy] Handle unique owning smart pointers in ExprMutationAnalyzer

2018-09-11 Thread Shuai Wang via cfe-commits
Author: shuaiwang Date: Tue Sep 11 10:33:12 2018 New Revision: 341967 URL: http://llvm.org/viewvc/llvm-project?rev=341967=rev Log: [clang-tidy] Handle unique owning smart pointers in ExprMutationAnalyzer Summary: For smart pointers like std::unique_ptr which uniquely owns the underlying object,

[clang-tools-extra] r341891 - Revert "Revert "[clang-tidy] Handle unresolved expressions in ExprMutationAnalyzer""

2018-09-10 Thread Shuai Wang via cfe-commits
Author: shuaiwang Date: Mon Sep 10 19:23:35 2018 New Revision: 341891 URL: http://llvm.org/viewvc/llvm-project?rev=341891=rev Log: Revert "Revert "[clang-tidy] Handle unresolved expressions in ExprMutationAnalyzer"" This is the same as D50619 plus fixes for buildbot failures on windows. The

[clang-tools-extra] r341886 - Revert "[clang-tidy] Handle unresolved expressions in ExprMutationAnalyzer"

2018-09-10 Thread Shuai Wang via cfe-commits
Author: shuaiwang Date: Mon Sep 10 16:58:04 2018 New Revision: 341886 URL: http://llvm.org/viewvc/llvm-project?rev=341886=rev Log: Revert "[clang-tidy] Handle unresolved expressions in ExprMutationAnalyzer" Summary: Tests somehow break on windows (and only on windows)

[clang-tools-extra] r341848 - [clang-tidy] Handle unresolved expressions in ExprMutationAnalyzer

2018-09-10 Thread Shuai Wang via cfe-commits
Author: shuaiwang Date: Mon Sep 10 11:05:13 2018 New Revision: 341848 URL: http://llvm.org/viewvc/llvm-project?rev=341848=rev Log: [clang-tidy] Handle unresolved expressions in ExprMutationAnalyzer Summary: - If a function is unresolved, assume it mutates its arguments - Follow unresolved member

r340547 - [ASTMatchers] Let hasObjectExpression also support UnresolvedMemberExpr, CXXDependentScopeMemberExpr

2018-08-23 Thread Shuai Wang via cfe-commits
Author: shuaiwang Date: Thu Aug 23 10:16:06 2018 New Revision: 340547 URL: http://llvm.org/viewvc/llvm-project?rev=340547=rev Log: [ASTMatchers] Let hasObjectExpression also support UnresolvedMemberExpr, CXXDependentScopeMemberExpr Reviewers: aaron.ballman Subscribers: cfe-commits

r339530 - [ASTMatchers] Let hasAnyArgument also support CXXUnresolvedConstructExpr

2018-08-12 Thread Shuai Wang via cfe-commits
Author: shuaiwang Date: Sun Aug 12 16:30:05 2018 New Revision: 339530 URL: http://llvm.org/viewvc/llvm-project?rev=339530=rev Log: [ASTMatchers] Let hasAnyArgument also support CXXUnresolvedConstructExpr Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D50605 Modified:

r339522 - [ASTMatchers] Add matchers unresolvedMemberExpr, cxxDependentScopeMemberExpr

2018-08-12 Thread Shuai Wang via cfe-commits
Author: shuaiwang Date: Sun Aug 12 10:34:36 2018 New Revision: 339522 URL: http://llvm.org/viewvc/llvm-project?rev=339522=rev Log: [ASTMatchers] Add matchers unresolvedMemberExpr, cxxDependentScopeMemberExpr Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D50606

[clang-tools-extra] r338903 - Use ExprMutationAnalyzer in performance-unnecessary-value-param

2018-08-03 Thread Shuai Wang via cfe-commits
Author: shuaiwang Date: Fri Aug 3 10:23:37 2018 New Revision: 338903 URL: http://llvm.org/viewvc/llvm-project?rev=338903=rev Log: Use ExprMutationAnalyzer in performance-unnecessary-value-param Summary: This yields better recall as ExprMutationAnalyzer is more accurate. One common pattern this

[clang-tools-extra] r336737 - Use ExprMutationAnalyzer in performance-for-range-copy

2018-07-10 Thread Shuai Wang via cfe-commits
Author: shuaiwang Date: Tue Jul 10 15:51:06 2018 New Revision: 336737 URL: http://llvm.org/viewvc/llvm-project?rev=336737=rev Log: Use ExprMutationAnalyzer in performance-for-range-copy Summary: This gives better coverage to the check as ExprMutationAnalyzer is more accurate comparing to

Re: [PATCH] D17586: Add a new check, readability-redundant-string-init, that checks unnecessary string initializations.

2016-02-25 Thread Shuai Wang via cfe-commits
shuaiwang marked an inline comment as done. shuaiwang added a comment. http://reviews.llvm.org/D17586 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D17586: Add a new check, readability-redundant-string-init, that checks unnecessary string initializations.

2016-02-25 Thread Shuai Wang via cfe-commits
shuaiwang updated this revision to Diff 49114. shuaiwang added a comment. CHECK-FIXES for macro tests http://reviews.llvm.org/D17586 Files: clang-tidy/ClangTidyDiagnosticConsumer.cpp clang-tidy/ClangTidyDiagnosticConsumer.h clang-tidy/readability/CMakeLists.txt

Re: [PATCH] D17586: Add a new check, readability-redundant-string-init, that checks unnecessary string initializations.

2016-02-25 Thread Shuai Wang via cfe-commits
shuaiwang updated this revision to Diff 49108. shuaiwang added a comment. more test cases http://reviews.llvm.org/D17586 Files: clang-tidy/ClangTidyDiagnosticConsumer.cpp clang-tidy/ClangTidyDiagnosticConsumer.h clang-tidy/readability/CMakeLists.txt