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

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

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] 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 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

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") ||

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

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

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

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

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

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

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

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

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.

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

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] 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 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.

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

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

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

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

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

[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:

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

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] 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: >

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 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

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

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

[PATCH] D20966: [include-fixer] Add the missing header to the file where the unidentified symbol comes from.

2016-06-03 Thread Haojian Wu via cfe-commits
hokein created this revision. hokein added reviewers: bkramer, ioeric. hokein added a subscriber: cfe-commits. http://reviews.llvm.org/D20966 Files: include-fixer/IncludeFixer.cpp include-fixer/IncludeFixerContext.h include-fixer/tool/ClangIncludeFixer.cpp

Re: [PATCH] D21132: [include-fixer] Keep dot dot in SymbolInfo file paths.

2016-06-08 Thread Haojian Wu via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL272152: [include-fixer] Keep dot dot in SymbolInfo file paths. (authored by hokein). Changed prior to commit: http://reviews.llvm.org/D21132?vs=60041=60042#toc Repository: rL LLVM

[clang-tools-extra] r272152 - [include-fixer] Keep dot dot in SymbolInfo file paths.

2016-06-08 Thread Haojian Wu via cfe-commits
Author: hokein Date: Wed Jun 8 10:10:18 2016 New Revision: 272152 URL: http://llvm.org/viewvc/llvm-project?rev=272152=rev Log: [include-fixer] Keep dot dot in SymbolInfo file paths. Summary: Currently, removing dot dot in header's path doesn't make include-fixer minimize path correctly in some

Re: [PATCH] D21132: [include-fixer] Keep dot dot in SymbolInfo file paths.

2016-06-08 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 60041. hokein added a comment. Rebase. http://reviews.llvm.org/D21132 Files: include-fixer/find-all-symbols/PathConfig.cpp include-fixer/find-all-symbols/tool/FindAllSymbolsMain.cpp test/include-fixer/include_path.cpp

Re: [PATCH] D20467: [include-fixer] Mention more details in the document.

2016-06-07 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 59838. hokein added a comment. Fix typo. http://reviews.llvm.org/D20467 Files: docs/ReleaseNotes.rst docs/include-fixer.rst Index: docs/include-fixer.rst === --- docs/include-fixer.rst +++

[clang-tools-extra] r271989 - [include-fixer] Mention more details in the document.

2016-06-07 Thread Haojian Wu via cfe-commits
Author: hokein Date: Tue Jun 7 02:50:48 2016 New Revision: 271989 URL: http://llvm.org/viewvc/llvm-project?rev=271989=rev Log: [include-fixer] Mention more details in the document. Reviewers: bkramer Subscribers: Eugene.Zelenko, cfe-commits, ioeric Differential Revision:

Re: [PATCH] D20467: [include-fixer] Mention more details in the document.

2016-06-07 Thread Haojian Wu via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL271989: [include-fixer] Mention more details in the document. (authored by hokein). Changed prior to commit: http://reviews.llvm.org/D20467?vs=59838=59839#toc Repository: rL LLVM

Re: [PATCH] D20966: [include-fixer] Add the missing header to the file where the unidentified symbol comes from.

2016-06-07 Thread Haojian Wu via cfe-commits
hokein added inline comments. Comment at: include-fixer/IncludeFixer.cpp:104 @@ -103,3 @@ -// class Bar; -// Foo foo; -// bkramer wrote: > Does this patch do the right thing for the test case in the comment? > Otherwise we'll try add includes to

Re: [PATCH] D21059: [clang-tidy] Ignore the deleted function in misc-definitions-in-headers.

2016-06-07 Thread Haojian Wu via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL271991: [clang-tidy] Ignore the deleted function in misc-definitions-in-headers. (authored by hokein). Changed prior to commit: http://reviews.llvm.org/D21059?vs=59843=59845#toc Repository: rL LLVM

[clang-tools-extra] r271991 - [clang-tidy] Ignore the deleted function in misc-definitions-in-headers.

2016-06-07 Thread Haojian Wu via cfe-commits
Author: hokein Date: Tue Jun 7 03:55:38 2016 New Revision: 271991 URL: http://llvm.org/viewvc/llvm-project?rev=271991=rev Log: [clang-tidy] Ignore the deleted function in misc-definitions-in-headers. Reviewers: alexfh Subscribers: cfe-commits Differential Revision:

Re: [PATCH] D21059: [clang-tidy] Ignore the deleted function in misc-definitions-in-headers.

2016-06-07 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 59843. hokein marked an inline comment as done. hokein added a comment. Use the existing test file. http://reviews.llvm.org/D21059 Files: clang-tidy/misc/DefinitionsInHeadersCheck.cpp test/clang-tidy/misc-definitions-in-headers.hpp Index:

[PATCH] D21059: [clang-tidy] Ignore the deleted function in misc-definitions-in-headers.

2016-06-07 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/D21059 Files: clang-tidy/misc/DefinitionsInHeadersCheck.cpp test/clang-tidy/misc-definitions-in-headers-cxx11.hpp Index:

Re: [PATCH] D21036: Misplaced const-qualification with typedef types

2016-06-07 Thread Haojian Wu via cfe-commits
hokein added inline comments. Comment at: test/clang-tidy/misc-misplaced-const.c:17 @@ +16,3 @@ + const ip i3 = 0; + // CHECK-MESSAGES: :[[@LINE-1]]:12: warning: 'i3' declared with a const-qualified typedef type; results in the type being 'int *const' instead of 'const int *'

Re: [PATCH] D21036: Misplaced const-qualification with typedef types

2016-06-07 Thread Haojian Wu via cfe-commits
hokein added a comment. @aaron.ballman, you forgot to add the check in docs/ReleaseNotes.rst. http://reviews.llvm.org/D21036 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D20512: [PATCH] Bug 27475 - Request header guard check processes .hpp files as well as .h files

2016-06-07 Thread Haojian Wu via cfe-commits
hokein added inline comments. Comment at: clang-tidy/llvm/HeaderGuardCheck.h:19 @@ -18,3 +18,3 @@ /// Finds and fixes header guards that do not adhere to LLVM style. class LLVMHeaderGuardCheck : public utils::HeaderGuardCheck { hokein wrote: > madsravn wrote:

Re: [PATCH] D21019: [include-fixer] try to make vim header selection more friendly.

2016-06-06 Thread Haojian Wu via cfe-commits
hokein added inline comments. Comment at: include-fixer/tool/clang-include-fixer.py:53 @@ +52,3 @@ + except Exception: +if res == '': + # choose the top ranked header by default We can handle the ` ` , `a`, `q` cases after `res=vim.eval(to_eval)`

Re: [PATCH] D20467: [include-fixer] Mention more details in the document.

2016-06-06 Thread Haojian Wu via cfe-commits
hokein added a comment. In http://reviews.llvm.org/D20467#435685, @Eugene.Zelenko wrote: > Could you please mention include-fixer in docs/ReleaseNotes.rst? This is > definitely major new feature in upcoming release. Done. http://reviews.llvm.org/D20467

Re: [PATCH] D20467: [include-fixer] Mention more details in the document.

2016-06-06 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 59721. hokein marked an inline comment as done. hokein added a comment. Address review comments. http://reviews.llvm.org/D20467 Files: docs/ReleaseNotes.rst docs/include-fixer.rst Index: docs/include-fixer.rst

Re: [PATCH] D20467: [include-fixer] Mention more details in the document.

2016-06-06 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 59725. hokein marked 3 inline comments as done. hokein added a comment. Add comments. http://reviews.llvm.org/D20467 Files: docs/ReleaseNotes.rst docs/include-fixer.rst Index: docs/include-fixer.rst

Re: [PATCH] D20909: [clang-tidy] Ignore function context in misc-unused-using-decls.

2016-06-03 Thread Haojian Wu via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL271632: [clang-tidy] Ignore function context in misc-unused-using-decls. (authored by hokein). Changed prior to commit: http://reviews.llvm.org/D20909?vs=59492=59494#toc Repository: rL LLVM

[clang-tools-extra] r271632 - [clang-tidy] Ignore function context in misc-unused-using-decls.

2016-06-03 Thread Haojian Wu via cfe-commits
Author: hokein Date: Fri Jun 3 03:05:11 2016 New Revision: 271632 URL: http://llvm.org/viewvc/llvm-project?rev=271632=rev Log: [clang-tidy] Ignore function context in misc-unused-using-decls. Summary: Make the check's behavior more correct when handling using-decls in multiple scopes.

[PATCH] D20950: [include-fixer] Don't add missing header if the unindentified symbol isn't from the main file.

2016-06-03 Thread Haojian Wu via cfe-commits
hokein created this revision. hokein added a reviewer: bkramer. hokein added a subscriber: cfe-commits. The further solution is to add the missing header to the file where the symbol comes from. http://reviews.llvm.org/D20950 Files: include-fixer/IncludeFixer.cpp

Re: [PATCH] D20909: [clang-tidy] Ignore function context in misc-unused-using-decls.

2016-06-03 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 59492. hokein added a comment. Address code comments. http://reviews.llvm.org/D20909 Files: clang-tidy/misc/UnusedUsingDeclsCheck.cpp clang-tidy/misc/UnusedUsingDeclsCheck.h test/clang-tidy/misc-unused-using-decls.cpp Index:

[clang-tools-extra] r271660 - [include-fixer] Don't add missing header if the unindentified symbol isn't from the main file.

2016-06-03 Thread Haojian Wu via cfe-commits
Author: hokein Date: Fri Jun 3 06:26:02 2016 New Revision: 271660 URL: http://llvm.org/viewvc/llvm-project?rev=271660=rev Log: [include-fixer] Don't add missing header if the unindentified symbol isn't from the main file. Summary: The further solution is to add the missing header to the file

Re: [PATCH] D20950: [include-fixer] Don't add missing header if the unindentified symbol isn't from the main file.

2016-06-03 Thread Haojian Wu via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL271660: [include-fixer] Don't add missing header if the unindentified symbol isn't… (authored by hokein). Changed prior to commit: http://reviews.llvm.org/D20950?vs=59496=59529#toc Repository: rL

Re: [PATCH] D20581: [include-fixer] Simplify the code since we won't handle multiple includes at once.

2016-05-25 Thread Haojian Wu via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL270700: [include-fixer] Simplify the code since we won't handle multiple includes at… (authored by hokein). Changed prior to commit: http://reviews.llvm.org/D20581?vs=58272=58412#toc Repository: rL

Re: [PATCH] D20621: [include-fixer] Create a mode in vim integration to show multiple potential headers.

2016-05-25 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 58420. hokein added a comment. Fix a nit. http://reviews.llvm.org/D20621 Files: include-fixer/IncludeFixer.cpp include-fixer/IncludeFixer.h include-fixer/IncludeFixerContext.h include-fixer/tool/ClangIncludeFixer.cpp

Re: [PATCH] D20621: [include-fixer] Create a mode in vim integration to show multiple potential headers.

2016-05-25 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 58415. hokein added a comment. Rebase http://reviews.llvm.org/D20621 Files: include-fixer/IncludeFixer.cpp include-fixer/IncludeFixer.h include-fixer/IncludeFixerContext.h include-fixer/tool/ClangIncludeFixer.cpp

[PATCH] D21278: Fix an enum-compare compliation warning message.

2016-06-13 Thread Haojian Wu via cfe-commits
hokein created this revision. hokein added a reviewer: klimek. hokein added subscribers: cfe-commits, spatel. A follow-up fix on D21235. http://reviews.llvm.org/D21278 Files: lib/Target/X86/X86ISelLowering.cpp Index: lib/Target/X86/X86ISelLowering.cpp

Re: [PATCH] D21278: Fix an enumeral mismatch warning.

2016-06-13 Thread Haojian Wu via cfe-commits
hokein added a comment. In http://reviews.llvm.org/D21278#455850, @klimek wrote: > LG. Fix the change description when submitting, though - this is not about an > enum comparison, right? Done. This is enumeral mismatch indeed. http://reviews.llvm.org/D21278

Re: [PATCH] D21278: Fix an enumeral mismatch warning.

2016-06-13 Thread Haojian Wu via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL272539: Fix an enumeral mismatch warning. (authored by hokein). Changed prior to commit: http://reviews.llvm.org/D21278?vs=60494=60498#toc Repository: rL LLVM http://reviews.llvm.org/D21278 Files:

Re: [PATCH] D21371: [include-fixer] Correct two wrong header mappings.

2016-06-15 Thread Haojian Wu via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL272773: [include-fixer] Correct two wrong header mappings. (authored by hokein). Changed prior to commit: http://reviews.llvm.org/D21371?vs=60812=60814#toc Repository: rL LLVM

[PATCH] D21371: [include-fixer] Correct two wrong header mappings.

2016-06-15 Thread Haojian Wu via cfe-commits
hokein created this revision. hokein added a reviewer: bkramer. hokein added subscribers: cfe-commits, ioeric. http://reviews.llvm.org/D21371 Files: include-fixer/find-all-symbols/STLPostfixHeaderMap.cpp Index: include-fixer/find-all-symbols/STLPostfixHeaderMap.cpp

[clang-tools-extra] r272773 - [include-fixer] Correct two wrong header mappings.

2016-06-15 Thread Haojian Wu via cfe-commits
Author: hokein Date: Wed Jun 15 06:15:12 2016 New Revision: 272773 URL: http://llvm.org/viewvc/llvm-project?rev=272773=rev Log: [include-fixer] Correct two wrong header mappings. Reviewers: bkramer Subscribers: ioeric, cfe-commits Differential Revision: http://reviews.llvm.org/D21371

[PATCH] D21132: [include-fixer] Keep dot dot in SymbolInfo file paths.

2016-06-08 Thread Haojian Wu via cfe-commits
hokein created this revision. hokein added reviewers: bkramer, ioeric. hokein added a subscriber: cfe-commits. Currently, removing dot dot in header's path doesn't make include-fixer minimize path correctly in some cases, for example, specify a relative search path based on the build

Re: [PATCH] D20666: Fix a wrong check in misc-unused-using-decls

2016-05-30 Thread Haojian Wu via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL271199: Fix a wrong check in misc-unused-using-decls (authored by hokein). Changed prior to commit: http://reviews.llvm.org/D20666?vs=58576=58937#toc Repository: rL LLVM

[clang-tools-extra] r271199 - Fix a wrong check in misc-unused-using-decls

2016-05-30 Thread Haojian Wu via cfe-commits
Author: hokein Date: Mon May 30 02:42:22 2016 New Revision: 271199 URL: http://llvm.org/viewvc/llvm-project?rev=271199=rev Log: Fix a wrong check in misc-unused-using-decls Summary: We should check whether a UsingDecl is defined in macros or in class definition, not TargetDecls of the UsingDecl.

Re: [PATCH] D20621: [include-fixer] Create a mode in vim integration to show multiple potential headers.

2016-05-30 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 58942. hokein added a comment. Remove unneeded headers. http://reviews.llvm.org/D20621 Files: include-fixer/IncludeFixer.cpp include-fixer/IncludeFixer.h include-fixer/IncludeFixerContext.h include-fixer/tool/ClangIncludeFixer.cpp

Re: [PATCH] D20621: [include-fixer] Create a mode in vim integration to show multiple potential headers.

2016-05-30 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 58941. hokein marked 9 inline comments as done. hokein added a comment. Address comments. http://reviews.llvm.org/D20621 Files: include-fixer/IncludeFixer.cpp include-fixer/IncludeFixer.h include-fixer/IncludeFixerContext.h

Re: [PATCH] D20621: [include-fixer] Create a mode in vim integration to show multiple potential headers.

2016-05-30 Thread Haojian Wu via cfe-commits
hokein added a comment. In http://reviews.llvm.org/D20621#439447, @bkramer wrote: > Can you add some lit tests for the various command line modes > clang-include-fixer has now. We can't reasonably test the vim integration but > we can tests the bits it's composed of. Done.

Re: [PATCH] D20621: [include-fixer] Create a mode in vim integration to show multiple potential headers.

2016-05-30 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 58955. hokein marked an inline comment as done. hokein added a comment. Refactor createReplacementsForHeaders. http://reviews.llvm.org/D20621 Files: include-fixer/IncludeFixer.cpp include-fixer/IncludeFixer.h include-fixer/IncludeFixerContext.h

Re: [PATCH] D20621: [include-fixer] Create a mode in vim integration to show multiple potential headers.

2016-05-30 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 58964. hokein marked an inline comment as done. hokein added a comment. Use format::getStyle to get clang-format style. http://reviews.llvm.org/D20621 Files: include-fixer/IncludeFixer.cpp include-fixer/IncludeFixer.h

Re: [PATCH] D20621: [include-fixer] Create a mode in vim integration to show multiple potential headers.

2016-05-30 Thread Haojian Wu via cfe-commits
hokein added inline comments. Comment at: include-fixer/IncludeFixer.h:80 @@ +79,3 @@ +unsigned FirstIncludeOffset=-1U, +const clang::format::FormatStyle =clang::format::getLLVMStyle()); + Using a default argument in `Style` can simplify the code in some

Re: [PATCH] D20621: [include-fixer] Create a mode in vim integration to show multiple potential headers.

2016-05-31 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 59018. hokein marked 2 inline comments as done. hokein added a comment. Fix code style. http://reviews.llvm.org/D20621 Files: include-fixer/IncludeFixer.cpp include-fixer/IncludeFixer.h include-fixer/IncludeFixerContext.h

[PATCH] D20827: [include-fixer] Use YAML format in -output-headers and -insert-header mode.

2016-05-31 Thread Haojian Wu via cfe-commits
hokein created this revision. hokein added a reviewer: bkramer. hokein added a subscriber: cfe-commits. And some improvements: * Show better error messages on unfound symbols. * Fix a typo. http://reviews.llvm.org/D20827 Files: include-fixer/IncludeFixer.cpp

Re: [PATCH] D20809: [include-fixer] Show better messages on unfound symbols.

2016-05-31 Thread Haojian Wu via cfe-commits
hokein abandoned this revision. hokein added a comment. Abandon this in favor of http://reviews.llvm.org/D20827. http://reviews.llvm.org/D20809 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: [PATCH] D20827: [include-fixer] Use YAML format in -output-headers and -insert-header mode.

2016-05-31 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 59100. hokein added a comment. Remove unused code. http://reviews.llvm.org/D20827 Files: include-fixer/IncludeFixer.cpp include-fixer/IncludeFixerContext.h include-fixer/tool/ClangIncludeFixer.cpp include-fixer/tool/clang-include-fixer.py

Re: [PATCH] D20621: [include-fixer] Create a mode in vim integration to show multiple potential headers.

2016-05-31 Thread Haojian Wu via cfe-commits
hokein added a comment. In http://reviews.llvm.org/D20621#444050, @bkramer wrote: > LG. Can't wait to use it myself :) Currently, the header is only inserted at the first line of the file because we don't output the FirstIncludeOffset to py script. A follow-up patch will come soon.

Re: [PATCH] D20621: [include-fixer] Create a mode in vim integration to show multiple potential headers.

2016-05-31 Thread Haojian Wu via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL271258: [include-fixer] Create a mode in vim integration to show multiple potential… (authored by hokein). Changed prior to commit: http://reviews.llvm.org/D20621?vs=59028=59030#toc Repository: rL

[clang-tools-extra] r271258 - [include-fixer] Create a mode in vim integration to show multiple potential headers.

2016-05-31 Thread Haojian Wu via cfe-commits
Author: hokein Date: Tue May 31 04:31:51 2016 New Revision: 271258 URL: http://llvm.org/viewvc/llvm-project?rev=271258=rev Log: [include-fixer] Create a mode in vim integration to show multiple potential headers. Summary: Some changes in the patch: * Add two commandline flags in

Re: [PATCH] D20621: [include-fixer] Create a mode in vim integration to show multiple potential headers.

2016-05-31 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 59026. hokein added a comment. Update a out-of-date comment. http://reviews.llvm.org/D20621 Files: include-fixer/IncludeFixer.cpp include-fixer/IncludeFixer.h include-fixer/IncludeFixerContext.h include-fixer/tool/ClangIncludeFixer.cpp

Re: [PATCH] D20621: [include-fixer] Create a mode in vim integration to show multiple potential headers.

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

Re: [PATCH] D20621: [include-fixer] Create a mode in vim integration to show multiple potential headers.

2016-05-31 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 59028. hokein added a comment. Add -1U comment back. http://reviews.llvm.org/D20621 Files: include-fixer/IncludeFixer.cpp include-fixer/IncludeFixer.h include-fixer/IncludeFixerContext.h include-fixer/tool/ClangIncludeFixer.cpp

[clang-tools-extra] r271261 - [include-fixer] Add missing dependency.

2016-05-31 Thread Haojian Wu via cfe-commits
Author: hokein Date: Tue May 31 05:06:12 2016 New Revision: 271261 URL: http://llvm.org/viewvc/llvm-project?rev=271261=rev Log: [include-fixer] Add missing dependency. Modified: clang-tools-extra/trunk/include-fixer/tool/CMakeLists.txt Modified:

[PATCH] D20909: [clang-tidy] Ignore function context in misc-unused-using-decls.

2016-06-02 Thread Haojian Wu via cfe-commits
hokein created this revision. hokein added a reviewer: alexfh. hokein added a subscriber: cfe-commits. Make the check's behavior more correct when handling using-decls in multiple scopes. http://reviews.llvm.org/D20909 Files: clang-tidy/misc/UnusedUsingDeclsCheck.cpp

Re: [PATCH] D20519: [clang-tidy] Ignore ADL-style using decls in unused-using-decls check.

2016-05-26 Thread Haojian Wu via cfe-commits
hokein added inline comments. Comment at: clang-tidy/misc/UnusedUsingDeclsCheck.cpp:47 @@ +46,3 @@ + return; +// Ignores using-declarations defined in function definitions to avoid +// arguement-dependent lookup. alexfh wrote: > hokein wrote: > >

[PATCH] D20666: Fix a wrong check in misc-unused-using-decls

2016-05-26 Thread Haojian Wu via cfe-commits
hokein created this revision. hokein added a reviewer: alexfh. hokein added a subscriber: cfe-commits. We should check whether a UsingDecl is defined in macros or in class definition, not TargetDecls of the UsingDecl. http://reviews.llvm.org/D20666 Files:

[clang-tools-extra] r271382 - [include-fixer] Use YAML format in -output-headers and -insert-header mode.

2016-06-01 Thread Haojian Wu via cfe-commits
Author: hokein Date: Wed Jun 1 06:43:10 2016 New Revision: 271382 URL: http://llvm.org/viewvc/llvm-project?rev=271382=rev Log: [include-fixer] Use YAML format in -output-headers and -insert-header mode. Summary: And some improvements: * Show better error messages on unfound symbols. * Fix a

Re: [PATCH] D20827: [include-fixer] Use YAML format in -output-headers and -insert-header mode.

2016-06-01 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 59183. hokein added a comment. Get rid of yaml dependency, using json module. http://reviews.llvm.org/D20827 Files: include-fixer/IncludeFixer.cpp include-fixer/IncludeFixerContext.h include-fixer/tool/ClangIncludeFixer.cpp

Re: [PATCH] D20827: [include-fixer] Use YAML format in -output-headers and -insert-header mode.

2016-06-01 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 59184. hokein added a comment. Show error message when clang-include-fixer died with a fatal error. http://reviews.llvm.org/D20827 Files: include-fixer/IncludeFixer.cpp include-fixer/IncludeFixerContext.h include-fixer/tool/ClangIncludeFixer.cpp

Re: [PATCH] D20827: [include-fixer] Use YAML format in -output-headers and -insert-header mode.

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

Re: [PATCH] D20827: [include-fixer] Use YAML format in -output-headers and -insert-header mode.

2016-06-01 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 59187. hokein added a comment. Always escape headers. http://reviews.llvm.org/D20827 Files: include-fixer/IncludeFixer.cpp include-fixer/IncludeFixerContext.h include-fixer/tool/ClangIncludeFixer.cpp include-fixer/tool/clang-include-fixer.py

Re: [PATCH] D20827: [include-fixer] Use YAML format in -output-headers and -insert-header mode.

2016-06-01 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 59185. hokein added a comment. Use llvm::yaml::escape to escape double quote. http://reviews.llvm.org/D20827 Files: include-fixer/IncludeFixer.cpp include-fixer/IncludeFixerContext.h include-fixer/tool/ClangIncludeFixer.cpp

Re: [PATCH] D20827: [include-fixer] Use YAML format in -output-headers and -insert-header mode.

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

Re: [PATCH] D20809: [include-fixer] Show better messages on unfound symbols.

2016-05-31 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 59042. hokein added a comment. Rebase http://reviews.llvm.org/D20809 Files: include-fixer/IncludeFixer.cpp include-fixer/IncludeFixerContext.h include-fixer/tool/ClangIncludeFixer.cpp include-fixer/tool/clang-include-fixer.py Index:

[PATCH] D20809: [include-fixer] Show better messages on unfound symbols.

2016-05-31 Thread Haojian Wu via cfe-commits
hokein created this revision. hokein added a reviewer: bkramer. hokein added a subscriber: cfe-commits. Also some misc tweaks. http://reviews.llvm.org/D20809 Files: include-fixer/IncludeFixer.cpp include-fixer/IncludeFixerContext.h include-fixer/tool/ClangIncludeFixer.cpp

  1   2   3   4   5   6   7   8   9   10   >