[PATCH] D42918: [clang-tidy] Update fuchsia-multiple-inheritance to check for templates

2018-02-06 Thread Haojian Wu via Phabricator 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/D42918 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[PATCH] D42947: Support special acronyms inside property names and allow plural forms

2018-02-06 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added a comment. This revision is now accepted and ready to land. LGTM Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D42947 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.l

[PATCH] D42942: [clangd] Collect definitions when indexing.

2018-02-06 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. I like where the patch is going now. Comment at: clangd/global-symbol-builder/GlobalSymbolBuilderMain.cpp:67 + // XXX this is just to make running the tool fast during dev! + bool BeginInvocation(CompilerInstance &CI) override { +const

[PATCH] D42913: [clangd] Fix incorrect file path for symbols defined by the compile command-line option.

2018-02-06 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 132956. hokein edited the summary of this revision. hokein added a comment. Fix a typo Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D42913 Files: clangd/index/SymbolCollector.cpp unittests/clangd/SymbolCollectorTests.cpp Index: unitte

[PATCH] D42913: [clangd] Fix incorrect file path for symbols defined by the compile command-line option.

2018-02-06 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL324328: [clangd] Fix incorrect file path for symbols defined by the compile command… (authored by hokein, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.ll

[PATCH] D42915: [clangd] Use URIs in index symbols.

2018-02-06 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clangd/index/Index.h:27 + // The URI of the source file where a symbol occurs. + llvm::StringRef FileUri; // The 0-based offset to the first character of the symbol from the beginning sammccall wrote: > ioeric wrote:

[PATCH] D42964: [clangd] Add Revision field to Symbol.

2018-02-06 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added reviewers: sammccall, ioeric. Herald added subscribers: jkorous-apple, ilya-biryukov, klimek. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D42964 Files: clangd/global-symbol-builder/GlobalSymbolBuilderMain.cpp clangd/index/Index.cpp

[PATCH] D42942: [clangd] Collect definitions when indexing.

2018-02-07 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clangd/global-symbol-builder/GlobalSymbolBuilderMain.cpp:67 + // XXX this is just to make running the tool fast during dev! + bool BeginInvocation(CompilerInstance &CI) override { +const auto &Inputs = CI.getInvocation()

[PATCH] D43075: [clang-move] Don't dump macro symbols.

2018-02-08 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: ioeric. Herald added a subscriber: klimek. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D43075 Files: clang-move/ClangMove.cpp unittests/clang-move/ClangMoveTests.cpp Index: unittests/clang-move/ClangMoveTests.cpp

[PATCH] D42942: [clangd] Collect definitions when indexing.

2018-02-09 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added a comment. This revision is now accepted and ready to land. LGTM. Comment at: clangd/index/Index.h:129 // - // A C++ symbol could have multiple declarations and one definition (e.g. - // a function is declared in ".h" file, and i

[PATCH] D43075: [clang-move] Don't dump macro symbols.

2018-02-09 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 133621. hokein marked an inline comment as done. hokein added a comment. Add more tests. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D43075 Files: clang-move/ClangMove.cpp unittests/clang-move/ClangMoveTests.cpp Index: unittests/clan

[PATCH] D43075: [clang-move] Don't dump macro symbols.

2018-02-09 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-move/ClangMove.cpp:526 unless(usingDirectiveDecl()), // using namespace decl. + notInMacro(), InOldHeader, ioeric wrote: > I'd probably relax the condition a bit; theoretically tools would be able

[PATCH] D43075: [clang-move] Don't dump macro symbols.

2018-02-09 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE324742: [clang-move] Don't dump macro symbols. (authored by hokein, committed by ). Changed prior to commit: https://reviews.llvm.org/D43075?vs=133621&id=133623#toc Repository: rCTE Clang Tools Ext

[PATCH] D43123: [clangd] Log all ignored diagnostics.

2018-02-12 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clangd/ClangdUnit.cpp:197 - -log(llvm::formatv("Ignored diagnostic outside main file. {0}: {1}", - Location, Message)); I'm not sure, do we care about this particular case (diagnostic outside main

[PATCH] D43174: [clang-move] Fix the incorrect expansion end location.

2018-02-12 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: ioeric. Herald added a subscriber: klimek. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D43174 Files: clang-move/ClangMove.cpp unittests/clang-move/ClangMoveTests.cpp Index: unittests/clang-move/ClangMoveTests.cpp

[PATCH] D43123: [clangd] Log all ignored diagnostics.

2018-02-12 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added a comment. This revision is now accepted and ready to land. LGTM. Comment at: clangd/ClangdUnit.cpp:197 - -log(llvm::formatv("Ignored diagnostic outside main file. {0}: {1}", - Location, Message)); ---

[PATCH] D43174: [clang-move] Fix the incorrect expansion end location.

2018-02-12 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL324886: [clang-move] Fix the incorrect expansion end location. (authored by hokein, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D43174 Files:

[PATCH] D43182: [clangd] SymbolLocation only covers symbol name.

2018-02-12 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: sammccall. Herald added subscribers: ioeric, jkorous-apple, ilya-biryukov, klimek. - Change the offset range to half-open, [start, end). - Fix a few fixmes. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D43182 Files: clan

[PATCH] D43223: [clang-tidy] Update fuchsia-multiple-inheritance to not fail

2018-02-13 Thread Haojian Wu via Phabricator 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/D43223 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[PATCH] D42983: [clang-tidy] Add readability-simd-intrinsics check.

2018-02-13 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tidy/readability/SIMDIntrinsicsCheck.cpp:46 + + static const llvm::StringMap Mapping{ +// [simd.alg] consider using `llvm::StringSwitch`? Comment at: clang-tidy/readability/SIMDIntrinsicsChec

[PATCH] D43182: [clangd] SymbolLocation only covers symbol name.

2018-02-13 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. hokein marked 2 inline comments as done. Closed by commit rL324992: [clangd] SymbolLocation only covers symbol name. (authored by hokein, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: h

[PATCH] D43182: [clangd] SymbolLocation only covers symbol name.

2018-02-13 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE324992: [clangd] SymbolLocation only covers symbol name. (authored by hokein, committed by ). Changed prior to commit: https://reviews.llvm.org/D43182?vs=133839&id=134008#toc Repository: rCTE Clang

[PATCH] D42983: [clang-tidy] Add readability-simd-intrinsics check.

2018-02-15 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added a comment. This revision is now accepted and ready to land. The clang-tidy code looks good. If no one has further comments, feel free to commit it. Comment at: clang-tidy/readability/SIMDIntrinsicsCheck.cpp:46 + + static const llvm:

[PATCH] D43385: [clangd] Add "clangd.trace" VSCode setting to enable tracing.

2018-02-19 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. Will make a new release for clangd vscode extension today. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D43385 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/li

[PATCH] D43452: [clangd] Bump vs-code clangd extension v0.0.3

2018-02-19 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: sammccall. Herald added subscribers: ioeric, jkorous-apple, ilya-biryukov, klimek. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D43452 Files: clangd/clients/clangd-vscode/package.json Index: clangd/clients/clangd-vscode/

[PATCH] D43452: [clangd] Bump vs-code clangd extension v0.0.3

2018-02-19 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. In https://reviews.llvm.org/D43452#1011825, @sammccall wrote: > (Do we need to bump this for the market to update properly? How do we decide > when to bump it?) Yes, every time we need to make a new release extension to vscode market, we need to bump the version. Rep

[PATCH] D43452: [clangd] Bump vs-code clangd extension v0.0.3

2018-02-19 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL325484: [clangd] Bump vs-code clangd extension v0.0.3 (authored by hokein, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D43452 Files: clang-t

[PATCH] D43455: [clangd] Add brief instructions on how to make a release for vscode-clangd extension.

2018-02-19 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: sammccall. Herald added subscribers: ioeric, jkorous-apple, ilya-biryukov, klimek. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D43455 Files: clangd/clients/clangd-vscode/README.md Index: clangd/clients/clangd-vscode/REA

[PATCH] D43455: [clangd] Add brief instructions on how to make a release for vscode-clangd extension.

2018-02-19 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 134900. hokein marked an inline comment as done. hokein added a comment. Address review comments. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D43455 Files: clangd/clients/clangd-vscode/README.md Index: clangd/clients/clangd-vscode/READ

[PATCH] D43455: [clangd] Add brief instructions on how to make a release for vscode-clangd extension.

2018-02-19 Thread Haojian Wu via Phabricator via cfe-commits
hokein marked an inline comment as done. hokein added inline comments. Comment at: clangd/clients/clangd-vscode/README.md:61 +* Make sure install the `vsce` command (`npm install -g vsce`) +* `llvm-vs-code-extensions` account + sammccall wrote: > increase the ver

[PATCH] D43455: [clangd] Add brief instructions on how to make a release for vscode-clangd extension.

2018-02-19 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. hokein marked an inline comment as done. Closed by commit rCTE325499: [clangd] Add brief instructions on how to make a release for vscode-clangd… (authored by hokein, committed by ). Changed prior to commit: https://revie

[PATCH] D43569: [clangd] Correct setting ignoreWarnings in CodeCompletion.

2018-02-21 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: ilya-biryukov. Herald added subscribers: ioeric, jkorous-apple, klimek. We should set the flag before creating ComplierInstance -- when CopmilerInstance gets initialized, it also initializes the DiagnosticsEngine using the DiagnosticOptions.

[PATCH] D43569: [clangd] Correct setting ignoreWarnings in CodeCompletion.

2018-02-22 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 135399. hokein added a comment. - add a comment - find one more incorrect usage, and fix it. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D43569 Files: clangd/CodeComplete.cpp clangd/Headers.cpp Index: clangd/Headers.cpp =

[PATCH] D43569: [clangd] Correct setting ignoreWarnings in CodeCompletion.

2018-02-22 Thread Haojian Wu via Phabricator via cfe-commits
hokein marked an inline comment as done. hokein added inline comments. Comment at: clangd/CodeComplete.cpp:705 } + CI->getDiagnosticOpts().IgnoreWarnings = true; auto Clang = prepareCompilerInstance( ilya-biryukov wrote: > Could we add a comment that this

[PATCH] D43569: [clangd] Correct setting ignoreWarnings in CodeCompletion.

2018-02-22 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. hokein marked an inline comment as done. Closed by commit rL325779: [clangd] Correct setting ignoreWarnings in CodeCompletion. (authored by hokein, committed by ). Herald added a subscriber: llvm-commits. Repository: rL L

[PATCH] D33304: [clang-tidy][Part1] Add a new module Android and three new checks.

2017-06-02 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. Thanks for the contributions. All your three checks are not android specific -- because they are checking POSIX APIs (`open`, `creat`, `fopen`), which are more likely related to POSIX. So personally, I'm +1 on a "posix" module, instead of "android", but wait to see othe

[PATCH] D33304: [clang-tidy][Part1] Add a new module Android and three new checks.

2017-06-07 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. In https://reviews.llvm.org/D33304#771493, @alexfh wrote: > IIUC, these checks enforce a certain - Android-specific - way of using POSIX > APIs. I'm not sure if the recommendations are universally useful. Or am I > mistaken? OK, that makes sense. I may miss some backgr

[PATCH] D33304: [clang-tidy][Part1] Add a new module Android and three new checks.

2017-06-14 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tidy/android/FileOpenFlagCheck.cpp:28 + hasParameter(1, hasType(isInteger())), + hasAnyName("open", "open64")) + .bind("funcDecl"))) --

[PATCH] D34206: [clang-tidy] Add "MakeSmartPtrFunction" option to modernize-make-shared/unique checks.

2017-06-14 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. Herald added a subscriber: xazax.hun. https://reviews.llvm.org/D34206 Files: clang-tidy/modernize/MakeSmartPtrCheck.cpp clang-tidy/modernize/MakeSmartPtrCheck.h docs/clang-tidy/checks/modernize-make-shared.rst docs/clang-tidy/checks/modernize-make-unique.rst

[PATCH] D34206: [clang-tidy] Add "MakeSmartPtrFunction" option to modernize-make-shared/unique checks.

2017-06-16 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 102833. hokein added a comment. More improvements. https://reviews.llvm.org/D34206 Files: clang-tidy/modernize/MakeSmartPtrCheck.cpp clang-tidy/modernize/MakeSmartPtrCheck.h docs/clang-tidy/checks/modernize-make-shared.rst docs/clang-tidy/checks/mode

[PATCH] D34286: [clang-tidy] Fix type names in modernize-use-unique/shared_ptr checks.

2017-06-16 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. Herald added a subscriber: xazax.hun. If the class being created in unique_ptr is in anonymous nampespace, the anonymous namespace will be included in the apply-fixes. This patch fix this. namespace { class Foo {}; } std::unique_ptr f; f.reset(new Foo());

[PATCH] D34286: [clang-tidy] Fix type names in modernize-use-unique/shared_ptr checks.

2017-06-16 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 102871. hokein added a comment. Update https://reviews.llvm.org/D34286 Files: clang-tidy/modernize/MakeSmartPtrCheck.cpp test/clang-tidy/modernize-make-unique.cpp Index: test/clang-tidy/modernize-make-unique.cpp

[PATCH] D34206: [clang-tidy] Add "MakeSmartPtrFunction" option to modernize-make-shared/unique checks.

2017-06-19 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. In https://reviews.llvm.org/D34206#780455, @Eugene.Zelenko wrote: > It'll be good idea to run modernize-make-unique on LLVM/Clang/etc for > llvm::make_unique. +1. See https://reviews.llvm.org/D34334, https://reviews.llvm.org/D34333. And found a few bugs in the check, w

[PATCH] D33304: [clang-tidy][Part1] Add a new module Android and three new checks.

2017-06-19 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added a comment. The code looks good to me now, I'd wait to see whether @alexfh has further comments before submitting the patch. Thanks for your patience with the review ;) Comment at: clang-tidy/android/FileOpenFlagCheck.cpp:61 + Sourc

[PATCH] D34449: [clang-tidy] Enable constexpr definitions in headers.

2017-06-21 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: test/clang-tidy/misc-definitions-in-headers.hpp:1 -// RUN: %check_clang_tidy %s misc-definitions-in-headers %t +// RUN: %check_clang_tidy %s misc-definitions-in-headers %t -- -- -std=c++1z The original code should work

[PATCH] D34526: [clang-tidy] Fix modernize-use-nullptr only warns the first NULL argument.

2017-06-22 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. Herald added a subscriber: xazax.hun. https://reviews.llvm.org/D34526 Files: clang-tidy/modernize/UseNullptrCheck.cpp test/clang-tidy/modernize-use-nullptr.cpp Index: test/clang-tidy/modernize-use-nullptr.cpp

[PATCH] D34449: [clang-tidy] Enable constexpr definitions in headers.

2017-06-22 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. Have thought this a bit more, I misunderstood your patch previously (sorry for that). I think what you intend to do is to ignore C++17 `inline variables` in headers, am I correct? Comment at: test/clang-tidy/misc-definitions-in-headers.hpp:1 -// RUN:

[PATCH] D34524: [clang-tidy] Fix a false positive in modernize-use-nullptr.

2017-06-23 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL306091: [clang-tidy] Fix a false positive in modernize-use-nullptr. (authored by hokein). Changed prior to commit: https://reviews.llvm.org/D34524?vs=103615&id=103702#toc Repository: rL LLVM https:/

[PATCH] D34206: [clang-tidy] Add "MakeSmartPtrFunction" option to modernize-make-shared/unique checks.

2017-06-26 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. In https://reviews.llvm.org/D34206#790406, @alexfh wrote: > In https://reviews.llvm.org/D34206#783673, @hokein wrote: > > > In https://reviews.llvm.org/D34206#780455, @Eugene.Zelenko wrote: > > > > > It'll be good idea to run modernize-make-unique on LLVM/Clang/etc for >

[PATCH] D34286: [clang-tidy] Fix type names in modernize-use-unique/shared_ptr checks.

2017-06-26 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 103995. hokein marked 2 inline comments as done. hokein added a comment. Herald added a subscriber: JDevlieghere. Address review comments. https://reviews.llvm.org/D34286 Files: clang-tidy/modernize/MakeSmartPtrCheck.cpp test/clang-tidy/modernize-make-un

[PATCH] D41178: [clangd] Construct SymbolSlab from YAML format.

2017-12-14 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 126909. hokein marked 5 inline comments as done. hokein added a comment. Address the review comments. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41178 Files: clangd/CMakeLists.txt clangd/index/Index.cpp clangd/index/Index.h clang

[PATCH] D41178: [clangd] Construct SymbolSlab from YAML format.

2017-12-14 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. Thanks for the comments! Comment at: clangd/index/SymbolFromYAML.cpp:32 +// supported in YAML I/O. +struct NPArray { + NPArray(IO &) {} sammccall wrote: > what does NP stand for? Ah, P is a typo here. N stands for Normalized. Renamed it

[PATCH] D41178: [clangd] Construct SymbolSlab from YAML format.

2017-12-14 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 126927. hokein marked 2 inline comments as done. hokein added a comment. MappingTraits is not Symbol's friend. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41178 Files: clangd/CMakeLists.txt clangd/index/Index.cpp clangd/index/Index.

[PATCH] D41178: [clangd] Construct SymbolSlab from YAML format.

2017-12-14 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL320694: [clangd] Construct SymbolSlab from YAML format. (authored by hokein, committed by ). Changed prior to commit: https://reviews.llvm.org/D41178?vs=126927&id=126929#toc Repository: rL LLVM http

[PATCH] D41280: [clangd] Don't use the optional "severity" when comparing Diagnostic.

2017-12-15 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: sammccall. Herald added subscribers: ilya-biryukov, klimek. We use Diagnostic as a key to find the corresponding FixIt when we do the "apply-fix", but the "severity" field could be omitted, in some cases, the codeAction request sent from LSP c

[PATCH] D41280: [clangd] Don't use the optional "severity" when comparing Diagnostic.

2017-12-15 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 127129. hokein marked 2 inline comments as done. hokein added a comment. Update based on the offline discussion. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41280 Files: clangd/ClangdLSPServer.h clangd/Protocol.h Index: clangd/Proto

[PATCH] D41280: [clangd] Don't use the optional "severity" when comparing Diagnostic.

2017-12-15 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. In https://reviews.llvm.org/D41280#956597, @sammccall wrote: > Can you give some more details about the problem (maybe offline)? > In my testing, I do see a FixIt in VSCode. It fails to apply, for reasons I > don't yet understand. As discussed offline, this is a regres

[PATCH] D41343: [clangd] in VSCode client, filter extensions properly and only accept file: URIs

2017-12-18 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added a comment. This revision is now accepted and ready to land. LGTM. Comment at: clangd/clients/clangd-vscode/src/extension.ts:25 -const cppFileExtensions: string[] = ['cpp', 'c', 'cc', 'cxx', 'c++', 'm', 'mm', 'h', 'hh', 'hpp', '

[PATCH] D41391: [clangd] Use the clang-tools-extra as the official repo for `vscode-clangd` extension.

2017-12-19 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added reviewers: sammccall, krasimir. Herald added subscribers: ilya-biryukov, klimek. Previously, we use a separate GitHub repository (https://github.com/llvm-vs-code-extensions/vscode-clangd) for publishing `vscode-clangd` extension to marketplace. To reduc

[PATCH] D41280: [clangd] Don't use the optional "severity" when comparing Diagnostic.

2017-12-19 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. ping, in case you miss this patch. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41280 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D41391: [clangd] Use the clang-tools-extra as the official repo for `vscode-clangd` extension.

2017-12-19 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 127529. hokein marked 3 inline comments as done. hokein added a comment. Address review comments and add license. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41391 Files: clangd/clients/clangd-vscode/LICENSE clangd/clients/clangd-vsco

[PATCH] D41280: [clangd] Don't use the optional "severity" when comparing Diagnostic.

2017-12-19 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 127586. hokein marked an inline comment as done. hokein added a comment. Fix typos. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41280 Files: clangd/ClangdLSPServer.h clangd/Protocol.h Index: clangd/Protocol.h ===

[PATCH] D41280: [clangd] Don't use the optional "severity" when comparing Diagnostic.

2017-12-19 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE321106: [clangd] Don't use the optional "severity" when comparing Diagnostic. (authored by hokein, committed by ). Changed prior to commit: https://reviews.llvm.org/D41280?vs=127586&id=127595#toc Re

[PATCH] D41391: [clangd] Use the clang-tools-extra as the official repo for `vscode-clangd` extension.

2017-12-21 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL321252: [clangd] Use the clang-tools-extra as the official repo for `vscode-clangd`… (authored by hokein, committed by ). Repository: rL LLVM https://reviews.llvm.org/D41391 Files: clang-tools-extra

[PATCH] D41483: [clangd] Index symbols share storage within a slab.

2017-12-21 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added a comment. This revision is now accepted and ready to land. Nice, LGTM. Comment at: clangd/index/Index.h:108 // // FIXME: Use a space-efficient implementation, a lot of Symbol fields could // share the same storage. ---

[PATCH] D41491: [clangd] Add a tool to build YAML-format global symbols.

2017-12-21 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: sammccall. Herald added subscribers: ilya-biryukov, mgorny, klimek. The tools is used to generate global symbols for clangd (global code completion), The format is YAML, which is only for **experiment**. TEST: used the tool to generate globa

[PATCH] D41491: [clangd] Add a tool to build YAML-format global symbols.

2017-12-22 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 128010. hokein marked 4 inline comments as done. hokein added a comment. Write all map-reduce logic into the global-symbol-builder binary, which makes the patch much simpler. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41491 Files: clan

[PATCH] D41491: [clangd] Add a tool to build YAML-format global symbols.

2017-12-22 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. Thanks for the comments. Comment at: clangd/CMakeLists.txt:50 add_subdirectory(tool) +add_subdirectory(global-symbol-builder) sammccall wrote: > I think generally we run `check-clang-tools` before committing - I guess it's > OK not to

[PATCH] D41506: [clangd] Use Builder for symbol slabs, and use sorted-vector for storage

2017-12-22 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clangd/index/Index.cpp:76 +SymbolSlab SymbolSlab::Builder::build() && { + Symbols = {Symbols.begin(), Symbols.end()}; // Force shrink-to-fit. + // Sort symbols so the slab can binary search over them. use `Symbols.shri

[PATCH] D41491: [clangd] Add a tool to build YAML-format global symbols.

2017-12-22 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. In https://reviews.llvm.org/D41491#963103, @sammccall wrote: > Thanks for the simplification! > How long does it take to run over LLVM on your machine? It took < 10 minutes (vs 20 minutes with python script) to run over LLVM. Comment at: clangd/globa

[PATCH] D41491: [clangd] Add a tool to build YAML-format global symbols.

2017-12-22 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 128020. hokein marked 4 inline comments as done. hokein added a comment. Address remaining review comments. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41491 Files: clangd/CMakeLists.txt clangd/global-symbol-builder/CMakeLists.txt c

[PATCH] D41491: [clangd] Add a tool to build YAML-format global symbols.

2017-12-22 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 128021. hokein marked an inline comment as done. hokein added a comment. Use GeneralCateogry. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41491 Files: clangd/CMakeLists.txt clangd/global-symbol-builder/CMakeLists.txt clangd/global-s

[PATCH] D41491: [clangd] Add a tool to build YAML-format global symbols.

2017-12-22 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL321358: [clangd] Add a tool to build YAML-format global symbols. (authored by hokein, committed by ). Changed prior to commit: https://reviews.llvm.org/D41491?vs=128021&id=128022#toc Repository: rL L

[PATCH] D41506: [clangd] Use Builder for symbol slabs, and use sorted-vector for storage

2017-12-22 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added a comment. This revision is now accepted and ready to land. LGTM. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41506 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.

[PATCH] D41661: [clangd] Don't navigate to forward class declaration when go to definition.

2018-01-02 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: sammccall. Herald added subscribers: ilya-biryukov, klimek. For some cases, GoToDefinition will navigate to the forward class declaration, we should always navigate to the class definition. Repository: rCTE Clang Tools Extra https://revie

[PATCH] D41668: [clangd] Add static index for the global code completion.

2018-01-02 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added reviewers: sammccall, ioeric. Herald added subscribers: ilya-biryukov, klimek. Use the YAML-format symbols (generated by the global-symbol-builder tool) to do the global code completion. It is **experimental** only , but it allows us to experience global

[PATCH] D41661: [clangd] Don't navigate to forward class declaration when go to definition.

2018-01-03 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 128501. hokein marked an inline comment as done. hokein added a comment. - Revise the way of checking definition. - Add a test for function declaration. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41661 Files: clangd/XRefs.cpp unittes

[PATCH] D41661: [clangd] Don't navigate to forward class declaration when go to definition.

2018-01-03 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. With more test, it turns out that `ASTNode.OrigD` is not always pointed to the definition, so we can't rely on `D` or `ASTNode.OrigD` :(. I revised the way of checking definition, it should works for major cases. Please review it again. Repository: rCTE Clang Tools E

[PATCH] D41668: [clangd] Add static index for the global code completion.

2018-01-03 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 128513. hokein marked 8 inline comments as done. hokein added a comment. Address review comments. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41668 Files: clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h clangd/ClangdServer.cpp

[PATCH] D41668: [clangd] Add static index for the global code completion.

2018-01-03 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. Thanks for the comments. Comment at: clangd/ClangdLSPServer.h:40 + bool BuildDynamicSymbolIndex, + std::unique_ptr GlobalIdx); ioeric wrote: > We are calling this global index and static index in the p

[PATCH] D41661: [clangd] Don't navigate to forward class declaration when go to definition.

2018-01-03 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 128516. hokein added a comment. Use getDefinition to simply the code. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41661 Files: clangd/XRefs.cpp unittests/clangd/XRefsTests.cpp Index: unittests/clangd/XRefsTests.cpp =

[PATCH] D41661: [clangd] Don't navigate to forward class declaration when go to definition.

2018-01-03 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clangd/XRefs.cpp:68 + // declaration, and it could be a forward declaration. + auto Def = std::find_if(D->redecls_begin(), D->redecls_end(), + [](const Decl *D) { return IsDefinition(D); });

[PATCH] D41668: [clangd] Add static index for the global code completion.

2018-01-04 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 128603. hokein marked an inline comment as done. hokein added a comment. Add index source information to the completion item. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41668 Files: clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h

[PATCH] D41668: [clangd] Add static index for the global code completion.

2018-01-04 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 128604. hokein added a comment. Update Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41668 Files: clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h clangd/ClangdServer.cpp clangd/ClangdServer.h clangd/CodeComplete.cpp clangd/C

[PATCH] D41730: [clangd] Use ToolExecutor to write the global-symbol-builder tool.

2018-01-05 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. The implementation looks good, but to see whether sam has high-level comments on this. Comment at: clangd/index/SymbolYAML.cpp:140 llvm::yaml::Output Yout(OS); for (Symbol S : Symbols) // copy: Yout<< requires mutability. Yout<< S; --

[PATCH] D41729: Add a tool executor that runs actions on all TUs in the compilation database.

2018-01-05 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added a comment. This revision is now accepted and ready to land. LGTM. Comment at: include/clang/Tooling/AllTUsExecution.h:34 + AllTUsToolExecutor(const CompilationDatabase &Compilations, + unsigned ThreadCount, +

[PATCH] D41759: [clangd] Catch more symbols in SymbolCollector.

2018-01-05 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: ilya-biryukov. Herald added a subscriber: klimek. We currently only collect external-linkage symbols in the collector, which results in missing some typical symbols (like no-linkage type alias symbols). This patch relaxes the constraint a bi

[PATCH] D41668: [clangd] Add static index for the global code completion.

2018-01-05 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 128741. hokein marked 5 inline comments as done. hokein added a comment. Address comments. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41668 Files: clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h clangd/ClangdServer.cpp clangd

[PATCH] D41668: [clangd] Add static index for the global code completion.

2018-01-05 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clangd/ClangdServer.h:342 std::unique_ptr FileIdx; + /// If set, this provides static index for project-wide global symbols. + std::unique_ptr StaticIdx; ioeric wrote: > ... in addition to the `FileIdx` above? Update

[PATCH] D41779: [clang-tidy] Fix DanglingHandleCheck for the correct conversion operation between basic_string and basic_string_view.

2018-01-08 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added a comment. This revision is now accepted and ready to land. LGTM Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41779 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.l

[PATCH] D41759: [clangd] Catch more symbols in SymbolCollector.

2018-01-08 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clangd/index/SymbolCollector.cpp:89 +// violations. +if (ND->isInAnonymousNamespace()) return true; ilya-biryukov wrote: > Why don't we include symbols from anonymous namespaces too? > They are very similar

[PATCH] D41852: [clang-tidy] Don't generate fix for argument constructed from std::initializer_list.

2018-01-09 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added reviewers: ilya-biryukov, alexfh. Herald added subscribers: xazax.hun, klimek. A follow-up fix of https://reviews.llvm.org/rL311652. The previous `vector` in our test is different with `std::vector`, so The check still generates fixes for std::vector (`a

[PATCH] D41823: [clangd] Add more filters for collected symbols.

2018-01-09 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. With this patch, the index-based code completion will not provide any candidates for `ns1::MyClass::^` (as the index-based completion drops all results from clang's completion engine), we need a way to combine symbols from 3 sources (static index, dynamic index and clan

[PATCH] D41668: [clangd] Add static index for the global code completion.

2018-01-09 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 129047. hokein marked 2 inline comments as done. hokein added a comment. Fix remaining comments. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41668 Files: clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h clangd/ClangdServer.cpp

[PATCH] D41759: [clangd] Catch more symbols in SymbolCollector.

2018-01-09 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 129053. hokein added a comment. Add a comment for symbols in anonymous namespace. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41759 Files: clangd/index/SymbolCollector.cpp unittests/clangd/SymbolCollectorTests.cpp Index: unittests/c

[PATCH] D41759: [clangd] Catch more symbols in SymbolCollector.

2018-01-09 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. hokein marked an inline comment as done. Closed by commit rCTE322067: [clangd] Catch more symbols in SymbolCollector. (authored by hokein, committed by ). Changed prior to commit: https://reviews.llvm.org/D41759?vs=129053

[PATCH] D41668: [clangd] Add static index for the global code completion.

2018-01-09 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 129081. hokein marked 4 inline comments as done. hokein added a comment. Address review comments. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41668 Files: clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h clangd/ClangdServer.cpp

[PATCH] D41668: [clangd] Add static index for the global code completion.

2018-01-10 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 129245. hokein marked 3 inline comments as done. hokein added a comment. - make static index independent with dynamic index - don't clear results from clang's completion engine as we also intend to merge them into the final results eventually. Repository:

[PATCH] D41823: [clangd] Add more filters for collected symbols.

2018-01-10 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added a comment. This revision is now accepted and ready to land. LGTM Comment at: clangd/index/SymbolCollector.h:20 -// Collect all symbols from an AST. -// -// Clients (e.g. clangd) can use SymbolCollector together with -// index::index

[PATCH] D41668: [clangd] Add static index for the global code completion.

2018-01-10 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 129265. hokein added a comment. - Update comment - Only use Sema results if the scope specifier (`ns::^`) is not a namespace scope specifier. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41668 Files: clangd/ClangdLSPServer.cpp clangd/

<    1   2   3   4   5   6   7   8   9   10   >