Re: [PATCH] D15571: Add namespace support to add_new_check.py

2015-12-16 Thread Cong Liu via cfe-commits
congliu updated this revision to Diff 43007. congliu added a comment. Replaced namespace with module; Removed extra space after module at line 103 http://reviews.llvm.org/D15571 Files: clang-tidy/add_new_check.py Index: clang-tidy/add_new_check.py

[PATCH] D15571: Add namespace support to add_new_check.py

2015-12-16 Thread Cong Liu via cfe-commits
congliu created this revision. congliu added a reviewer: alexfh. congliu added a subscriber: cfe-commits. Without namespace you can not create checks with same name in different modules http://reviews.llvm.org/D15571 Files: clang-tidy/add_new_check.py Index: clang-tidy/add_new_check.py

Re: [PATCH] D15571: Add namespace support to add_new_check.py

2015-12-16 Thread Cong Liu via cfe-commits
congliu marked 2 inline comments as done. congliu added a comment. Replace namespace with module -- Done. Remove extra space after module -- Done. http://reviews.llvm.org/D15571 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: [PATCH] D15823: Support virtual-near-miss check.

2016-01-04 Thread Cong Liu via cfe-commits
congliu marked 20 inline comments as done. Comment at: clang-tidy/misc/VirtualNearMissCheck.cpp:59 @@ +58,3 @@ +bool VirtualNearMissCheck::isOverrideMethod(const CXXMethodDecl *MD){ + return MD->size_overridden_methods() > 0 || MD->hasAttr(); +} alexfh wrote: >

Re: [PATCH] D15823: Support virtual-near-miss check.

2016-01-07 Thread Cong Liu via cfe-commits
congliu updated this revision to Diff 44197. congliu added a comment. - Corrected naming styles; Used clang-format; Add doc to .h - Removed useless parentheses, braces around one-line ifs. - Added doc; Corrected style and typos for test. - Implemented c++ [class.virtual]p7. But has bug. - Support

Re: [PATCH] D15823: Support virtual-near-miss check.

2015-12-31 Thread Cong Liu via cfe-commits
congliu marked 2 inline comments as done. Comment at: clang-tidy/misc/VirtualNearMissCheck.cpp:79 @@ +78,3 @@ + if (BaseReturnType->isReferenceType() && DerivedReturnType->isReferenceType()){ +BaseReturnType = BaseReturnType.getNonReferenceType(); +DerivedReturnType =

[PATCH] D15823: Support virtual-near-miss check.

2015-12-30 Thread Cong Liu via cfe-commits
congliu created this revision. congliu added a reviewer: alexfh. congliu added a subscriber: cfe-commits. Virtual function override near miss detection. Function complete. Test complete. Do not conduct Fix for now. http://reviews.llvm.org/D15823 Files: clang-tidy/misc/CMakeLists.txt

Re: [PATCH] D15823: Support virtual-near-miss check.

2016-01-12 Thread Cong Liu via cfe-commits
congliu marked 9 inline comments as done. congliu added a comment. Fixed. For next steps, I will go through the results of clangmr, find out false alarms, and fix them. Comment at: clang-tidy/misc/VirtualNearMissCheck.cpp:90 @@ +89,3 @@ +// Check ambiguity. +if

Re: [PATCH] D15823: Support virtual-near-miss check.

2016-01-12 Thread Cong Liu via cfe-commits
congliu updated this revision to Diff 44661. congliu added a comment. - Removed braces; corrected comments; updated test. http://reviews.llvm.org/D15823 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscTidyModule.cpp clang-tidy/misc/VirtualNearMissCheck.cpp

r273150 - Add -fsyntax-only to Driver/opencl.cl test.

2016-06-20 Thread Cong Liu via cfe-commits
Author: congliu Date: Mon Jun 20 06:25:26 2016 New Revision: 273150 URL: http://llvm.org/viewvc/llvm-project?rev=273150=rev Log: Add -fsyntax-only to Driver/opencl.cl test. Modified: cfe/trunk/test/Driver/opencl.cl Modified: cfe/trunk/test/Driver/opencl.cl URL:

[clang-tools-extra] r273660 - Remove ignoringImplicit from clang-tidy.

2016-06-24 Thread Cong Liu via cfe-commits
Author: congliu Date: Fri Jun 24 04:39:28 2016 New Revision: 273660 URL: http://llvm.org/viewvc/llvm-project?rev=273660=rev Log: Remove ignoringImplicit from clang-tidy. Modified: clang-tools-extra/trunk/clang-tidy/modernize/LoopConvertCheck.cpp

Re: [clang-tools-extra] r273660 - Remove ignoringImplicit from clang-tidy.

2016-06-24 Thread Cong Liu via cfe-commits
Renato Golin <renato.go...@linaro.org> wrote: > On 24 June 2016 at 10:39, Cong Liu via cfe-commits > <cfe-commits@lists.llvm.org> wrote: > > Author: congliu > > Date: Fri Jun 24 04:39:28 2016 > > New Revision: 273660 > > > > URL: http://llv

[PATCH] D21677: Add ignoringImplicit matcher

2016-06-24 Thread Cong Liu via cfe-commits
congliu created this revision. congliu added a reviewer: klimek. congliu added a subscriber: cfe-commits. congliu set the repository for this revision to rL LLVM. Herald added a subscriber: klimek. Repository: rL LLVM http://reviews.llvm.org/D21677 Files: docs/LibASTMatchersReference.html

r273659 - IgnoringImplicit matcher.

2016-06-24 Thread Cong Liu via cfe-commits
Author: congliu Date: Fri Jun 24 04:38:03 2016 New Revision: 273659 URL: http://llvm.org/viewvc/llvm-project?rev=273659=rev Log: IgnoringImplicit matcher. Modified: cfe/trunk/docs/LibASTMatchersReference.html cfe/trunk/docs/tools/dump_ast_matchers.py (contents, props changed)

Re: [PATCH] D15823: Support virtual-near-miss check.

2016-01-08 Thread Cong Liu via cfe-commits
congliu added inline comments. Comment at: clang-tidy/misc/VirtualNearMissCheck.cpp:232 @@ +231,3 @@ +const auto *BaseRD = BaseSpec.getType()->getAsCXXRecordDecl(); +if (BaseRD == nullptr) + return; alexfh wrote: > 1. When is this going to be

Re: [PATCH] D15823: Support virtual-near-miss check.

2016-01-08 Thread Cong Liu via cfe-commits
congliu updated this revision to Diff 44328. congliu marked 33 inline comments as done. congliu added a comment. - Completed [class.virtual] p7 covarient check. Updated test. - Corrected implement of checkParamType. - Clean up. - Corrected typos. Changed some methods to free-standing. Changed

Re: [PATCH] D16179: [clang-tidy] Handle decayed types and other improvements in VirtualNearMiss check.

2016-01-15 Thread Cong Liu via cfe-commits
congliu added a comment. > - Ignore qualifiers. I don't think we should ignore qualifiers. Please see my inline comment for line 52 of the test file. Comment at: clang-tidy/misc/VirtualNearMissCheck.cpp:240 @@ -247,2 +239,3 @@ unsigned EditDistance = -

Re: [PATCH] D16922: [clang-tidy] Added check-fixes for misc-virtual-near-miss.

2016-02-10 Thread Cong Liu via cfe-commits
congliu added a comment. The strategy has changed. Now this check does not ignore template in instantiation, instead, it generate a single warning for some instantiation and ignore others, so that fix is able to apply. We do this to walk around the function copied from ASTMatchFinder, since

Re: [PATCH] D16922: [clang-tidy] Added check-fixes for misc-virtual-near-miss.

2016-02-10 Thread Cong Liu via cfe-commits
congliu updated this revision to Diff 47448. congliu marked 2 inline comments as done. congliu added a comment. - Generate a single warning for multiple template instantiations. http://reviews.llvm.org/D16922 Files: clang-tidy/misc/VirtualNearMissCheck.cpp

Re: [PATCH] D16922: [clang-tidy] Added check-fixes for misc-virtual-near-miss.

2016-02-10 Thread Cong Liu via cfe-commits
congliu updated this revision to Diff 47461. congliu marked 3 inline comments as done. congliu added a comment. - Allowed warnings but disallowed fix for template instantiations. - Updated tests. http://reviews.llvm.org/D16922 Files: clang-tidy/misc/VirtualNearMissCheck.cpp

Re: Need to use function "getAsCXXRecordDecl" of ASTMatchFinder.cpp in a clang-tidy check

2016-02-10 Thread Cong Liu via cfe-commits
Hi Richard, You are right. Actually I just need to consider the cases that there are full instantiations of the primary template. I have changed the strategy and not use that function. Thanks a lot! Cong On Wed, Feb 10, 2016 at 2:17 AM, Richard Smith wrote: > On Tue,

Re: [PATCH] D16922: [clang-tidy] Added check-fixes for misc-virtual-near-miss.

2016-02-09 Thread Cong Liu via cfe-commits
congliu updated this revision to Diff 47307. congliu added a comment. - Disallowed matches for method in template instantiations. Updated test. http://reviews.llvm.org/D16922 Files: clang-tidy/misc/VirtualNearMissCheck.cpp test/clang-tidy/misc-virtual-near-miss.cpp Index:

Need to use function "getAsCXXRecordDecl" of ASTMatchFinder.cpp in a clang-tidy check

2016-02-09 Thread Cong Liu via cfe-commits
Hi Richard, I need to use the function (line 747 of ASTMatchFinder.cpp ): static CXXRecordDecl *getAsCXXRecordDecl(const Type *TypeNode) in the misc-virtual-near-miss check of clang-tidy, because it can correctly get the

Re: [PATCH] D16922: [clang-tidy] Added check-fixes for misc-virtual-near-miss.

2016-02-05 Thread Cong Liu via cfe-commits
congliu updated this revision to Diff 47024. congliu added a comment. - Added test cases of macro and template. http://reviews.llvm.org/D16922 Files: clang-tidy/misc/VirtualNearMissCheck.cpp test/clang-tidy/misc-virtual-near-miss.cpp Index: test/clang-tidy/misc-virtual-near-miss.cpp

Re: Need to use function "getAsCXXRecordDecl" of ASTMatchFinder.cpp in a clang-tidy check

2016-02-09 Thread Cong Liu via cfe-commits
Hi Richard, Thank you for your reply. Yes, the case I need to deal with is like what you said: > If you want to make the assumption that the primary template will be > used for an unknown specialization, you'll need something like that > function in ASTMatchFinder. For example, 1.

[clang-tools-extra] r260532 - Merge branch 'arcpatch-D16922'

2016-02-11 Thread Cong Liu via cfe-commits
Author: congliu Date: Thu Feb 11 10:03:27 2016 New Revision: 260532 URL: http://llvm.org/viewvc/llvm-project?rev=260532=rev Log: Merge branch 'arcpatch-D16922' Modified: clang-tools-extra/trunk/clang-tidy/misc/VirtualNearMissCheck.cpp

[PATCH] D16922: [clang-tidy] Added check-fixes for misc-virtual-near-miss.

2016-02-05 Thread Cong Liu via cfe-commits
congliu created this revision. congliu added a reviewer: alexfh. congliu added a subscriber: cfe-commits. Addes FixItHint and updated test. http://reviews.llvm.org/D16922 Files: clang-tidy/misc/VirtualNearMissCheck.cpp test/clang-tidy/misc-virtual-near-miss.cpp Index:

Re: [PATCH] D16587: Fixed function params comparison. Updated docs and tests.

2016-01-28 Thread Cong Liu via cfe-commits
congliu updated this revision to Diff 46359. congliu added a comment. - Fixed bugs introduced by getCanonicalDecl. Has errs log. - Cleared up logs. - Added mathcers for static method and overloaded operator. - Change key type of map from string to pointer to imporve performance. - Change

Re: [PATCH] D16587: Fixed function params comparison. Updated docs and tests.

2016-01-28 Thread Cong Liu via cfe-commits
congliu updated this revision to Diff 46360. congliu added a comment. - Fixed a nit in test file. http://reviews.llvm.org/D16587 Files: clang-tidy/misc/VirtualNearMissCheck.cpp clang-tidy/misc/VirtualNearMissCheck.h docs/clang-tidy/checks/misc-virtual-near-miss.rst

[PATCH] D16536: Fix crashing on user-defined conversion.

2016-01-25 Thread Cong Liu via cfe-commits
congliu created this revision. congliu added a reviewer: alexfh. congliu added a subscriber: cfe-commits. Fix the assertion failure for the user-defined conversion method. e.g.: operator bool() http://reviews.llvm.org/D16536 Files: clang-tidy/misc/VirtualNearMissCheck.cpp

Re: [PATCH] D16536: Fix crashing on user-defined conversion.

2016-01-25 Thread Cong Liu via cfe-commits
congliu updated this revision to Diff 45873. congliu added a comment. - Address the comment and clean up the code. http://reviews.llvm.org/D16536 Files: clang-tidy/misc/VirtualNearMissCheck.cpp test/clang-tidy/misc-virtual-near-miss.cpp Index: test/clang-tidy/misc-virtual-near-miss.cpp

Re: [PATCH] D16536: Fix crashing on user-defined conversion.

2016-01-25 Thread Cong Liu via cfe-commits
congliu added inline comments. Comment at: clang-tidy/misc/VirtualNearMissCheck.cpp:175 @@ +174,3 @@ +/// operator TypeName() +static bool isUserDefinedConversion(const CXXMethodDecl *MD) { + return StringRef(MD->getNameAsString()).find(StringRef("operator ")) !=

[PATCH] D16587: Fixed function params comparison. Updated docs and tests.

2016-01-26 Thread Cong Liu via cfe-commits
congliu created this revision. congliu added a reviewer: alexfh. congliu added a subscriber: cfe-commits. "checkParamTypes" may fail if the the type of some parameter is not canonical. Fixed it by comparing canonical types. And added "getCanonicalType()" and "getCanonicalDecl()" on more places

[PATCH] D17375: Add parentheses around arithmetic in operand of '|' in llvm-dwp.cpp.

2016-02-18 Thread Cong Liu via cfe-commits
congliu created this revision. congliu added a reviewer: bkramer. congliu added a subscriber: cfe-commits. Add the parenthese to make it able to build. http://reviews.llvm.org/D17375 Files: tools/llvm-dwp/llvm-dwp.cpp Index: tools/llvm-dwp/llvm-dwp.cpp

Re: [PATCH] D17375: Add parentheses around arithmetic in operand of '|' in llvm-dwp.cpp.

2016-02-18 Thread Cong Liu via cfe-commits
congliu updated this revision to Diff 48301. congliu added a comment. - Address review comment. http://reviews.llvm.org/D17375 Files: tools/llvm-dwp/llvm-dwp.cpp Index: tools/llvm-dwp/llvm-dwp.cpp === ---

Re: [PATCH] D16922: [clang-tidy] Added check-fixes for misc-virtual-near-miss.

2016-02-11 Thread Cong Liu via cfe-commits
congliu closed this revision. congliu added a comment. Closed by commit rL260532: Merge branch 'arcpatch-D16922' (authored by congliu ) http://reviews.llvm.org/D16922 ___