[PATCH] D54704: [clang-tidy] Don't generate incorrect fixes for class constructed from list-initialized arguments

2018-11-19 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: aaron.ballman. Herald added a subscriber: xazax.hun. Currently the smart_ptr check (modernize-make-unique) generates the fixes that cannot compile for cases like below -- because brace list can not be deduced in `make_unique`. class Bar { i

[PATCH] D54745: [clang-tidy] Don't generate incorrect fixes for class with deleted copy constructor in smart_ptr check.

2018-11-20 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added reviewers: JonasToth, aaron.ballman. Herald added a subscriber: xazax.hun. The fix for aggregate initialization (`std::make_unique(Foo {1, 2})` needs to see Foo copy constructor, otherwise we will have a compiler error. So we only emit the check warning.

[PATCH] D54745: [clang-tidy] Don't generate incorrect fixes for class with deleted copy constructor in smart_ptr check.

2018-11-20 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 174760. hokein marked 2 inline comments as done. hokein added a comment. Address review comments, handle move constructor as well. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D54745 Files: clang-tidy/modernize/MakeSmartPtrCheck.cpp tes

[PATCH] D54745: [clang-tidy] Don't generate incorrect fixes for class with deleted copy constructor in smart_ptr check.

2018-11-20 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. Thanks for the review. In https://reviews.llvm.org/D54745#1303972, @JonasToth wrote: > Does make_unique require the copy constructor if it could move? No, in that case, move constructor will be used. I have updated the patch to include these cases. > And would the sam

[PATCH] D54704: [clang-tidy] Don't generate incorrect fixes for class constructed from list-initialized arguments

2018-11-20 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 174771. hokein marked 2 inline comments as done. hokein added a comment. address comments. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D54704 Files: clang-tidy/modernize/MakeSmartPtrCheck.cpp test/clang-tidy/modernize-make-unique.cpp

[PATCH] D54704: [clang-tidy] Don't generate incorrect fixes for class constructed from list-initialized arguments

2018-11-20 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. In https://reviews.llvm.org/D54704#1304176, @aaron.ballman wrote: > > Currently the smart_ptr check (modernize-make-unique) generates the fixes > > that cannot compile for cases like below -- because brace list can not be > > deduced in make_unique. > > > > class Bar

[PATCH] D54704: [clang-tidy] Don't generate incorrect fixes for class constructed from list-initialized arguments

2018-11-20 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL347315: [clang-tidy] Don't generate incorrect fixes for class constructed from list… (authored by hokein, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.ll

[PATCH] D52713: Move llvm util dependencies from clang-tools-extra to add_lit_target.

2018-11-21 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a subscriber: chapuni. hokein added a comment. Hi @mgorny, sorry for the trouble it might cause. In https://reviews.llvm.org/D52713#1305164, @mgorny wrote: > I would like to request reverting this. It's established standard within LLVM > to explicitly specify the dependencies the p

[PATCH] D54796: [clangd] **Prototype**: C++ API for emitting file status

2018-11-21 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay, ioeric, javed.absar, ilya-biryukov. This is a quick prototype (with hacky implementation). Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D54796 Files: clangd/ClangdLSPS

[PATCH] D54798: Move the llvm lit test dependencies to clang-tools-extra.

2018-11-21 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: mgorny. Part of revert r343473 Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D54798 Files: test/CMakeLists.txt Index: test/CMakeLists.txt === --- test/CMak

[PATCH] D52713: Move llvm util dependencies from clang-tools-extra to add_lit_target.

2018-11-21 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. In https://reviews.llvm.org/D52713#1305291, @mgorny wrote: > This particular build method uses system-wide installation of these tools. Sounds fair enough. I sent you two patches to move this back to clang-tools-extra. Repository: rL LLVM https://reviews.llvm.org/D

[PATCH] D54796: [clangd] **Prototype**: C++ API for emitting file status

2018-11-21 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. The code is not polished yet, I'd like to get some high-level comments before moving further. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D54796 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

[PATCH] D54798: Move the llvm lit test dependencies to clang-tools-extra.

2018-11-22 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 175021. hokein added a comment. Address comments. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D54798 Files: test/CMakeLists.txt Index: test/CMakeLists.txt === --- test/CMa

[PATCH] D54781: [clangd] Add 'Switch header/source' command in clangd-vscode

2018-11-22 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clangd/clients/clangd-vscode/src/extension.ts:4 import { realpathSync } from 'fs'; +import { RequestType, TextDocumentIdentifier } from 'vscode-languageclient'; We have imported the whole module as `vscodelc`, maybe ju

[PATCH] D54798: Move the llvm lit test dependencies to clang-tools-extra.

2018-11-22 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL347449: Move the llvm lit test dependencies to clang-tools-extra. (authored by hokein, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D54798 File

[PATCH] D54781: [clangd] Add 'Switch header/source' command in clangd-vscode

2018-11-22 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clangd/clients/clangd-vscode/src/extension.ts:17 +export namespace SwitchSourceHeaderRequest { +export const type = new RequestType('textDocument/switchSourceHeader'); +} hokein wrote: > Is `textDocument/switchSourceH

[PATCH] D54832: [clang-tidy] No fixes for auto new expression in smart check

2018-11-22 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: aaron.ballman. Herald added a subscriber: xazax.hun. The fix for `auto` new expression is illegal. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D54832 Files: clang-tidy/modernize/MakeSmartPtrCheck.cpp test/clang-tidy/m

[PATCH] D54799: [clangd][WIP] textDocument/CursorInfo method

2018-11-23 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: XRefs.cpp:95 Preprocessor &PP; + const bool StopOnFirstDeclFound; sammccall wrote: > jkorous wrote: > > sammccall wrote: > > > Please don't do this - it's inconsistent with the other XRefs features. > > > (If for so

[PATCH] D54796: [clangd] **Prototype**: C++ API for emitting file status

2018-11-23 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 175135. hokein marked 2 inline comments as done. hokein added a comment. Polish the code, address comments. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D54796 Files: clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h clangd/ClangdSe

[PATCH] D54796: [clangd] **Prototype**: C++ API for emitting file status

2018-11-23 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. Thanks for the comment, the patch should be ready for review. There is one thing I'm not certain: should we stop emitting the file status when the file is removed (similar to the behavior of diagnostics)? For example, the file is removed while the AST is building. The cu

[PATCH] D54745: [clang-tidy] Don't generate incorrect fixes for class with deleted copy/move constructor in smart_ptr check.

2018-11-26 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 175205. hokein marked 3 inline comments as done. hokein added a comment. Address review comments. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54745/new/ https://reviews.llvm.org/D54745 Files: clang-tidy/mode

[PATCH] D54745: [clang-tidy] Don't generate incorrect fixes for class with deleted copy/move constructor in smart_ptr check.

2018-11-26 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL347537: [clang-tidy] Don't generate incorrect fixes for class with deleted copy… (authored by hokein, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES SINCE LAST ACT

[PATCH] D54832: [clang-tidy] No fixes for auto new expression in smart check

2018-11-26 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 175216. hokein marked 3 inline comments as done. hokein added a comment. No diagnose this case as well. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54832/new/ https://reviews.llvm.org/D54832 Files: clang-tid

[PATCH] D54832: [clang-tidy] No fixes for auto new expression in smart check

2018-11-26 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: test/clang-tidy/modernize-make-unique.cpp:288 + // CHECK-MESSAGES: :[[@LINE-1]]:7: warning: use std::make_unique instead + // CHECK-FIXES: PE1.reset(new auto(E())); + aaron.ballman wrote: > It seems like we could also g

[PATCH] D54781: [clangd] Add 'Switch header/source' command in clangd-vscode

2018-11-26 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. @malaperle, do you want a new release of `vscode-clangd` extension for this? Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54781/new/ https://reviews.llvm.org/D54781 ___ cfe-commits mailing lis

[PATCH] D54832: [clang-tidy] No fixes for auto new expression in smart check

2018-11-26 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 175227. hokein marked 2 inline comments as done. hokein added a comment. Fix a typo. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54832/new/ https://reviews.llvm.org/D54832 Files: clang-tidy/modernize/MakeSma

[PATCH] D54832: [clang-tidy] No fixes for auto new expression in smart check

2018-11-26 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. Thanks for the quick review. Comment at: test/clang-tidy/modernize-make-unique.cpp:285 + // No warninags for `auto` new expression. + PE1.reset(new auto(E())); aaron.ballman wrote: > warninags -> warnings oops... Repository: rCTE

[PATCH] D54832: [clang-tidy] No fixes for auto new expression in smart check

2018-11-26 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE347551: [clang-tidy] No warning for auto new expression in smart check (authored by hokein, committed by ). Changed prior to commit: https://reviews.llvm.org/D54832?vs=175227&id=175228#toc Repository

[PATCH] D54796: [clangd] C++ API for emitting file status

2018-11-26 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 175277. hokein marked 2 inline comments as done. hokein added a comment. Herald added a subscriber: jfb. stop emitting file status when ASTworker is shutting down. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D547

[PATCH] D54796: [clangd] C++ API for emitting file status

2018-11-26 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. > It would be reasonable to be consistent with diagnostics: stop emitting the > statuses when ASTWorker was put into shutdown mode. Thanks, sounds fair. Comment at: clangd/ClangdServer.h:39 +// FIXME: find a better name. class DiagnosticsConsumer {

[PATCH] D54781: [clangd] Add 'Switch header/source' command in clangd-vscode

2018-11-28 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. Just made a new release v0.0.7, please try to use it (it works on my machine). Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54781/new/ https://reviews.llvm.org/D54781 ___ cfe-commits mailing l

[PATCH] D54998: [clangd] Build and test IndexBenchmark in check-clangd

2018-11-28 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: ilya-biryukov. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay, ioeric, mgorny. Include IndexBenchmark in check-clangd to make sure we won't forget to update it when doing breaking changes; also fix an out-of-date test input.

[PATCH] D54998: [clangd] Build and test IndexBenchmark in check-clangd

2018-11-28 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE347753: [clangd] Build and test IndexBenchmark in check-clangd (authored by hokein, committed by ). Changed prior to commit: https://reviews.llvm.org/D54998?vs=175659&id=175672#toc Repository: rCTE

[PATCH] D54796: [clangd] C++ API for emitting file status

2018-11-29 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 175859. hokein marked 10 inline comments as done. hokein added a comment. - address review comments - drop the LSP change, only focus on TUScheduler in this patch Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D5479

[PATCH] D54796: [clangd] C++ API for emitting file status

2018-11-29 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. @ilya-biryukov, I hope the current patch is not too big for you to review, happy to chat offline if you want (sam and I had a lot of discussions before he is OOO). Comment at: clangd/ClangdLSPServer.cpp:787 +void ClangdLSPServer::onFileUpdated(const Fi

[PATCH] D55052: Fix junk output in clangd vscode plugin

2018-11-29 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. @jfindley I'd like to understand how do these log messages noise you? Does the window prompt up to you automatically (this only happens when there is an error in clangd)? These messages only get print to the `clangd-vscode` output panel which is used for debugging purpo

[PATCH] D55052: Fix junk output in clangd vscode plugin

2018-11-29 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. In D55052#1312760 , @ilya-biryukov wrote: > +1 to the change, this is annoying for me too. > > In D55052#1312753 , @hokein wrote: > > > @jfindley I'd like to understand how do these log mess

[PATCH] D55052: Fix junk output in clangd vscode plugin

2018-11-30 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL347968: [clangd] Fix junk output in clangd vscode plugin (authored by hokein, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D55052?vs=175897&

[PATCH] D55052: Fix junk output in clangd vscode plugin

2018-11-30 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. > Yeah, there are still modes where clangd behaves badly there. Note that the > output from that pane is rarely useful anyway as clangd keeps producing > errors about accessing non-open files, which would confuse people even more. > Overall we never designed this output

[PATCH] D55061: [clangd] Penalize destructor and overloaded operators in code completion.

2018-11-30 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added inline comments. This revision is now accepted and ready to land. Comment at: clangd/Quality.h:74 Keyword, +Operator, } Category = Unknown; Maybe name it `OverloadedOperator` to avoid confusion with other no

[PATCH] D54796: [clangd] C++ API for emitting file status

2018-11-30 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 176098. hokein marked 11 inline comments as done. hokein added a comment. Fix nits. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54796/new/ https://reviews.llvm.org/D54796 Files: clangd/ClangdServer.cpp cla

[PATCH] D54796: [clangd] C++ API for emitting file status

2018-11-30 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clangd/ClangdServer.h:49 + /// Called whenever the file status is updated. + virtual void onFileUpdated(PathRef File, const TUStatus &Status){}; }; ilya-biryukov wrote: > Have we thought about the way we might expose s

[PATCH] D54796: [clangd] C++ API for emitting file status

2018-11-30 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 176111. hokein marked 12 inline comments as done. hokein added a comment. Address comments and fix a bug in the test. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54796/new/ https://reviews.llvm.org/D54796 File

[PATCH] D54796: [clangd] C++ API for emitting file status

2018-11-30 Thread Haojian Wu via Phabricator via cfe-commits
hokein marked an inline comment as not done. hokein added inline comments. Comment at: clangd/ClangdServer.h:49 + /// Called whenever the file status is updated. + virtual void onFileUpdated(PathRef File, const TUStatus &Status){}; }; ilya-biryukov wrote: > ho

[PATCH] D55191: [clangd] Refine the way of checking a declaration is referenced by the written code.

2018-12-03 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: ilya-biryukov. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay, ioeric. The previous solution (checking the AST) is not a reliable way to determine whether a declaration is explicitly referenced by the source code, we are still

[PATCH] D55206: [clangd] Get rid of AST matchers in CodeComplete, NFC

2018-12-03 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: kadircet. Herald added subscribers: arphaman, jkorous, MaskRay, ioeric, ilya-biryukov. The isIndexedForCodeCompletion is called in the code patch of SymbolCollector. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D55206 File

[PATCH] D55206: [clangd] Get rid of AST matchers in CodeComplete, NFC

2018-12-03 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 176370. hokein marked an inline comment as done. hokein added a comment. Using break. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55206/new/ https://reviews.llvm.org/D55206 Files: clangd/CodeComplete.cpp I

[PATCH] D55206: [clangd] Get rid of AST matchers in CodeComplete, NFC

2018-12-03 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL348130: [clangd] Get rid of AST matchers in CodeComplete, NFC (authored by hokein, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES SINCE LAST ACTION https://revie

[PATCH] D55256: [clangd] Support clang-tidy configuration in clangd.

2018-12-04 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: ilya-biryukov. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay, ioeric, javed.absar. Clangd will support a minimal set of clang-tidy configurations - respect .clang-tidy for each file - add a `clang-tidy-checks` CLI option tha

[PATCH] D54796: [clangd] C++ API for emitting file status

2018-12-04 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 176588. hokein marked 6 inline comments as done. hokein added a comment. Address review comments - remove Unknown enum type - make TUState only accessed by the worker thread. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.l

[PATCH] D54796: [clangd] C++ API for emitting file status

2018-12-04 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clangd/TUScheduler.cpp:268 + /// Status of the TU. + TUStatus Status; /* GUARDED_BY(DiagMu) */ }; ilya-biryukov wrote: > hokein wrote: > > ilya-biryukov wrote: > > > Is `Status` actually ever read from multiple threads

[PATCH] D55256: [clangd] Support clang-tidy configuration in clangd.

2018-12-04 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 176591. hokein added a comment. Minor cleanup Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55256/new/ https://reviews.llvm.org/D55256 Files: clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h clangd/Clan

[PATCH] D55275: [clangd] Dont provide locations for non-existent files.

2018-12-05 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: unittests/clangd/SymbolCollectorTests.cpp:1036 + runSymbolCollector(Header, /*Main=*/"", {"-Dfoo=bar"}); + EXPECT_THAT(Symbols, UnorderedElementsAre(QName("bar"))); +} We handled this case previously, but the code was r

[PATCH] D55250: [clangd] Enhance macro hover to see full definition

2018-12-05 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clangd/XRefs.cpp:567 /// Generate a \p Hover object given the macro \p MacroInf. +static Hover getHoverContents(MacroDecl Decl, ASTContext &ASTCtx) { The comment seems stale. Comment at: clangd/XRefs

[PATCH] D55275: [clangd] Dont provide locations for non-existent files.

2018-12-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. thanks! Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55275/new/ https://reviews.llvm.org/D55275 _

[PATCH] D55312: [clangd] Fix a typo in TUSchedulerTests

2018-12-05 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: ilya-biryukov. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay, ioeric, javed.absar. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D55312 Files: unittests/clangd/TUSchedulerTests.cpp Index: unittests/clang

[PATCH] D55312: [clangd] Fix a typo in TUSchedulerTests

2018-12-06 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL348467: [clangd] Fix a typo in TUSchedulerTests (authored by hokein, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D5

[PATCH] D54796: [clangd] C++ API for emitting file status

2018-12-06 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 176936. hokein marked 8 inline comments as done. hokein added a comment. Address comments. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54796/new/ https://reviews.llvm.org/D54796 Files: clangd/ClangdServer.cp

[PATCH] D54796: [clangd] C++ API for emitting file status

2018-12-06 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clangd/TUScheduler.cpp:268 + /// Status of the TU. + TUStatus Status; /* GUARDED_BY(DiagMu) */ }; ilya-biryukov wrote: > hokein wrote: > > ilya-biryukov wrote: > > > hokein wrote: > > > > ilya-biryukov wrote: > > > > >

[PATCH] D54796: [clangd] C++ API for emitting file status

2018-12-06 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. Forgot to associate this patch to the actual commit, committed in rL348475 . Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54796/new/ https://reviews.llvm.org/D54796

[PATCH] D55359: [clangd] Avoid emitting Queued status when we are able to acquire the Barrier.

2018-12-06 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: ilya-biryukov. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay, ioeric, javed.absar. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D55359 Files: clangd/TUScheduler.cpp clangd/Threading.cpp clangd/Threadi

[PATCH] D55363: [clangd] Expose FileStatus in LSP.

2018-12-06 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: ilya-biryukov. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay, ioeric, javed.absar. Add an LSP extension "textDocument/fileStatus" to emit file-status information. Repository: rCTE Clang Tools Extra https://reviews.llvm.o

[PATCH] D55374: [clangd] Show FileStatus in vscode-clangd.

2018-12-06 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: ilya-biryukov. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay, ioeric. The file status will be shown in the status bar. Depends on D55363 . Repository: rCTE Clang Tools Extra https://review

[PATCH] D55363: [clangd] Expose FileStatus in LSP.

2018-12-06 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 176983. hokein added a comment. Update. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55363/new/ https://reviews.llvm.org/D55363 Files: clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h clangd/Protocol.c

[PATCH] D55245: [clang-tidy] Add the abseil-duration-subtraction check

2018-12-07 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added subscribers: astrelni, ahedberg. hokein added a comment. This revision is now accepted and ready to land. The check looks good from my side, except one nit. > I assume I've got the right reviewers here, but I've also been sending a > bunch of stuff you

[PATCH] D53830: [clang-tidy]: Abseil: new check 'abseil-upgrade-duration-conversions'

2018-12-07 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a subscriber: hwright. hokein added a comment. + @hwright who have implemented a bunch of `absl-duration-*` checks, you might be interested in this as well. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53830/new/ https://reviews.llvm.org/D53830

[PATCH] D55191: [clangd] Refine the way of checking a declaration is referenced by the written code.

2018-12-07 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 177190. hokein marked 4 inline comments as done. hokein added a comment. Update based on our offline discussion. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55191/new/ https://reviews.llvm.org/D55191 Files:

[PATCH] D55191: [clangd] Refine the way of checking a declaration is referenced by the written code.

2018-12-07 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. > What are the cases we're trying to filter out? Only implicit constructor or > anything else? I think implicit constructor is the only case we care about. We also looked through the caller implementation of `handleDeclOccurence`, it is safe to assume it. ===

[PATCH] D55437: [Index] Index declarations in lambda expression.

2018-12-07 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: ilya-biryukov. Herald added subscribers: kadircet, arphaman, ioeric. This fixes clangd couldn't find references for lambda parameters. Repository: rC Clang https://reviews.llvm.org/D55437 Files: lib/Index/IndexBody.cpp test/Index/cxx

[PATCH] D55359: [clangd] Avoid emitting Queued status when we are able to acquire the Barrier.

2018-12-07 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 177220. hokein marked 2 inline comments as done. hokein added a comment. Address review comment. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55359/new/ https://reviews.llvm.org/D55359 Files: clangd/TUSchedul

[PATCH] D55359: [clangd] Avoid emitting Queued status when we are able to acquire the Barrier.

2018-12-07 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clangd/TUScheduler.cpp:644 + std::unique_lock Lock(Barrier, std::try_to_lock); + if (Lock.owns_lock()) { +ExecuteAction(); ilya-biryukov wrote: > Maybe simplify the code a bit? > ``` > // Replacing these

[PATCH] D58600: [clangd] Emit source to Diagnostic.

2019-03-05 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 189285. hokein marked 6 inline comments as done. hokein added a comment. Address comments. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58600/new/ https://reviews.llvm.org/D58600 Files: clangd/ClangdUnit.cpp

[PATCH] D58600: [clangd] Emit source to Diagnostic.

2019-03-05 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. add @kadircet as a reviewer, since @ilya-biryukov is OOO. Comment at: clangd/ClangdUnit.cpp:380 if (Preamble) Diags.insert(Diags.begin(), Preamble->Diags.begin(), Preamble->Diags.end()); return ParsedAST(std::move(Preamble), std::move(Clang),

[PATCH] D58880: [WIP] [Looking for API feedback] [clangd] Type hierarchy subtypes

2019-03-05 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. Haven't looked at the patch. I think we can extend the existing Ref to support it, so that most of the stuff could be reused, rather than implementing a new slab: - introduce a new RefKind, like BaseOf - add a new field SymbolID in Ref and `clangIndex` library has alrea

[PATCH] D58600: [clangd] Emit source to Diagnostic.

2019-03-06 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 189455. hokein added a comment. Don't emit the source to LSP level (as this is a UI change as least in vscode) Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58600/new/ https://reviews.llvm.org/D58600 Files: cl

[PATCH] D58600: [clangd] Emit source to Diagnostic.

2019-03-06 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL355493: [clangd] Add Source to clangd::Diagnostic. (authored by hokein, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES SINCE LAST ACT

[PATCH] D59022: [clangd] Strip plugin arguments in clangd-indexer.

2019-03-06 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: kadircet. Herald added subscribers: arphaman, jkorous, MaskRay, ioeric, ilya-biryukov. Herald added a project: clang. This would allow clangd-indexer runs on chromium repo. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D5902

[PATCH] D59079: [clang][Tooling] Delete dots and dotdots when generating absolute paths

2019-03-07 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added inline comments. This revision is now accepted and ready to land. Comment at: lib/Tooling/JSONCompilationDatabase.cpp:373 llvm::sys::path::append(AbsolutePath, FileName); + llvm::sys::path::remove_dots(AbsolutePath, true);

[PATCH] D59086: [clangd] Adjust compile commands to be applicable for tooling

2019-03-07 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clangd/GlobalCompilationDatabase.h:116 + /// Adjusts given compile command for clangd. + tooling::CompileCommand adjustArguments(tooling::CompileCommand Cmd) const; + ioeric wrote: > This doesn't seem to be used in this

[PATCH] D59084: [clangd] Remove ./ and ../ in the file paths

2019-03-07 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. It would be nicer to have a unittest (if it doesn't take too much effort to create one). Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59084/new/

[PATCH] D59022: [clangd] Strip plugin arguments in clangd-indexer.

2019-03-07 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL355599: [clangd] Strip plugin arguments in clangd-indexer. (authored by hokein, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES SINCE

[PATCH] D59092: [clangd] Deduplicate Refs on the fly.

2019-03-07 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: kadircet. Herald added subscribers: arphaman, mgrang, jkorous, MaskRay, ioeric, ilya-biryukov. Herald added a project: clang. Currently, we only do deduplication when we flush final results. We may have huge duplications (refs from headers) d

[PATCH] D59092: [clangd] Deduplicate Refs on the fly.

2019-03-08 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 189825. hokein marked 2 inline comments as done. hokein added a comment. Add comments. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59092/new/ https://reviews.llvm.org/D59092 Files: clangd/index/Ref.cpp cla

[PATCH] D59092: [clangd] Deduplicate Refs on the fly.

2019-03-08 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE355676: [clangd] Deduplicate Refs on the fly. (authored by hokein, committed by ). Changed prior to commit: https://reviews.llvm.org/D59092?vs=189825&id=189826#toc Repository: rCTE Clang Tools Extr

[PATCH] D59128: [clangd] Redirect clangd page.

2019-03-08 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: gribozavr. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay, ioeric, ilya-biryukov. Herald added a project: clang. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D59128 Files: docs/clangd.rst Index: docs/cla

[PATCH] D59128: [clangd] Redirect clangd page.

2019-03-08 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE355680: [clangd] Redirect clangd page. (authored by hokein, committed by ). Changed prior to commit: https://reviews.llvm.org/D59128?vs=189827&id=189834#toc Repository: rCTE Clang Tools Extra CHAN

[PATCH] D59132: [clangd] Add TOC section to clangd doc.

2019-03-08 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: gribozavr. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay, ioeric, ilya-biryukov. Herald added a project: clang. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D59132 Files: docs/clangd/Extensions.rst docs

[PATCH] D59132: [clangd] Add TOC section to clangd doc.

2019-03-11 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL355811: [clangd] Add TOC section to clangd doc. (authored by hokein, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES SINCE LAST ACTION

[PATCH] D58345: [clangd] Using symbol name to map includes for STL symbols.

2019-03-12 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 190218. hokein marked 4 inline comments as done. hokein added a comment. Herald added a reviewer: serge-sans-paille. Address review comments, rewrite the tool with python. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.

[PATCH] D58345: [clangd] Using symbol name to map includes for STL symbols.

2019-03-12 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. add @ioeric as a reviewer, since @sammccall is OOO. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58345/new/ https://reviews.llvm.org/D58345 ___ cfe-commits mailing list cfe-comm

[PATCH] D59183: [clang-tidy] Expand cases covered by the abseil-duration-unnecessary-conversion check

2019-03-12 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tidy/abseil/DurationUnnecessaryConversionCheck.cpp:31 +auto factory_matcher = cxxConstructExpr(hasArgument( +0, could you add a few comment briefly describing these matchers? Comment

[PATCH] D59255: NOLINT support for "clang-diagnostic-*".

2019-03-12 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added reviewers: alexfh, aaron.ballman. Herald added a project: clang. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D59255 Files: clang-tidy/ClangTidyDiagnosticConsumer.cpp clang-tidy/ClangTidyDiagnosticConsumer.h test/clang-tidy/nolint

[PATCH] D58345: [clangd] Using symbol name to map includes for STL symbols.

2019-03-12 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clangd/StdGen/StdGen.py:2 +#!/usr/bin/env python +#===- StdGen.py - ---*- python -*--===# +# ioeric wrote: > I'd avoid abbreviation in the file name and the new directory name. `S

[PATCH] D58345: [clangd] Using symbol name to map includes for STL symbols.

2019-03-12 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 190275. hokein marked 13 inline comments as done. hokein added a comment. Address review comments. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58345/new/ https://reviews.llvm.org/D58345 Files: clangd/StdGen/

[PATCH] D59255: [clang-tidy] NOLINT support for "clang-diagnostic-*".

2019-03-12 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL355934: [clang-tidy] NOLINT support for "clang-diagnostic-*". (authored by hokein, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES SIN

[PATCH] D59283: Fixed global constant/variable naming check on C++ class for ObjC++ files.

2019-03-13 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tidy/google/GlobalVariableDeclarationCheck.cpp:82 if (const auto *Decl = Result.Nodes.getNodeAs("global_var")) { +if (Decl->isStaticDataMember()) { + return; nit: removing the `{}`, the same below. ===

[PATCH] D58345: [clangd] Using symbol name to map includes for STL symbols.

2019-03-13 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 190406. hokein marked 3 inline comments as done. hokein added a comment. Rename the tool. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58345/new/ https://reviews.llvm.org/D58345 Files: clangd/StdSymbolMap.inc

[PATCH] D58345: [clangd] Using symbol name to map includes for STL symbols.

2019-03-13 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clangd/StdGen/StdGen.py:2 +#!/usr/bin/env python +#===- StdGen.py - ---*- python -*--===# +# ioeric wrote: > hokein wrote: > > ioeric wrote: > > > I'd avoid abbreviation in the fi

[PATCH] D59283: Fixed global constant/variable naming check on C++ class for ObjC++ files.

2019-03-14 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added inline comments. This revision is now accepted and ready to land. Comment at: test/clang-tidy/google-objc-global-variable-declaration.mm:11 +}; \ No newline at end of file nit: I think we should have a newline at end o

[PATCH] D59350: [clangd] Build Dex index after loading all shards in BackgroundIndex.

2019-03-14 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: kadircet. Herald added subscribers: arphaman, jkorous, MaskRay, ioeric, ilya-biryukov. Herald added a project: clang. Currently after loadding all shards, we use MemIndex which has poor query performance, we should use Dex. Repository: rCT

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