[PATCH] D23989: Fix -Wunused-but-set-variable warning.

2016-08-29 Thread Haojian Wu via cfe-commits
hokein created this revision. hokein added a reviewer: bkramer. hokein added a subscriber: cfe-commits. A follow-up fix on r279958. https://reviews.llvm.org/D23989 Files: lib/Target/X86/X86ISelLowering.cpp Index: lib/Target/X86/X86ISelLowering.cpp =

Re: [PATCH] D23989: Fix -Wunused-but-set-variable warning.

2016-08-29 Thread Haojian Wu via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL279964: Fix -Wunused-but-set-variable warning. (authored by hokein). Changed prior to commit: https://reviews.llvm.org/D23989?vs=69554&id=69559#toc Repository: rL LLVM https://reviews.llvm.org/D2398

[clang-tools-extra] r280095 - [clang-tidy docs] Fix build errors on Sphinx 1.4.6

2016-08-30 Thread Haojian Wu via cfe-commits
Author: hokein Date: Tue Aug 30 09:29:36 2016 New Revision: 280095 URL: http://llvm.org/viewvc/llvm-project?rev=280095&view=rev Log: [clang-tidy docs] Fix build errors on Sphinx 1.4.6 Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/misc-suspicious-string-compare.rst clang-tools

Re: [PATCH] D23918: [clang-tidy docs] Add missing option docs.

2016-08-30 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 69679. hokein marked an inline comment as done. hokein added a comment. - Use empty string words. - rebase to master. https://reviews.llvm.org/D23918 Files: docs/clang-tidy/checks/cppcoreguidelines-pro-bounds-constant-array-index.rst docs/clang-tidy/chec

Re: [PATCH] D23918: [clang-tidy docs] Add missing option docs.

2016-08-31 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 69812. hokein marked 26 inline comments as done. hokein added a comment. Address aaron's comments. https://reviews.llvm.org/D23918 Files: docs/clang-tidy/checks/cppcoreguidelines-pro-bounds-constant-array-index.rst docs/clang-tidy/checks/google-build-nam

Re: [PATCH] D23918: [clang-tidy docs] Add missing option docs.

2016-08-31 Thread Haojian Wu via cfe-commits
hokein added a comment. wow, thanks for many detailed comments. Comment at: docs/clang-tidy/checks/google-build-namespaces.rst:21 @@ +20,3 @@ + extensions should not contain "." prefix). "h,hh,hpp,hxx" by default. For + extension-less header files, using an empty string or l

[PATCH] D24075: [include-fixer] Add a `query-symbol` option to query symbol without parsing the source file.

2016-08-31 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/D24075 Files: include-fixer/find-all-symbols/SymbolInfo.h include-fixer/tool/ClangIncludeFixer.cpp test/include-fixer/query_symbol.cpp Index: test/include-fixer/

Re: [PATCH] D23918: [clang-tidy docs] Add missing option docs.

2016-08-31 Thread Haojian Wu via cfe-commits
hokein added inline comments. Comment at: docs/clang-tidy/checks/google-build-namespaces.rst:21 @@ +20,3 @@ + extensions should not include "." prefix). Default is "h,hh,hpp,hxx". + For header files without an extension, use an empty string (if there are no + other desired e

Re: [PATCH] D23918: [clang-tidy docs] Add missing option docs.

2016-08-31 Thread Haojian Wu via cfe-commits
hokein marked an inline comment as done. Comment at: docs/clang-tidy/checks/google-build-namespaces.rst:21 @@ +20,3 @@ + extensions should not include "." prefix). Default is "h,hh,hpp,hxx". + For header files without an extension, use an empty string (if there are no + othe

Re: [PATCH] D23918: [clang-tidy docs] Add missing option docs.

2016-08-31 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 69838. hokein marked 3 inline comments as done. hokein added a comment. Fix more comments. https://reviews.llvm.org/D23918 Files: docs/clang-tidy/checks/cppcoreguidelines-pro-bounds-constant-array-index.rst docs/clang-tidy/checks/google-build-namespaces.

[clang-tools-extra] r280235 - [docs] Fix docs build error.

2016-08-31 Thread Haojian Wu via cfe-commits
Author: hokein Date: Wed Aug 31 08:17:48 2016 New Revision: 280235 URL: http://llvm.org/viewvc/llvm-project?rev=280235&view=rev Log: [docs] Fix docs build error. Modified: clang-tools-extra/trunk/docs/ReleaseNotes.rst Modified: clang-tools-extra/trunk/docs/ReleaseNotes.rst URL: http://llvm.

[clang-tools-extra] r280236 - [clang-tidy docs] Add missing option docs.

2016-08-31 Thread Haojian Wu via cfe-commits
Author: hokein Date: Wed Aug 31 08:21:18 2016 New Revision: 280236 URL: http://llvm.org/viewvc/llvm-project?rev=280236&view=rev Log: [clang-tidy docs] Add missing option docs. Reviewers: alexfh, Eugene.Zelenko, aaron.ballman Subscribers: aaron.ballman, cfe-commits Differential Revision: https:/

Re: [PATCH] D23918: [clang-tidy docs] Add missing option docs.

2016-08-31 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 69839. hokein added a comment. Update HeaderFileExtensions doc for all documents. https://reviews.llvm.org/D23918 Files: docs/clang-tidy/checks/cppcoreguidelines-pro-bounds-constant-array-index.rst docs/clang-tidy/checks/google-build-namespaces.rst doc

Re: [PATCH] D23918: [clang-tidy docs] Add missing option docs.

2016-08-31 Thread Haojian Wu via cfe-commits
This revision was automatically updated to reflect the committed changes. hokein marked an inline comment as done. Closed by commit rL280236: [clang-tidy docs] Add missing option docs. (authored by hokein). Changed prior to commit: https://reviews.llvm.org/D23918?vs=69839&id=69840#toc Reposito

Re: [PATCH] D24075: [include-fixer] Add a `query-symbol` option to query symbol without parsing the source file.

2016-08-31 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 69847. hokein added a comment. Update the test. https://reviews.llvm.org/D24075 Files: include-fixer/find-all-symbols/SymbolInfo.h include-fixer/tool/ClangIncludeFixer.cpp test/include-fixer/query_symbol.cpp Index: test/include-fixer/query_symbol.cpp

[clang-tools-extra] r280359 - [include-fixer] Fix an undefined variable exception in vim script when there is

2016-09-01 Thread Haojian Wu via cfe-commits
Author: hokein Date: Thu Sep 1 07:17:28 2016 New Revision: 280359 URL: http://llvm.org/viewvc/llvm-project?rev=280359&view=rev Log: [include-fixer] Fix an undefined variable exception in vim script when there is only one candidate header. Modified: clang-tools-extra/trunk/include-fixer/tool/

Re: [PATCH] D24075: [include-fixer] Add a `query-symbol` option to query symbol without parsing the source file.

2016-09-01 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 69994. hokein added a comment. Add editor scripts support. https://reviews.llvm.org/D24075 Files: include-fixer/find-all-symbols/SymbolInfo.h include-fixer/tool/ClangIncludeFixer.cpp include-fixer/tool/clang-include-fixer.el include-fixer/tool/clang-

Re: [PATCH] D24179: [include-fixer] Fix some Clang-tidy modernize-use-override and Include What You Use warnings; other minor fixes

2016-09-02 Thread Haojian Wu via cfe-commits
hokein accepted this revision. hokein added a comment. This revision is now accepted and ready to land. LGTM. Thanks! Repository: rL LLVM https://reviews.llvm.org/D24179 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.or

[PATCH] D24243: [clang-move] A prototype tool for moving class definition to new file.

2016-09-06 Thread Haojian Wu via cfe-commits
hokein created this revision. hokein added a subscriber: cfe-commits. This patch introduces a new tool which moves a specific class definition from files (.h, .cc) to new files (.h, .cc), which mostly acts like "Extract class defintion". In the long term, this tool should be merged in to clang-ref

Re: [PATCH] D24243: [clang-move] A prototype tool for moving class definition to new file.

2016-09-06 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 70362. hokein added a comment. Minor cleanup. https://reviews.llvm.org/D24243 Files: CMakeLists.txt clang-move/CMakeLists.txt clang-move/ClangMove.cpp clang-move/ClangMove.h clang-move/tool/CMakeLists.txt clang-move/tool/ClangMoveMain.cpp unitt

Re: [PATCH] D24243: [clang-move] A prototype tool for moving class definition to new file.

2016-09-06 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 70363. hokein added a comment. Fix function name style. https://reviews.llvm.org/D24243 Files: CMakeLists.txt clang-move/CMakeLists.txt clang-move/ClangMove.cpp clang-move/ClangMove.h clang-move/tool/CMakeLists.txt clang-move/tool/ClangMoveMain.c

Re: [PATCH] D24183: A clang tool for changing surrouding namespaces of class/function definitions.

2016-09-06 Thread Haojian Wu via cfe-commits
hokein added a comment. some initial comments. Comment at: change-namespace/CMakeLists.txt:9 @@ +8,3 @@ + LINK_LIBS + clangAST + clangBasic I think `clangASTMatchers` is needed here. Comment at: change-namespace/ChangeNamespace.cpp:21 @@ +20

Re: [PATCH] D24192: [clang-refactor] introducing clang-refactor

2016-09-06 Thread Haojian Wu via cfe-commits
hokein added a comment. > Eric's point was that this patch should only care about clang-refactor and > introduce changes directly related to creating clang-rename. clang-rename and > all other tools migration can be done later, which is also good in terms of > this patch not growing too large.

Re: [PATCH] D24075: [include-fixer] Support finding headers for the symbol under cursor.

2016-09-07 Thread Haojian Wu via cfe-commits
hokein added a comment. + Jens for reviewing emacs integration part. https://reviews.llvm.org/D24075 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D24243: [clang-move] A prototype tool for moving class definition to new file.

2016-09-07 Thread Haojian Wu via cfe-commits
hokein added inline comments. Comment at: clang-move/ClangMove.cpp:38 @@ +37,3 @@ + const clang::Module * /*Imported*/) override { +if (const auto *FileEntry = SM.getFileEntryForID(SM.getFileID(HashLoc))) { + if (IsAngled) { ioeri

Re: [PATCH] D24243: [clang-move] A prototype tool for moving class definition to new file.

2016-09-07 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 70538. hokein marked 19 inline comments as done. hokein added a comment. Herald added a subscriber: beanz. - Address review comments. https://reviews.llvm.org/D24243 Files: CMakeLists.txt clang-move/CMakeLists.txt clang-move/ClangMove.cpp clang-move/

Re: [PATCH] D24075: [include-fixer] Support finding headers for the symbol under cursor.

2016-09-07 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 70545. hokein marked an inline comment as done. hokein updated the summary for this revision. hokein added a comment. bool => boolean https://reviews.llvm.org/D24075 Files: include-fixer/find-all-symbols/SymbolInfo.h include-fixer/tool/ClangIncludeFixer.

Re: [PATCH] D24075: [include-fixer] Support finding headers for the symbol under cursor.

2016-09-07 Thread Haojian Wu via cfe-commits
hokein marked an inline comment as done. Comment at: include-fixer/tool/clang-include-fixer.el:204 @@ -197,3 +203,3 @@ (message (concat "Calling the include fixer. " "This might take some seconds. Please wait.")) massberg wrote: > Is this message

[clang-tools-extra] r280824 - [include-fixer] Support finding headers for the symbol under cursor.

2016-09-07 Thread Haojian Wu via cfe-commits
Author: hokein Date: Wed Sep 7 11:34:35 2016 New Revision: 280824 URL: http://llvm.org/viewvc/llvm-project?rev=280824&view=rev Log: [include-fixer] Support finding headers for the symbol under cursor. Summary: * Add a `query-symbol` option to query symbol without parsing the source file. * Updat

Re: [PATCH] D24075: [include-fixer] Support finding headers for the symbol under cursor.

2016-09-07 Thread Haojian Wu via cfe-commits
This revision was automatically updated to reflect the committed changes. hokein marked an inline comment as done. Closed by commit rL280824: [include-fixer] Support finding headers for the symbol under cursor. (authored by hokein). Changed prior to commit: https://reviews.llvm.org/D24075?vs=70

Re: [PATCH] D24572: [clang-tidy] Clean up code after applying replacements.

2016-09-15 Thread Haojian Wu via cfe-commits
hokein added inline comments. Comment at: clang-tidy/ClangTidy.cpp:206 @@ +205,3 @@ +StringRef Code = Buffer.get()->getBuffer(); +format::FormatStyle Style = format::getLLVMStyle(); +llvm::Expected CleanReplacements = ioeric wrote: > Add a

Re: [PATCH] D24183: A clang tool for changing surrouding namespaces of class/function definitions.

2016-09-15 Thread Haojian Wu via cfe-commits
hokein added inline comments. Comment at: change-namespace/ChangeNamespace.cpp:200 @@ +199,3 @@ + while (!NsSplitted.empty()) { +// FIXME: consider code style for comments. +Code = ("namespace " + NsSplitted.back() + " {\n" + Code + Doesn't `formatAndAppl

Re: [PATCH] D24243: [clang-move] A prototype tool for moving class definition to new file.

2016-09-15 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 71506. hokein marked 2 inline comments as done. hokein added a comment. Herald added a subscriber: mgorny. Address review comments. https://reviews.llvm.org/D24243 Files: CMakeLists.txt clang-move/CMakeLists.txt clang-move/ClangMove.cpp clang-move/Cl

Re: [PATCH] D24243: [clang-move] A prototype tool for moving class definition to new file.

2016-09-15 Thread Haojian Wu via cfe-commits
hokein added inline comments. Comment at: clang-move/ClangMove.cpp:104 @@ +103,3 @@ + std::reverse(Namespaces.begin(), Namespaces.end()); + return Namespaces; +} Aha, I see. I misused the `findLocationAfterToken` previously. Comment at: clang-m

Re: [PATCH] D24183: A clang tool for changing surrouding namespaces of class/function definitions.

2016-09-16 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 now. Comment at: change-namespace/ChangeNamespace.h:44 @@ +43,3 @@ +class ChangeNamespaceTool : ast_matchers::MatchFinder::MatchCallback { +public:

Re: [PATCH] D24380: [migrate-tool] Framework for a codebase-dependent migration tool.

2016-09-16 Thread Haojian Wu via cfe-commits
hokein added a comment. Sorry for the delay. The patch only contains an unittest for `HeaderGenerato`r, which is not quite enough. Should we create a fake migrate-tool binary to illustrate APIs usage? Comment at: migrate-tool/HeaderGenerator.h:22 @@ +21,3 @@ +public: + Header

Re: [PATCH] D24243: [clang-move] A prototype tool for moving class definition to new file.

2016-09-16 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 71631. hokein added a comment. Support fully quailified name only. https://reviews.llvm.org/D24243 Files: CMakeLists.txt clang-move/CMakeLists.txt clang-move/ClangMove.cpp clang-move/ClangMove.h clang-move/tool/CMakeLists.txt clang-move/tool/Clan

r299073 - Add `replace` interface with range in AtomicChange.

2017-03-30 Thread Haojian Wu via cfe-commits
Author: hokein Date: Thu Mar 30 08:07:38 2017 New Revision: 299073 URL: http://llvm.org/viewvc/llvm-project?rev=299073&view=rev Log: Add `replace` interface with range in AtomicChange. Reviewers: ioeric Reviewed By: ioeric Subscribers: alexshap, klimek, cfe-commits Differential Revision: https

[clang-tools-extra] r299190 - [clang-tidy] Correct code-block in the doc.

2017-03-31 Thread Haojian Wu via cfe-commits
Author: hokein Date: Fri Mar 31 02:55:22 2017 New Revision: 299190 URL: http://llvm.org/viewvc/llvm-project?rev=299190&view=rev Log: [clang-tidy] Correct code-block in the doc. Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/readability-container-size-empty.rst Modified: clang-too

[clang-tools-extra] r299419 - [clang-rename] Support renaming qualified symbol

2017-04-04 Thread Haojian Wu via cfe-commits
Author: hokein Date: Tue Apr 4 04:30:06 2017 New Revision: 299419 URL: http://llvm.org/viewvc/llvm-project?rev=299419&view=rev Log: [clang-rename] Support renaming qualified symbol Summary: The patch adds a new feature for renaming qualified symbol references. Unlike orginal clang-rename behavio

[clang-tools-extra] r299422 - Fix windows buildbot error.

2017-04-04 Thread Haojian Wu via cfe-commits
Author: hokein Date: Tue Apr 4 04:53:55 2017 New Revision: 299422 URL: http://llvm.org/viewvc/llvm-project?rev=299422&view=rev Log: Fix windows buildbot error. Modified: clang-tools-extra/trunk/clang-rename/USRLocFinder.cpp Modified: clang-tools-extra/trunk/clang-rename/USRLocFinder.cpp URL

[clang-tools-extra] r299764 - Fix compiler warnings: "ISO c99 requires rest arguments to be used" on

2017-04-07 Thread Haojian Wu via cfe-commits
Author: hokein Date: Fri Apr 7 07:37:32 2017 New Revision: 299764 URL: http://llvm.org/viewvc/llvm-project?rev=299764&view=rev Log: Fix compiler warnings: "ISO c99 requires rest arguments to be used" on the test file. Modified: clang-tools-extra/trunk/unittests/clang-rename/RenameClassTest.c

[clang-tools-extra] r300534 - [clang-tidy] Add a clang-tidy check for possible inefficient vector operations

2017-04-18 Thread Haojian Wu via cfe-commits
Author: hokein Date: Tue Apr 18 02:46:39 2017 New Revision: 300534 URL: http://llvm.org/viewvc/llvm-project?rev=300534&view=rev Log: [clang-tidy] Add a clang-tidy check for possible inefficient vector operations Summary: The "performance-inefficient-vector-operation" check finds vector oprations

[clang-tools-extra] r300563 - Make the test pass on x86_64-win32 target.

2017-04-18 Thread Haojian Wu via cfe-commits
Author: hokein Date: Tue Apr 18 11:25:03 2017 New Revision: 300563 URL: http://llvm.org/viewvc/llvm-project?rev=300563&view=rev Log: Make the test pass on x86_64-win32 target. Modified: clang-tools-extra/trunk/test/clang-tidy/performance-inefficient-vector-operation.cpp Modified: clang-too

[clang-tools-extra] r300588 - [clang-tidy] Address a few late comments.

2017-04-18 Thread Haojian Wu via cfe-commits
Author: hokein Date: Tue Apr 18 15:47:34 2017 New Revision: 300588 URL: http://llvm.org/viewvc/llvm-project?rev=300588&view=rev Log: [clang-tidy] Address a few late comments. Modified: clang-tools-extra/trunk/clang-tidy/performance/InefficientVectorOperationCheck.cpp Modified: clang-tools-

[clang-tools-extra] r292098 - [clang-move] Dump enum and type alias declarations.

2017-01-16 Thread Haojian Wu via cfe-commits
Author: hokein Date: Mon Jan 16 03:34:07 2017 New Revision: 292098 URL: http://llvm.org/viewvc/llvm-project?rev=292098&view=rev Log: [clang-move] Dump enum and type alias declarations. Reviewers: ioeric Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D28293 Modified:

[clang-tools-extra] r292207 - [clang-move] Ignore using decls which are defined in macros.

2017-01-17 Thread Haojian Wu via cfe-commits
Author: hokein Date: Tue Jan 17 04:08:11 2017 New Revision: 292207 URL: http://llvm.org/viewvc/llvm-project?rev=292207&view=rev Log: [clang-move] Ignore using decls which are defined in macros. Summary: Also ignore helpers which are defined in macro. Currently clang-move doesn't handle macro well

[clang-tools-extra] r292215 - [clang-move] Handle helpers with forward declarations.

2017-01-17 Thread Haojian Wu via cfe-commits
Author: hokein Date: Tue Jan 17 07:22:37 2017 New Revision: 292215 URL: http://llvm.org/viewvc/llvm-project?rev=292215&view=rev Log: [clang-move] Handle helpers with forward declarations. Reviewers: ioeric Reviewed By: ioeric Subscribers: cfe-commits Differential Revision: https://reviews.llvm

[clang-tools-extra] r292218 - Remove dead code.

2017-01-17 Thread Haojian Wu via cfe-commits
Author: hokein Date: Tue Jan 17 07:46:59 2017 New Revision: 292218 URL: http://llvm.org/viewvc/llvm-project?rev=292218&view=rev Log: Remove dead code. Modified: clang-tools-extra/trunk/clang-move/ClangMove.cpp Modified: clang-tools-extra/trunk/clang-move/ClangMove.cpp URL: http://llvm.org/v

[clang-tools-extra] r306378 - [clang-tidy] Fix type names in modernize-use-unique/shared_ptr checks.

2017-06-27 Thread Haojian Wu via cfe-commits
Author: hokein Date: Tue Jun 27 01:31:27 2017 New Revision: 306378 URL: http://llvm.org/viewvc/llvm-project?rev=306378&view=rev Log: [clang-tidy] Fix type names in modernize-use-unique/shared_ptr checks. Summary: If the class being created in unique_ptr is in anonymous nampespace, the anonymous n

[clang-tools-extra] r306421 - [clang-tidy] Handle new array expressions in modernize-make-unique check.

2017-06-27 Thread Haojian Wu via cfe-commits
Author: hokein Date: Tue Jun 27 09:25:05 2017 New Revision: 306421 URL: http://llvm.org/viewvc/llvm-project?rev=306421&view=rev Log: [clang-tidy] Handle new array expressions in modernize-make-unique check. Reviewers: alexfh Reviewed By: alexfh Subscribers: JDevlieghere, xazax.hun, cfe-commits

[clang-tools-extra] r306650 - [clang-tidy] follow-up on misc-definitions-in-header check.

2017-06-29 Thread Haojian Wu via cfe-commits
Author: hokein Date: Thu Jun 29 01:28:45 2017 New Revision: 306650 URL: http://llvm.org/viewvc/llvm-project?rev=306650&view=rev Log: [clang-tidy] follow-up on misc-definitions-in-header check. Summary: A follow-up on D34449: * add `-std=c++11` to `.hpp` file by default. * add constexpr function t

[clang-tools-extra] r306651 - [clang-tidy] Fix modernize-use-nullptr only warns the first NULL argument.

2017-06-29 Thread Haojian Wu via cfe-commits
Author: hokein Date: Thu Jun 29 01:43:36 2017 New Revision: 306651 URL: http://llvm.org/viewvc/llvm-project?rev=306651&view=rev Log: [clang-tidy] Fix modernize-use-nullptr only warns the first NULL argument. Reviewers: alexfh Reviewed By: alexfh Subscribers: xazax.hun, cfe-commits Differential

[clang-tools-extra] r307130 - [clang-tidy] Add "MakeSmartPtrFunction" option to modernize-make-shared/unique checks.

2017-07-05 Thread Haojian Wu via cfe-commits
Author: hokein Date: Wed Jul 5 00:49:00 2017 New Revision: 307130 URL: http://llvm.org/viewvc/llvm-project?rev=307130&view=rev Log: [clang-tidy] Add "MakeSmartPtrFunction" option to modernize-make-shared/unique checks. Reviewers: alexfh, aaron.ballman Reviewed By: alexfh Subscribers: JDevlieg

[clang-tools-extra] r307812 - [clang-tidy] Ignore blank spaces between cast's ")" and its sub expr.

2017-07-12 Thread Haojian Wu via cfe-commits
Author: hokein Date: Wed Jul 12 09:38:59 2017 New Revision: 307812 URL: http://llvm.org/viewvc/llvm-project?rev=307812&view=rev Log: [clang-tidy] Ignore blank spaces between cast's ")" and its sub expr. Summary: Before the change: `auto i = (Enum) 5;` => `auto i = static_cast( 5);` After the ch

[clang-tools-extra] r322370 - [clangd] Don't navigate to forward class declaration when go to definition.

2018-01-12 Thread Haojian Wu via cfe-commits
Author: hokein Date: Fri Jan 12 06:21:10 2018 New Revision: 322370 URL: http://llvm.org/viewvc/llvm-project?rev=322370&view=rev Log: [clangd] Don't navigate to forward class declaration when go to definition. Summary: For some cases, GoToDefinition will navigate to the forward class declaration,

r322661 - [Sema] Add visited contexts to CodeCompleteContext

2018-01-17 Thread Haojian Wu via cfe-commits
Author: hokein Date: Wed Jan 17 06:29:25 2018 New Revision: 322661 URL: http://llvm.org/viewvc/llvm-project?rev=322661&view=rev Log: [Sema] Add visited contexts to CodeCompleteContext Summary: This would allow code completion clients to know which context is visited during Sema code completion.

[clang-tools-extra] r322822 - [clang-tidy] Don't generate fix for argument constructed from std::initializer_list.

2018-01-18 Thread Haojian Wu via cfe-commits
Author: hokein Date: Thu Jan 18 00:58:18 2018 New Revision: 322822 URL: http://llvm.org/viewvc/llvm-project?rev=322822&view=rev Log: [clang-tidy] Don't generate fix for argument constructed from std::initializer_list. Summary: A follow-up fix of rL311652. The previous `vector` in our test is di

r322826 - [ASTMatcher] Add isScoped matcher for enumDecl.

2018-01-18 Thread Haojian Wu via cfe-commits
Author: hokein Date: Thu Jan 18 01:47:57 2018 New Revision: 322826 URL: http://llvm.org/viewvc/llvm-project?rev=322826&view=rev Log: [ASTMatcher] Add isScoped matcher for enumDecl. Summary: Reviewers: bkramer, aaron.ballman Subscribers: aaron.ballman, cfe-commits, klimek Differential Revision:

[clang-tools-extra] r322929 - [clangd] Collect enum constants in SymbolCollector

2018-01-19 Thread Haojian Wu via cfe-commits
Author: hokein Date: Fri Jan 19 01:35:55 2018 New Revision: 322929 URL: http://llvm.org/viewvc/llvm-project?rev=322929&view=rev Log: [clangd] Collect enum constants in SymbolCollector Summary: * ignore nameless symbols * include enum constant declarataion Reviewers: ilya-biryukov, jkorous-apple

[clang-tools-extra] r323189 - [clangd] Use accessible scopes to query indexes for global code completion.

2018-01-23 Thread Haojian Wu via cfe-commits
Author: hokein Date: Tue Jan 23 03:37:26 2018 New Revision: 323189 URL: http://llvm.org/viewvc/llvm-project?rev=323189&view=rev Log: [clangd] Use accessible scopes to query indexes for global code completion. Summary: * For qualified completion (foo::a^) * unresolved qualifier - use globa

[clang-tools-extra] r323191 - [clang-tidy] Don't generate fixes for invalid new expr location in modernize-make-unique.

2018-01-23 Thread Haojian Wu via cfe-commits
Author: hokein Date: Tue Jan 23 03:43:18 2018 New Revision: 323191 URL: http://llvm.org/viewvc/llvm-project?rev=323191&view=rev Log: [clang-tidy] Don't generate fixes for invalid new expr location in modernize-make-unique. Reviewers: ilya-biryukov Reviewed By: ilya-biryukov Subscribers: klimek

[clang-tools-extra] r323408 - [clangd] Limit completion results.

2018-01-25 Thread Haojian Wu via cfe-commits
Author: hokein Date: Thu Jan 25 01:20:09 2018 New Revision: 323408 URL: http://llvm.org/viewvc/llvm-project?rev=323408&view=rev Log: [clangd] Limit completion results. Summary: * truncate symbols from static/dynamic index to the limited number (which would save lots of cost in constructing the me

[clang-tools-extra] r323410 - [clangd] Disable typo correction when doing code completion.

2018-01-25 Thread Haojian Wu via cfe-commits
Author: hokein Date: Thu Jan 25 01:44:06 2018 New Revision: 323410 URL: http://llvm.org/viewvc/llvm-project?rev=323410&view=rev Log: [clangd] Disable typo correction when doing code completion. Reviewers: ilya-biryukov Reviewed By: ilya-biryukov Subscribers: klimek, jkorous-apple, cfe-commits,

[clang-tools-extra] r323865 - [clang-move] Clever on handling header file which includes itself.

2018-01-31 Thread Haojian Wu via cfe-commits
Author: hokein Date: Wed Jan 31 04:12:29 2018 New Revision: 323865 URL: http://llvm.org/viewvc/llvm-project?rev=323865&view=rev Log: [clang-move] Clever on handling header file which includes itself. Summary: Previously, we assume only old.cc includes "old.h", which would introduce incorrect fixe

[clang-tools-extra] r323867 - [clangd] Better handling symbols defined in macros.

2018-01-31 Thread Haojian Wu via cfe-commits
Author: hokein Date: Wed Jan 31 04:56:51 2018 New Revision: 323867 URL: http://llvm.org/viewvc/llvm-project?rev=323867&view=rev Log: [clangd] Better handling symbols defined in macros. Summary: For symbols defined inside macros: * use expansion location, if the symbol is formed via macro concate

[clang-tools-extra] r323960 - [clangd] remove the unused code NFC.

2018-02-01 Thread Haojian Wu via cfe-commits
Author: hokein Date: Thu Feb 1 05:06:58 2018 New Revision: 323960 URL: http://llvm.org/viewvc/llvm-project?rev=323960&view=rev Log: [clangd] remove the unused code NFC. Modified: clang-tools-extra/trunk/unittests/clangd/SymbolCollectorTests.cpp Modified: clang-tools-extra/trunk/unittests/cl

[clang-tools-extra] r324220 - [clangd] Expclictly set the init value of -assume-header-dir option, NFC.

2018-02-05 Thread Haojian Wu via cfe-commits
Author: hokein Date: Mon Feb 5 02:14:16 2018 New Revision: 324220 URL: http://llvm.org/viewvc/llvm-project?rev=324220&view=rev Log: [clangd] Expclictly set the init value of -assume-header-dir option, NFC. Modified: clang-tools-extra/trunk/clangd/global-symbol-builder/GlobalSymbolBuilderMai

[clang-tools-extra] r324233 - [clang-tidy] tweak "misc-definitions-in-headers" doc, NFC.

2018-02-05 Thread Haojian Wu via cfe-commits
Author: hokein Date: Mon Feb 5 05:04:41 2018 New Revision: 324233 URL: http://llvm.org/viewvc/llvm-project?rev=324233&view=rev Log: [clang-tidy] tweak "misc-definitions-in-headers" doc, NFC. Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/misc-definitions-in-headers.rst Modified:

[clang-tools-extra] r324235 - [clang-tidy] Fix incorrect code indention in the doc.

2018-02-05 Thread Haojian Wu via cfe-commits
Author: hokein Date: Mon Feb 5 05:23:48 2018 New Revision: 324235 URL: http://llvm.org/viewvc/llvm-project?rev=324235&view=rev Log: [clang-tidy] Fix incorrect code indention in the doc. Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/objc-property-declaration.rst Modified: clang-t

[clang-tools-extra] r295048 - [clang-tidy] Improve diagnostic message for misc-definitions-in-header.

2017-02-14 Thread Haojian Wu via cfe-commits
Author: hokein Date: Tue Feb 14 06:39:22 2017 New Revision: 295048 URL: http://llvm.org/viewvc/llvm-project?rev=295048&view=rev Log: [clang-tidy] Improve diagnostic message for misc-definitions-in-header. Summary: Users might get confused easily when they see the check's message on full template

[clang-tools-extra] r295178 - [clang-tidy] Ignore instantiated functions and static data members of classes in misc-definitions-in-headers.

2017-02-15 Thread Haojian Wu via cfe-commits
Author: hokein Date: Wed Feb 15 08:10:50 2017 New Revision: 295178 URL: http://llvm.org/viewvc/llvm-project?rev=295178&view=rev Log: [clang-tidy] Ignore instantiated functions and static data members of classes in misc-definitions-in-headers. Reviewers: alexfh Reviewed By: alexfh Subscribers:

[clang-tools-extra] r296337 - [clang-move] Extend clang-move to support moving global variable.

2017-02-27 Thread Haojian Wu via cfe-commits
Author: hokein Date: Mon Feb 27 07:19:13 2017 New Revision: 296337 URL: http://llvm.org/viewvc/llvm-project?rev=296337&view=rev Log: [clang-move] Extend clang-move to support moving global variable. Summary: Also support dumping global variables. Reviewers: ioeric Reviewed By: ioeric Subscribe

r296453 - [clang-format] Fix test failure caused by "rm" on some buildbots.

2017-02-28 Thread Haojian Wu via cfe-commits
Author: hokein Date: Tue Feb 28 03:03:07 2017 New Revision: 296453 URL: http://llvm.org/viewvc/llvm-project?rev=296453&view=rev Log: [clang-format] Fix test failure caused by "rm" on some buildbots. The begining command "rm" will return 1 when there is not such file to delete. This patch is to r

[clang-tools-extra] r296461 - [find-all-symbols] Implement operator== for SymbolAndSignals and SymbolInfo::Signals.

2017-02-28 Thread Haojian Wu via cfe-commits
Author: hokein Date: Tue Feb 28 04:13:26 2017 New Revision: 296461 URL: http://llvm.org/viewvc/llvm-project?rev=296461&view=rev Log: [find-all-symbols] Implement operator== for SymbolAndSignals and SymbolInfo::Signals. Modified: clang-tools-extra/trunk/include-fixer/find-all-symbols/SymbolIn

Re: r296453 - [clang-format] Fix test failure caused by "rm" on some buildbots.

2017-02-28 Thread Haojian Wu via cfe-commits
Oops, I should have read the patch more thoroughly, sorry for it. Thanks for the explanation. ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] r296479 - [clang-tidy] Fix a false positive on modernize-use-nullptr check.

2017-02-28 Thread Haojian Wu via cfe-commits
Author: hokein Date: Tue Feb 28 09:29:52 2017 New Revision: 296479 URL: http://llvm.org/viewvc/llvm-project?rev=296479&view=rev Log: [clang-tidy] Fix a false positive on modernize-use-nullptr check. Summary: The false positive happens on two neighbour CXXDefaultArgExpr AST nodes. like below: ```

[clang-tools-extra] r297009 - [clang-tidy] Ignore substituted template types in modernize-use-nullptr check.

2017-03-06 Thread Haojian Wu via cfe-commits
Author: hokein Date: Mon Mar 6 08:46:44 2017 New Revision: 297009 URL: http://llvm.org/viewvc/llvm-project?rev=297009&view=rev Log: [clang-tidy] Ignore substituted template types in modernize-use-nullptr check. Reviewers: alexfh Reviewed By: alexfh Subscribers: xazax.hun, malcolm.parsons, JDev

[clang-tools-extra] r297010 - Do not display highlights for clang-include-fixer-at-point

2017-03-06 Thread Haojian Wu via cfe-commits
Author: hokein Date: Mon Mar 6 08:49:26 2017 New Revision: 297010 URL: http://llvm.org/viewvc/llvm-project?rev=297010&view=rev Log: Do not display highlights for clang-include-fixer-at-point Summary: When invoking clang-include-fixer-at-point, the QuerySymbolInfos point to offset 0, length 0. R

[clang-tools-extra] r297367 - [clang-tidy] Update the doc according to r297311.

2017-03-09 Thread Haojian Wu via cfe-commits
Author: hokein Date: Thu Mar 9 03:15:16 2017 New Revision: 297367 URL: http://llvm.org/viewvc/llvm-project?rev=297367&view=rev Log: [clang-tidy] Update the doc according to r297311. Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/readability-function-size.rst Modified: clang-tools

[clang-tools-extra] r297450 - [clang-rename] Introduce an unittest skeleton for clang-rename.

2017-03-10 Thread Haojian Wu via cfe-commits
Author: hokein Date: Fri Mar 10 04:30:14 2017 New Revision: 297450 URL: http://llvm.org/viewvc/llvm-project?rev=297450&view=rev Log: [clang-rename] Introduce an unittest skeleton for clang-rename. Summary: This will make references rename tests easier. Reviewers: ioeric Reviewed By: ioeric Sub

[PATCH] D26493: [clang-move] Make the output code look more pretty.

2016-11-15 Thread Haojian Wu via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL286943: [clang-move] Make the output code look more pretty. (authored by hokein). Changed prior to commit: https://reviews.llvm.org/D26493?vs=77821&id=77958#toc Repository: rL LLVM https://reviews.l

[clang-tools-extra] r286943 - [clang-move] Make the output code look more pretty.

2016-11-15 Thread Haojian Wu via cfe-commits
Author: hokein Date: Tue Nov 15 03:06:59 2016 New Revision: 286943 URL: http://llvm.org/viewvc/llvm-project?rev=286943&view=rev Log: [clang-move] Make the output code look more pretty. Summary: Add decent blank lines between declarations: * Add extra blank line after #define or #includes. * Add e

[PATCH] D26637: [change-namespace] handle constructor initializer: Derived : Base::Base() {} and added conflict detections

2016-11-15 Thread Haojian Wu via cfe-commits
hokein added inline comments. Comment at: change-namespace/ChangeNamespace.cpp:343 + // FIXME(ioeric): this will change a base-class constructor initializer from + // "Base::Base(...)" to "ns::Base()", which compiles but is not perfect. Finder->addMatcher(nestedNameSpecifier

[PATCH] D26665: [clang-move] Support moving function.

2016-11-16 Thread Haojian Wu via cfe-commits
hokein added inline comments. Comment at: test/clang-move/move-function.cpp:9 +// CHECK-NEW-TEST-H-CASE1: #define {{.*}}NEW_FUNCTION_TEST_H +// CHECK-NEW-TEST-H-CASE1: inline int g() { return 0; } +// CHECK-NEW-TEST-H-CASE1: #endif // {{.*}}NEW_FUNCTION_TEST_H io

[PATCH] D26665: [clang-move] Support moving function.

2016-11-16 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 78160. hokein marked 4 inline comments as done. hokein added a comment. Add one more test and rename variables. https://reviews.llvm.org/D26665 Files: clang-move/ClangMove.cpp test/clang-move/Inputs/function_test.cpp test/clang-move/Inputs/function_tes

[PATCH] D26665: [clang-move] Support moving function.

2016-11-16 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 78171. hokein added a comment. Fix nits. https://reviews.llvm.org/D26665 Files: clang-move/ClangMove.cpp test/clang-move/Inputs/function_test.cpp test/clang-move/Inputs/function_test.h test/clang-move/move-function.cpp Index: test/clang-move/move-fu

[clang-tools-extra] r287101 - [clang-move] Support moving function.

2016-11-16 Thread Haojian Wu via cfe-commits
Author: hokein Date: Wed Nov 16 07:05:19 2016 New Revision: 287101 URL: http://llvm.org/viewvc/llvm-project?rev=287101&view=rev Log: [clang-move] Support moving function. Reviewers: ioeric Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D26665 Added: clang-tools-ex

[PATCH] D26665: [clang-move] Support moving function.

2016-11-16 Thread Haojian Wu via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL287101: [clang-move] Support moving function. (authored by hokein). Changed prior to commit: https://reviews.llvm.org/D26665?vs=78171&id=78174#toc Repository: rL LLVM https://reviews.llvm.org/D26665

[PATCH] D26637: [change-namespace] handle constructor initializer: Derived : Base::Base() {} and added conflict detections

2016-11-16 Thread Haojian Wu via cfe-commits
hokein added inline comments. Comment at: change-namespace/ChangeNamespace.cpp:346 + hasDeclaration(DeclMatcher.bind("from_decl"), + unless(hasAncestor(typeLoc(loc(qualType(hasDeclaration( + decl

[PATCH] D26637: [change-namespace] handle constructor initializer: Derived : Base::Base() {} and added conflict detections

2016-11-16 Thread Haojian Wu via cfe-commits
hokein added inline comments. Comment at: test/change-namespace/lambda-function.cpp:2 +// RUN: clang-change-namespace -old_namespace "na::nb" -new_namespace "x::y" --file_pattern ".*" %s -- -std=c++11 | sed 's,// CHECK.*,,' | FileCheck %s +#include +// CHECK: namespace x {

[PATCH] D26637: [change-namespace] handle constructor initializer: Derived : Base::Base() {} and added conflict detections

2016-11-16 Thread Haojian Wu via cfe-commits
hokein accepted this revision. hokein added a comment. This revision is now accepted and ready to land. LGTM once nits get fixed. Comment at: change-namespace/ChangeNamespace.cpp:346 + hasDeclaration(DeclMatcher.bind("from_decl"), +

[PATCH] D26752: [include-fixer] Refactor include fixer to be usable as a plugin

2016-11-17 Thread Haojian Wu via cfe-commits
hokein added inline comments. Comment at: include-fixer/IncludeFixer.cpp:64 getIncludeFixerContext(const clang::SourceManager &SourceManager, clang::HeaderSearch &HeaderSearch) { +return SemaSource.getIncludeFixerContext(SourceManager, HeaderSearc

[PATCH] D26751: [clang-tidy] Ignore template instantiations in modernize-use-equals-delete check

2016-11-17 Thread Haojian Wu via cfe-commits
hokein accepted this revision. hokein added a reviewer: hokein. hokein added a comment. This revision is now accepted and ready to land. LGTM, thanks. Comment at: clang-tidy/modernize/UseEqualsDeleteCheck.cpp:37 unless(anyOf(hasBody(stmt()), isDefaulted(), isDeleted(

[PATCH] D21298: [Clang-tidy] delete null check

2016-11-17 Thread Haojian Wu via cfe-commits
hokein added inline comments. Comment at: test/clang-tidy/readability-delete-null-pointer.cpp:3 + +#include + We don't rely on implementations of standard headers in lit test. You should fake the function/class that you need in this test. Co

[PATCH] D26752: [include-fixer] Refactor include fixer to be usable as a plugin

2016-11-17 Thread Haojian Wu via cfe-commits
hokein added inline comments. Comment at: include-fixer/IncludeFixer.cpp:136 + +auto Begin = StartOfFile.getLocWithOffset(Placed.getOffset()); +auto End = Begin.getLocWithOffset(Placed.getLength()); ioeric wrote: > bkramer wrote: > > hokein wrote: > > > I

[PATCH] D26752: [include-fixer] Refactor include fixer to be usable as a plugin

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

[PATCH] D26844: [clang-move] Fix not moving using-decls in global namespace in old.cc

2016-11-18 Thread Haojian Wu via cfe-commits
hokein created this revision. hokein added a reviewer: ioeric. hokein added a subscriber: cfe-commits. https://reviews.llvm.org/D26844 Files: clang-move/ClangMove.cpp test/clang-move/Inputs/multiple_class_test.cpp test/clang-move/move-multiple-classes.cpp Index: test/clang-move/move-multi

[PATCH] D26844: [clang-move] Fix not moving using-decls in global namespace in old.cc

2016-11-18 Thread Haojian Wu via cfe-commits
hokein added inline comments. Comment at: test/clang-move/move-multiple-classes.cpp:21 // CHECK-OLD-TEST-CPP: #include "{{.*}}multiple_class_test.h" +// CHECK-OLD-TEST-CPP: using a::Move1; +// CHECK-OLD-TEST-CPP: using namespace a; ioeric wrote: > Would there be

[PATCH] D26844: [clang-move] Fix not moving using-decls in global namespace in old.cc

2016-11-18 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 78491. hokein marked an inline comment as done. hokein added a comment. Add FIXME. https://reviews.llvm.org/D26844 Files: clang-move/ClangMove.cpp test/clang-move/Inputs/multiple_class_test.cpp test/clang-move/move-multiple-classes.cpp Index: test/cl

<    9   10   11   12   13   14   15   16   17   18   >