[PATCH] D22367: [include-fixer] Always add as few as possible qualifiers to the unidentified symbol.

2016-07-14 Thread Haojian Wu via cfe-commits
hokein created this revision. hokein added a reviewer: bkramer. hokein added a subscriber: cfe-commits. https://reviews.llvm.org/D22367 Files: include-fixer/IncludeFixerContext.cpp unittests/include-fixer/IncludeFixerTest.cpp Index: unittests/include-fixer/IncludeFixerTest.cpp ==

Re: [PATCH] D22351: [include-fixer] Move cursor to #include line in vim after inserting a missing header.

2016-07-14 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 64004. hokein added a comment. Add an option to make move-cursor configurable. https://reviews.llvm.org/D22351 Files: include-fixer/tool/clang-include-fixer.py Index: include-fixer/tool/clang-include-fixer.py ==

Re: [PATCH] D22351: [include-fixer] Move cursor to #include line in vim after inserting a missing header.

2016-07-14 Thread Haojian Wu via cfe-commits
hokein added a comment. +Daniel who suggests this feature ;) https://reviews.llvm.org/D22351 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D22367: [include-fixer] Always add as few as possible qualifiers to the unidentified symbol.

2016-07-15 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 64104. hokein marked an inline comment as done. hokein added a comment. Add comment. https://reviews.llvm.org/D22367 Files: include-fixer/IncludeFixerContext.cpp unittests/include-fixer/IncludeFixerTest.cpp Index: unittests/include-fixer/IncludeFixerTes

[clang-tools-extra] r275542 - [include-fixer] Always add as few as possible qualifiers to the unidentified symbol.

2016-07-15 Thread Haojian Wu via cfe-commits
Author: hokein Date: Fri Jul 15 03:12:48 2016 New Revision: 275542 URL: http://llvm.org/viewvc/llvm-project?rev=275542&view=rev Log: [include-fixer] Always add as few as possible qualifiers to the unidentified symbol. Reviewers: bkramer Subscribers: cfe-commits Differential Revision: https://r

Re: [PATCH] D22367: [include-fixer] Always add as few as possible qualifiers to the unidentified symbol.

2016-07-15 Thread Haojian Wu via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL275542: [include-fixer] Always add as few as possible qualifiers to the unidentified… (authored by hokein). Changed prior to commit: https://reviews.llvm.org/D22367?vs=64104&id=64107#toc Repository:

Re: [PATCH] D22351: [include-fixer] Move cursor to #include line in vim after inserting a missing header.

2016-07-15 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 64110. hokein added a comment. Avoid a hacky way to get #include line number. https://reviews.llvm.org/D22351 Files: include-fixer/tool/clang-include-fixer.py Index: include-fixer/tool/clang-include-fixer.py ===

Re: [PATCH] D22351: [include-fixer] Move cursor to #include line in vim after inserting a missing header.

2016-07-15 Thread Haojian Wu via cfe-commits
hokein marked an inline comment as done. hokein added a comment. https://reviews.llvm.org/D22351 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] r275781 - [include-fixer] Add an options allow moving the cursor to #include line in vim

2016-07-18 Thread Haojian Wu via cfe-commits
Author: hokein Date: Mon Jul 18 05:04:45 2016 New Revision: 275781 URL: http://llvm.org/viewvc/llvm-project?rev=275781&view=rev Log: [include-fixer] Add an options allow moving the cursor to #include line in vim after inserting a missing header. Summary: A small improvement: Don't print newline

Re: [PATCH] D22351: [include-fixer] Move cursor to #include line in vim after inserting a missing header.

2016-07-18 Thread Haojian Wu via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL275781: [include-fixer] Add an options allow moving the cursor to #include line in vim (authored by hokein). Changed prior to commit: https://reviews.llvm.org/D22351?vs=64110&id=64291#toc Repository:

[clang-tools-extra] r262470 - [clang-tidy] Make 'modernize-pass-by-value' fix work on header files.

2016-03-02 Thread Haojian Wu via cfe-commits
Author: hokein Date: Wed Mar 2 03:01:25 2016 New Revision: 262470 URL: http://llvm.org/viewvc/llvm-project?rev=262470&view=rev Log: [clang-tidy] Make 'modernize-pass-by-value' fix work on header files. Reviewers: alexfh Subscribers: jbcoe, cfe-commits Differential Revision: http://reviews.llvm

Re: [PATCH] D17756: [clang-tidy] Make 'modernize-pass-by-value' fix work on header files.

2016-03-02 Thread Haojian Wu via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL262470: [clang-tidy] Make 'modernize-pass-by-value' fix work on header files. (authored by hokein). Changed prior to commit: http://reviews.llvm.org/D17756?vs=49463&id=49588#toc Repository: rL LLVM

Re: [PATCH] D17722: Make sure SLocEntry is an expansion before using getExpansion() method in SourceManager.

2016-03-02 Thread Haojian Wu via cfe-commits
hokein abandoned this revision. hokein added a comment. In http://reviews.llvm.org/D17722#365267, @bkramer wrote: > This doesn't have a test case. Also I don't understand why this is the > correct fix. If someone is calling one of those method with a file > SourceLocation (as opposed to a macro

[clang-tools-extra] r262484 - [clang-tidy] Fix an assertion failure of "SLocEntry::getExpansion()" when IncludeInserter handles macro header file.

2016-03-02 Thread Haojian Wu via cfe-commits
Author: hokein Date: Wed Mar 2 08:12:17 2016 New Revision: 262484 URL: http://llvm.org/viewvc/llvm-project?rev=262484&view=rev Log: [clang-tidy] Fix an assertion failure of "SLocEntry::getExpansion()" when IncludeInserter handles macro header file. Summary: Also Fixes PR24749. Reviewers: alexf

Re: [PATCH] D17805: [clang-tidy] Fix an assertion failure of "SLocEntry::getExpansion()" when IncludeInserter handles macro header file.

2016-03-02 Thread Haojian Wu via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL262484: [clang-tidy] Fix an assertion failure of "SLocEntry::getExpansion()" when… (authored by hokein). Changed prior to commit: http://reviews.llvm.org/D17805?vs=49611&id=49613#toc Repository: rL L

Re: [PATCH] D17762: Fix an assertion failure in setPointOfInstantiation.

2016-03-03 Thread Haojian Wu via cfe-commits
hokein added a comment. friendly ping. Repository: rL LLVM http://reviews.llvm.org/D17762 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] r262698 - [clang-tidy] Make 'modernize-use-nullptr' check work on multiple nested implicit cast expressions.

2016-03-04 Thread Haojian Wu via cfe-commits
Author: hokein Date: Fri Mar 4 02:55:54 2016 New Revision: 262698 URL: http://llvm.org/viewvc/llvm-project?rev=262698&view=rev Log: [clang-tidy] Make 'modernize-use-nullptr' check work on multiple nested implicit cast expressions. Summary: For some test cases like: ``` int func(int, void*, vo

Re: [PATCH] D17849: [clang-tidy] Make 'modernize-use-nullptr' check work on multiple nested implicit cast expressions.

2016-03-04 Thread Haojian Wu via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL262698: [clang-tidy] Make 'modernize-use-nullptr' check work on multiple nested… (authored by hokein). Changed prior to commit: http://reviews.llvm.org/D17849?vs=49736&id=49802#toc Repository: rL LLV

Re: [PATCH] D17762: Fix an assertion failure in setPointOfInstantiation.

2016-03-07 Thread Haojian Wu via cfe-commits
hokein added a comment. In http://reviews.llvm.org/D17762#367182, @bkramer wrote: > This doesn't look right to me. Aborting tree transform on a bad source > location seems just wrong. Where is the invalid source location coming from? > Also the backtrace seems related to typo correction, maybe

Re: [PATCH] D17762: Fix an assertion failure in setPointOfInstantiation.

2016-03-07 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 49939. hokein added a comment. Update. http://reviews.llvm.org/D17762 Files: lib/Sema/SemaExpr.cpp test/Sema/PR25668.cpp Index: test/Sema/PR25668.cpp === --- /dev/null +++ test/Sema/PR25668

Re: [PATCH] D17926: [clang-tidy] Don't delete unused parameter in class override method in anonymous namespace.

2016-03-07 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 49954. hokein added a comment. Use internal isOverride method. http://reviews.llvm.org/D17926 Files: clang-tidy/misc/UnusedParametersCheck.cpp test/clang-tidy/misc-unused-parameters.cpp Index: test/clang-tidy/misc-unused-parameters.cpp =

Re: [PATCH] D17926: [clang-tidy] Don't delete unused parameter in class override method in anonymous namespace.

2016-03-07 Thread Haojian Wu via cfe-commits
hokein marked an inline comment as done. hokein added a comment. http://reviews.llvm.org/D17926 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D17926: [clang-tidy] Don't delete unused parameter in class override method in anonymous namespace.

2016-03-07 Thread Haojian Wu via cfe-commits
hokein added inline comments. Comment at: clang-tidy/misc/UnusedParametersCheck.cpp:80 @@ +79,3 @@ + UsedByRef() || + !ast_matchers::match(cxxMethodDecl(isOverride()), *Function, + *Result.Context) alexfh wrote: > I meant, you c

Re: [PATCH] D17762: Fix an assertion failure in setPointOfInstantiation.

2016-03-10 Thread Haojian Wu via cfe-commits
hokein added a comment. friendly ping @rsmith. http://reviews.llvm.org/D17762 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D17958: [clang-tidy] Make 'modernize-use-nullptr' check ignores NULL marcos used in other macros.

2016-03-11 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 50409. hokein added a comment. Format code. http://reviews.llvm.org/D17958 Files: clang-tidy/modernize/UseNullptrCheck.cpp test/clang-tidy/modernize-use-nullptr.cpp Index: test/clang-tidy/modernize-use-nullptr.cpp ===

Re: [PATCH] D17958: [clang-tidy] Make 'modernize-use-nullptr' check ignores NULL marcos used in other macros.

2016-03-11 Thread Haojian Wu via cfe-commits
hokein marked an inline comment as done. hokein added a comment. http://reviews.llvm.org/D17958 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] r263221 - [clang-tidy] Make 'modernize-use-nullptr' check ignores NULL marcos used in other macros.

2016-03-11 Thread Haojian Wu via cfe-commits
Author: hokein Date: Fri Mar 11 05:40:08 2016 New Revision: 263221 URL: http://llvm.org/viewvc/llvm-project?rev=263221&view=rev Log: [clang-tidy] Make 'modernize-use-nullptr' check ignores NULL marcos used in other macros. Reviewers: bkramer, alexfh Subscribers: cfe-commits Differential Revisi

Re: [PATCH] D17958: [clang-tidy] Make 'modernize-use-nullptr' check ignores NULL marcos used in other macros.

2016-03-11 Thread Haojian Wu via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL263221: [clang-tidy] Make 'modernize-use-nullptr' check ignores NULL marcos used in… (authored by hokein). Changed prior to commit: http://reviews.llvm.org/D17958?vs=50409&id=50414#toc Repository: rL

[clang-tools-extra] r263426 - [clang-tidy] Fix "Name is not a simple identifier" assertion in `modernize-loop-convert` check.

2016-03-14 Thread Haojian Wu via cfe-commits
Author: hokein Date: Mon Mar 14 07:41:24 2016 New Revision: 263426 URL: http://llvm.org/viewvc/llvm-project?rev=263426&view=rev Log: [clang-tidy] Fix "Name is not a simple identifier" assertion in `modernize-loop-convert` check. Summary: Fix assertion failure: "Name is not a simple identifier".

Re: [PATCH] D18141: [clang-tidy] Fix "Name is not a simple identifier" assertion in `modernize-loop-convert` check.

2016-03-14 Thread Haojian Wu via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL263426: [clang-tidy] Fix "Name is not a simple identifier" assertion in `modernize… (authored by hokein). Changed prior to commit: http://reviews.llvm.org/D18141?vs=50580&id=50582#toc Repository: rL

Re: [PATCH] D15332: new clang-tidy checker readability-non-const-parameter

2016-03-14 Thread Haojian Wu via cfe-commits
hokein added inline comments. Comment at: clang-tidy/readability/NonConstParameterCheck.cpp:24 @@ +23,3 @@ + + // C++ constructor.. + Finder->addMatcher(cxxConstructorDecl().bind("Ctor"), this); Extra `.` at the end. Comment at: clang-tidy/read

Re: [PATCH] D18136: boost-use-to-string check

2016-03-14 Thread Haojian Wu via cfe-commits
hokein added a subscriber: hokein. hokein added a comment. > Is there any better solution for the basic_string problem? The current solution looks fine to me. I don't have a better solution. Maybe @alexfh has. Comment at: docs/clang-tidy/checks/boost-use-to-string.rst:6 @@ +5

Re: [PATCH] D18293: [clang-tidy] Fix redundant-string-init check with msvc 14 headers.

2016-03-21 Thread Haojian Wu via cfe-commits
hokein accepted this revision. hokein added a comment. This revision is now accepted and ready to land. The patch looks good to me. http://reviews.llvm.org/D18293 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/

Re: [PATCH] D18264: [clang-tidy] misc-assign-operator-signature checker checks return value of all assign operators

2016-03-21 Thread Haojian Wu via cfe-commits
hokein accepted this revision. hokein added a comment. This revision is now accepted and ready to land. LGTM. http://reviews.llvm.org/D18264 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

Re: [PATCH] D18149: Add check for unneeded copies of locals

2016-03-21 Thread Haojian Wu via cfe-commits
hokein added inline comments. Comment at: clang-tidy/performance/UnnecessaryCopyInitialization.cpp:87 @@ +86,3 @@ + +namespace { +void recordFixes(const VarDecl &Var, ASTContext &Context, I prefer to move the anonymous namespace under `namespace performance {` st

Re: [PATCH] D18149: Add check for unneeded copies of locals

2016-03-22 Thread Haojian Wu via cfe-commits
hokein accepted this revision. hokein added a comment. This revision is now accepted and ready to land. LGTM. http://reviews.llvm.org/D18149 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[clang-tools-extra] r264146 - Add check for unneeded copies of locals

2016-03-23 Thread Haojian Wu via cfe-commits
Author: hokein Date: Wed Mar 23 04:33:07 2016 New Revision: 264146 URL: http://llvm.org/viewvc/llvm-project?rev=264146&view=rev Log: Add check for unneeded copies of locals Summary: Extends the UnnecessaryCopyInitialization to detect copies of local variables and parameters that are unneeded. P

Re: [PATCH] D18149: Add check for unneeded copies of locals

2016-03-23 Thread Haojian Wu via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL264146: Add check for unneeded copies of locals (authored by hokein). Changed prior to commit: http://reviews.llvm.org/D18149?vs=51289&id=51391#toc Repository: rL LLVM http://reviews.llvm.org/D18149

Re: [PATCH] D18149: Add check for unneeded copies of locals

2016-03-23 Thread Haojian Wu via cfe-commits
hokein added a comment. @fowles, I have commit the patch for you. Repository: rL LLVM http://reviews.llvm.org/D18149 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D15710: [clang-tidy] Add non-inline function definition and variable definition check in header files.

2015-12-28 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 43686. hokein added a comment. Address aaron's comments. http://reviews.llvm.org/D15710 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/DefinitionsInHeadersCheck.cpp clang-tidy/misc/DefinitionsInHeadersCheck.h clang-tidy/misc/MiscTidyModule.cpp

Re: [PATCH] D15710: [clang-tidy] Add non-inline function definition and variable definition check in header files.

2015-12-28 Thread Haojian Wu via cfe-commits
hokein marked 6 inline comments as done. Comment at: docs/clang-tidy/checks/misc-definitions-in-headers.rst:18 @@ +17,3 @@ + int c = 2; // ok + } + Yeah, it's not a good practice to define an an unnamed namespace in header file (Google cpp code style also

[PATCH] D15802: [clang-tidy] Don't generate duplicated blank line in add_new_check.py script.

2015-12-29 Thread Haojian Wu via cfe-commits
hokein created this revision. hokein added a reviewer: alexfh. hokein added a subscriber: cfe-commits. http://reviews.llvm.org/D15802 Files: clang-tidy/add_new_check.py clang-tidy/cert/CERTTidyModule.cpp clang-tidy/cert/CMakeLists.txt docs/clang-tidy/checks/list.rst Index: docs/clang-tid

Re: [PATCH] D15805: [clang-tidy] Cleanup code in CERT module.

2015-12-29 Thread Haojian Wu via cfe-commits
hokein added a comment. I'm wondering whether should we rename `CERT` to `cert` to keep the same with other modules like misc and google. For adding a new check in CERT module, you need to use the upper name explicitly via `python add_new_check.py CERT foo` rather than `python add_new_check.py

Re: [PATCH] D15710: [clang-tidy] Add non-inline function definition and variable definition check in header files.

2015-12-31 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 43826. hokein added a comment. Move unittest to lit test. http://reviews.llvm.org/D15710 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/DefinitionsInHeadersCheck.cpp clang-tidy/misc/DefinitionsInHeadersCheck.h clang-tidy/misc/MiscTidyModule.cp

Re: [PATCH] D15710: [clang-tidy] Add non-inline function definition and variable definition check in header files.

2015-12-31 Thread Haojian Wu via cfe-commits
hokein marked 5 inline comments as done. hokein added a comment. http://reviews.llvm.org/D15710 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D15805: [clang-tidy] Cleanup code in CERT module.

2015-12-31 Thread Haojian Wu via cfe-commits
hokein added a comment. So shoud we need to rename to `cert` at this patch? Repository: rL LLVM http://reviews.llvm.org/D15805 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D15805: [clang-tidy] Cleanup code in CERT module.

2016-01-04 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 43870. hokein added a comment. Rename: 'CERT' => 'cert' http://reviews.llvm.org/D15805 Files: clang-tidy/cert/CERTTidyModule.cpp clang-tidy/cert/SetLongJmpCheck.cpp clang-tidy/cert/SetLongJmpCheck.h clang-tidy/cert/StaticObjectExceptionCheck.cpp cl

Re: [PATCH] D15805: [clang-tidy] Cleanup code in CERT module.

2016-01-04 Thread Haojian Wu via cfe-commits
hokein added a comment. > Yes, but just the namespaces as you do in this patch (not anything in user > documentation, for instance). This patch LG; if you need me to commit on your > behalf, I'm happy to do so. Done. But My account has no write access to the code repo. Can I commit the patch

Re: [PATCH] D15805: [clang-tidy] Cleanup code in CERT module.

2016-01-04 Thread Haojian Wu via cfe-commits
hokein added a comment. In http://reviews.llvm.org/D15805#318646, @aaron.ballman wrote: > In http://reviews.llvm.org/D15805#318624, @hokein wrote: > > > > Yes, but just the namespaces as you do in this patch (not anything in > > > user documentation, for instance). This patch LG; if you need me

Re: [PATCH] D15710: [clang-tidy] Add non-inline function definition and variable definition check in header files.

2016-01-04 Thread Haojian Wu via cfe-commits
hokein added inline comments. Comment at: clang-tidy/misc/DefinitionsInHeadersCheck.cpp:31 @@ +30,3 @@ + // inline function with external linkage, class template, non-static function + // template, static data member of a class template, member function of a + // class template

Re: [PATCH] D15710: [clang-tidy] Add non-inline function definition and variable definition check in header files.

2016-01-04 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 43886. hokein added a comment. Move header file check to AST matcher. http://reviews.llvm.org/D15710 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/DefinitionsInHeadersCheck.cpp clang-tidy/misc/DefinitionsInHeadersCheck.h clang-tidy/misc/MiscT

Re: [PATCH] D15710: [clang-tidy] Add non-inline function definition and variable definition check in header files.

2016-01-04 Thread Haojian Wu via cfe-commits
hokein marked an inline comment as done. Comment at: clang-tidy/misc/DefinitionsInHeadersCheck.cpp:25 @@ +24,3 @@ + SourceLocation ExpansionLoc = SM.getExpansionLoc(Node.getLocStart()); + StringRef Filename = SM.getFilename(ExpansionLoc); + return Filename.endswith(".h") || Fil

Re: [PATCH] D15710: [clang-tidy] Add non-inline function definition and variable definition check in header files.

2016-01-04 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 43887. hokein added a comment. Add !inMainFile check. http://reviews.llvm.org/D15710 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/DefinitionsInHeadersCheck.cpp clang-tidy/misc/DefinitionsInHeadersCheck.h clang-tidy/misc/MiscTidyModule.cpp

Re: [PATCH] D15710: [clang-tidy] Add non-inline function definition and variable definition check in header files.

2016-01-04 Thread Haojian Wu via cfe-commits
hokein marked an inline comment as done. Comment at: docs/clang-tidy/checks/misc-definitions-in-headers.rst:19 @@ +18,3 @@ + } + + // error About the internal linkage variable definition, how about only warning the variable in unnamed namespace? The const/st

Re: [PATCH] D15710: [clang-tidy] Add non-inline function definition and variable definition check in header files.

2016-01-05 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 44003. hokein added a comment. Add UseHeaderFileExtension option. http://reviews.llvm.org/D15710 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/DefinitionsInHeadersCheck.cpp clang-tidy/misc/DefinitionsInHeadersCheck.h clang-tidy/misc/MiscTidyM

Re: [PATCH] D15710: [clang-tidy] Add non-inline function definition and variable definition check in header files.

2016-01-05 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 44006. hokein added a comment. Update doc. http://reviews.llvm.org/D15710 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/DefinitionsInHeadersCheck.cpp clang-tidy/misc/DefinitionsInHeadersCheck.h clang-tidy/misc/MiscTidyModule.cpp docs/clang-

Re: [PATCH] D15710: [clang-tidy] Add non-inline function definition and variable definition check in header files.

2016-01-05 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 44008. hokein added a comment. Update doc and address comments on test file. http://reviews.llvm.org/D15710 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/DefinitionsInHeadersCheck.cpp clang-tidy/misc/DefinitionsInHeadersCheck.h clang-tidy/mis

Re: [PATCH] D15710: [clang-tidy] Add non-inline function definition and variable definition check in header files.

2016-01-05 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 44010. hokein marked 4 inline comments as done. hokein added a comment. Update. http://reviews.llvm.org/D15710 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/DefinitionsInHeadersCheck.cpp clang-tidy/misc/DefinitionsInHeadersCheck.h clang-tidy/

Re: [PATCH] D15710: [clang-tidy] Add non-inline function definition and variable definition check in header files.

2016-01-05 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 44013. hokein marked 2 inline comments as done. hokein added a comment. Correct punctuation usage. http://reviews.llvm.org/D15710 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/DefinitionsInHeadersCheck.cpp clang-tidy/misc/DefinitionsInHeadersCh

Re: [PATCH] D15710: [clang-tidy] Add non-inline function definition and variable definition check in header files.

2016-01-05 Thread Haojian Wu via cfe-commits
hokein added inline comments. Comment at: docs/clang-tidy/checks/misc-definitions-in-headers.rst:20 @@ +19,3 @@ + const int c = 1; + namespace { + int f = 2; Done. I have also updated my comments here for these cases. Right now it should be ready for revi

Re: [PATCH] D15710: [clang-tidy] Add non-inline function definition and variable definition check in header files.

2016-01-07 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 44193. hokein added a comment. Address Aaron's comments. http://reviews.llvm.org/D15710 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/DefinitionsInHeadersCheck.cpp clang-tidy/misc/DefinitionsInHeadersCheck.h clang-tidy/misc/MiscTidyModule.cpp

Re: [PATCH] D15710: [clang-tidy] Add non-inline function definition and variable definition check in header files.

2016-01-07 Thread Haojian Wu via cfe-commits
hokein added a comment. In http://reviews.llvm.org/D15710#321198, @aaron.ballman wrote: > LGTM, thank you for working on this! Ping @Alexfh. After the patch gets merged, I will work on the configuration of header file extension. http://reviews.llvm.org/D15710 _

Re: [PATCH] D15710: [clang-tidy] Add non-inline function definition and variable definition check in header files.

2016-01-08 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 44313. hokein added a comment. Address Alex's comments. http://reviews.llvm.org/D15710 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/DefinitionsInHeadersCheck.cpp clang-tidy/misc/DefinitionsInHeadersCheck.h clang-tidy/misc/MiscTidyModule.cpp

Re: [PATCH] D15710: [clang-tidy] Add non-inline function definition and variable definition check in header files.

2016-01-08 Thread Haojian Wu via cfe-commits
hokein marked 4 inline comments as done. Comment at: clang-tidy/misc/DefinitionsInHeadersCheck.cpp:22 @@ +21,3 @@ + +AST_MATCHER(NamedDecl, useHeaderFileExtension) { + SourceManager& SM = Finder->getASTContext().getSourceManager(); alexfh wrote: > nit: This name

Re: [PATCH] D15710: [clang-tidy] Add non-inline function definition and variable definition check in header files.

2016-01-08 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 44317. hokein added a comment. More updates. http://reviews.llvm.org/D15710 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/DefinitionsInHeadersCheck.cpp clang-tidy/misc/DefinitionsInHeadersCheck.h clang-tidy/misc/MiscTidyModule.cpp docs/clan

Re: [PATCH] D15710: [clang-tidy] Add non-inline function definition and variable definition check in header files.

2016-01-08 Thread Haojian Wu via cfe-commits
hokein marked 3 inline comments as done. Comment at: test/clang-tidy/misc-definitions-in-headers.hpp:4 @@ +3,3 @@ +int f() { +// CHECK-MESSAGES: :[[@LINE-1]]:5: warning: function 'f' defined in a header file; +// CHECK-FIXES: inline int f() { alexfh wrote: > Plea

Re: [PATCH] D15710: [clang-tidy] Add non-inline function definition and variable definition check in header files.

2016-01-08 Thread Haojian Wu via cfe-commits
hokein marked an inline comment as done. hokein added a comment. http://reviews.llvm.org/D15710 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D15710: [clang-tidy] Add non-inline function definition and variable definition check in header files.

2016-01-08 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 44318. hokein added a comment. Add check name in test. http://reviews.llvm.org/D15710 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/DefinitionsInHeadersCheck.cpp clang-tidy/misc/DefinitionsInHeadersCheck.h clang-tidy/misc/MiscTidyModule.cpp

Re: [PATCH] D15710: [clang-tidy] Add non-inline function definition and variable definition check in header files.

2016-01-08 Thread Haojian Wu via cfe-commits
hokein marked an inline comment as done. hokein added a comment. http://reviews.llvm.org/D15710 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D16008: [clang-tidy] Add calling virtual functions in constructors/destructors check.

2016-01-12 Thread Haojian Wu via cfe-commits
hokein added a comment. In http://reviews.llvm.org/D16008#322811, @Eugene.Zelenko wrote: > This check is duplicate of clang-analyzer-alpha.cplusplus.VirtualCall. Oops... Didn't notice there is an implementation already. > From my point of view, Clang-tidy is better place, since such calls does

Re: [PATCH] D16113: [clang-tdiy] Add header file extension configuration support.

2016-01-12 Thread Haojian Wu via cfe-commits
hokein added inline comments. Comment at: clang-tidy/ClangTidyOptions.h:216 @@ +215,3 @@ +/// HeaderFileExtensions. +bool endWithHeaderFileExtensions(llvm::StringRef FileName, + llvm::StringRef HeaderFileExtensions); aaron.ballman w

Re: [PATCH] D16113: [clang-tdiy] Add header file extension configuration support.

2016-01-13 Thread Haojian Wu via cfe-commits
hokein added inline comments. Comment at: clang-tidy/tool/ClangTidyMain.cpp:78 @@ +77,3 @@ +static cl::opt +HeaderFileExtensions("header-file-extensions", + cl::desc("File extensions that regard as header file.\n" alexfh wrote: > We don't need

Re: [PATCH] D16113: [clang-tdiy] Add header file extension configuration support.

2016-01-14 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 44951. hokein added a comment. Address review comments. http://reviews.llvm.org/D16113 Files: clang-tidy/ClangTidy.cpp clang-tidy/ClangTidy.h clang-tidy/google/GlobalNamesInHeadersCheck.cpp clang-tidy/google/GlobalNamesInHeadersCheck.h clang-tidy/g

Re: [PATCH] D16113: [clang-tdiy] Add header file extension configuration support.

2016-01-14 Thread Haojian Wu via cfe-commits
hokein marked 11 inline comments as done. Comment at: clang-tidy/ClangTidy.h:65 @@ -56,3 +64,3 @@ /// \c CheckOptions. If the corresponding key is not present, returns /// \p Default. template Makes sense. I just refer from `std::string get(StringRef Loc

Re: [PATCH] D16113: [clang-tdiy] Add header file extension configuration support.

2016-01-15 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 45006. hokein marked an inline comment as done. hokein added a comment. Add extension-less header file doc. http://reviews.llvm.org/D16113 Files: clang-tidy/ClangTidy.cpp clang-tidy/ClangTidy.h clang-tidy/google/GlobalNamesInHeadersCheck.cpp clang-ti

Re: [PATCH] D16113: [clang-tdiy] Add header file extension configuration support.

2016-01-15 Thread Haojian Wu via cfe-commits
hokein marked 2 inline comments as done. Comment at: clang-tidy/ClangTidyOptions.cpp:269 @@ +268,3 @@ + SmallVector Suffixes; + HeaderFileExtensions.split(Suffixes, ','); + for (const auto& Suffix : Suffixes) { aaron.ballman wrote: > alexfh wrote: > > It's rath

Re: [PATCH] D16113: [clang-tdiy] Add header file extension configuration support.

2016-01-16 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 45077. hokein marked an inline comment as done. hokein added a comment. Format code style. http://reviews.llvm.org/D16113 Files: clang-tidy/ClangTidy.cpp clang-tidy/ClangTidy.h clang-tidy/google/GlobalNamesInHeadersCheck.cpp clang-tidy/google/GlobalN

Re: [PATCH] D16113: [clang-tdiy] Add header file extension configuration support.

2016-01-19 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 45349. hokein added a comment. Update comments. http://reviews.llvm.org/D16113 Files: clang-tidy/ClangTidy.cpp clang-tidy/ClangTidy.h clang-tidy/google/GlobalNamesInHeadersCheck.cpp clang-tidy/google/GlobalNamesInHeadersCheck.h clang-tidy/google/Un

Re: [PATCH] D16113: [clang-tdiy] Add header file extension configuration support.

2016-01-19 Thread Haojian Wu via cfe-commits
hokein marked 3 inline comments as done. Comment at: clang-tidy/google/GlobalNamesInHeadersCheck.h:26 @@ +25,3 @@ +/// - `HeaderFileExtensions`: a comma-separated list of filename extensions of +/// header files (no need to includ "."). "h" by default. +/// For extensio

Re: [PATCH] D16113: [clang-tdiy] Add header file extension configuration support.

2016-01-22 Thread Haojian Wu via cfe-commits
hokein marked an inline comment as done. Comment at: clang-tidy/utils/HeaderFileExtensionsUtils.cpp:49 @@ +48,3 @@ + AllHeaderFileExtensions.split(Suffixes, ','); + HeaderFileExtensions.clear(); + for (llvm::StringRef Suffix : Suffixes) { I'm +1 on keeping the

Re: [PATCH] D16152: [clang-tidy] Add check performance-faster-string-find

2016-01-22 Thread Haojian Wu via cfe-commits
hokein added a subscriber: hokein. Comment at: clang-tidy/performance/FasterStringFindCheck.h:25 @@ +24,3 @@ +/// The character literal overload is more efficient. +/// +/// For the user-facing documentation see: I think you need to add document about `StringLikeC

Re: [PATCH] D16113: [clang-tdiy] Add header file extension configuration support.

2016-01-25 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 45852. hokein added a comment. Change delimeter from "," to ";". http://reviews.llvm.org/D16113 Files: clang-tidy/ClangTidy.cpp clang-tidy/ClangTidy.h clang-tidy/google/GlobalNamesInHeadersCheck.cpp clang-tidy/google/GlobalNamesInHeadersCheck.h cla

Re: [PATCH] D16113: [clang-tdiy] Add header file extension configuration support.

2016-01-26 Thread Haojian Wu via cfe-commits
hokein added a comment. ping @alexfh. http://reviews.llvm.org/D16113 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D16578: [clang-tidy] bug fix: Don't warn on partial template specialization in `misc-definitions-in-headers` check.

2016-01-26 Thread Haojian Wu via cfe-commits
hokein added a comment. Yes, please help to land the patch for me :). Thanks. Repository: rL LLVM http://reviews.llvm.org/D16578 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D16717: [clang-tidy] Add non-constant references in function parameters check.

2016-02-01 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 46510. hokein added a comment. Fix code style. http://reviews.llvm.org/D16717 Files: clang-tidy/google/CMakeLists.txt clang-tidy/google/GoogleTidyModule.cpp clang-tidy/google/NonConstReferences.cpp clang-tidy/google/NonConstReferences.h docs/clang-

[PATCH] D16764: Move incorrect-roundings to upstream.

2016-02-01 Thread Haojian Wu via cfe-commits
hokein created this revision. hokein added a reviewer: alexfh. hokein added subscribers: jpienaar, cfe-commits. This is originally implemented by Jacques Pienaar. http://reviews.llvm.org/D16764 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/IncorrectRoundings.cpp clang-tidy/misc/Inc

Re: [PATCH] D16764: Move incorrect-roundings to upstream.

2016-02-01 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 46515. hokein added a comment. Update http://reviews.llvm.org/D16764 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/IncorrectRoundings.cpp clang-tidy/misc/IncorrectRoundings.h clang-tidy/misc/MiscTidyModule.cpp docs/clang-tidy/checks/list.rs

Re: [PATCH] D15560: [clang-tidy] Add non-inline function definition and variable definition check in header files.

2015-12-17 Thread Haojian Wu via cfe-commits
hokein added a comment. Oh, this is my first attempt to submit a patch, and it isn't ready for review. Just ignore it. Repository: rL LLVM http://reviews.llvm.org/D15560 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.o

Re: [PATCH] D15710: [clang-tidy] Add non-inline function definition and variable definition check in header files.

2015-12-23 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 43544. hokein added a comment. Update patch to address review comments. http://reviews.llvm.org/D15710 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/DefinitionsInHeadersCheck.cpp clang-tidy/misc/DefinitionsInHeadersCheck.h clang-tidy/misc/Mis

Re: [PATCH] D15710: [clang-tidy] Add non-inline function definition and variable definition check in header files.

2015-12-23 Thread Haojian Wu via cfe-commits
hokein marked 9 inline comments as done. Comment at: clang-tidy/google/DefinitionsInHeadersCheck.cpp:52 @@ +51,3 @@ +// Inline function is allowed. +if (funDecl->isInlined()) + return; alexfh wrote: > This check can be done in the matcher. The `isInli

Re: [PATCH] D15710: [clang-tidy] Add non-inline function definition and variable definition check in header files.

2015-12-23 Thread Haojian Wu via cfe-commits
hokein added a comment. @alexfh The case of member function of a nest class in a class template (like `int A::B::fun() {...}`) is also fixed now. Please review the patch again. Thanks. http://reviews.llvm.org/D15710 ___ cfe-commits mailing list c

[clang] 5932f3f - [clangCodeGen] Fix the build failure for 5c8985e7703b013c5df0612c3cbc1d333f4c5fa1

2024-02-14 Thread Haojian Wu via cfe-commits
Author: Haojian Wu Date: 2024-02-14T09:54:44+01:00 New Revision: 5932f3f861f84305bd01050d0af8e0dcb232a8b3 URL: https://github.com/llvm/llvm-project/commit/5932f3f861f84305bd01050d0af8e0dcb232a8b3 DIFF: https://github.com/llvm/llvm-project/commit/5932f3f861f84305bd01050d0af8e0dcb232a8b3.diff LO

[clang] [clang] Implement CTAD for type alias template. (PR #77890)

2024-02-20 Thread Haojian Wu via cfe-commits
https://github.com/hokein edited https://github.com/llvm/llvm-project/pull/77890 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement CTAD for type alias template. (PR #77890)

2024-02-20 Thread Haojian Wu via cfe-commits
@@ -10636,6 +10889,113 @@ QualType Sema::DeduceTemplateSpecializationFromInitializer( // clear on this, but they're not found by name so access does not apply. Guides.suppressDiagnostics(); + SmallVector GuidesCandidates; + if (AliasTemplate) { hokein w

[clang] [clang] Implement CTAD for type alias template. (PR #77890)

2024-02-20 Thread Haojian Wu via cfe-commits
hokein wrote: This patch is ready for review now. https://github.com/llvm/llvm-project/pull/77890 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Preserve found-decl when constructing VarTemplateIds (PR #82265)

2024-02-20 Thread Haojian Wu via cfe-commits
https://github.com/hokein approved this pull request. https://github.com/llvm/llvm-project/pull/82265 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Thread safety analysis: provide printSCFG definition. (PR #80277)

2024-02-20 Thread Haojian Wu via cfe-commits
hokein wrote: > It might have been commented out so that it doesn't take up space in the > compiled binary. > > I'd like seeing it compiled, just to make sure it doesn't break. But I'd also > like if it doesn't appear in the final binary. Perhaps we can change > visibility so that `--gc-secti

[clang] [clang-tools-extra] Reland "[clang] Preserve found-decl when constructing VarTemplateIds" (PR #82612)

2024-02-22 Thread Haojian Wu via cfe-commits
https://github.com/hokein approved this pull request. https://github.com/llvm/llvm-project/pull/82612 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [include-cleaner] Use FoundDecl only for using-shadow-decls (PR #82615)

2024-02-22 Thread Haojian Wu via cfe-commits
https://github.com/hokein approved this pull request. https://github.com/llvm/llvm-project/pull/82615 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Extend lifetime bound analysis to support assignments (PR #96475)

2024-07-01 Thread Haojian Wu via cfe-commits
https://github.com/hokein updated https://github.com/llvm/llvm-project/pull/96475 >From 97d1b80680112c3fa271501427a18273aed61dbe Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Mon, 24 Jun 2024 10:58:53 +0200 Subject: [PATCH 1/4] [clang] Extend the existing lifetimebound check for assignments.

<    16   17   18   19   20   21   22   23   24   25   >