Re: [PATCH] D54310: Make clang-based tools find libc++ on MacOS

2018-11-12 Thread Sam McCall via cfe-commits
On Mon, Nov 12, 2018, 20:53 George Karpenkov via Phabricator < revi...@reviews.llvm.org wrote: > george.karpenkov added a comment. > > I don't quite understand the need for this patch. > If we are talking about a binary built from source, wouldn't it make more > sense to build libcxx from source a

[clang-tools-extra] r346836 - [clangd] Improve code completion for ObjC methods

2018-11-14 Thread Sam McCall via cfe-commits
Author: sammccall Date: Wed Nov 14 01:05:19 2018 New Revision: 346836 URL: http://llvm.org/viewvc/llvm-project?rev=346836&view=rev Log: [clangd] Improve code completion for ObjC methods Summary: Previously code completion did not work well for Objective-C methods which contained multiple argument

r346847 - [AST] Allow limiting the scope of common AST traversals (getParents, RAV).

2018-11-14 Thread Sam McCall via cfe-commits
Author: sammccall Date: Wed Nov 14 02:33:30 2018 New Revision: 346847 URL: http://llvm.org/viewvc/llvm-project?rev=346847&view=rev Log: [AST] Allow limiting the scope of common AST traversals (getParents, RAV). Summary: The goal is to allow analyses such as clang-tidy checks to run on a subset of

[clang-tools-extra] r346961 - [clang-tidy] Update checks to play nicely with limited traversal scope added in r346847

2018-11-15 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu Nov 15 07:06:11 2018 New Revision: 346961 URL: http://llvm.org/viewvc/llvm-project?rev=346961&view=rev Log: [clang-tidy] Update checks to play nicely with limited traversal scope added in r346847 Summary: (See D54204 for original review) Reviewers: hokein Subscriber

[clang-tools-extra] r347036 - [clangd] Initial clang-tidy diagnostics support.

2018-11-16 Thread Sam McCall via cfe-commits
Author: sammccall Date: Fri Nov 16 00:32:23 2018 New Revision: 347036 URL: http://llvm.org/viewvc/llvm-project?rev=347036&view=rev Log: [clangd] Initial clang-tidy diagnostics support. Summary: This runs checks over a restricted subset of the TU: - preprocessor callbacks just receive the truncat

r347205 - [FileManager] getFile(open=true) after getFile(open=false) should open the file.

2018-11-19 Thread Sam McCall via cfe-commits
Author: sammccall Date: Mon Nov 19 05:37:46 2018 New Revision: 347205 URL: http://llvm.org/viewvc/llvm-project?rev=347205&view=rev Log: [FileManager] getFile(open=true) after getFile(open=false) should open the file. Summary: Old behavior is to just return the cached entry regardless of opened-ne

[clang-tools-extra] r347297 - [clangd] Allow observation of changes to global CDBs.

2018-11-20 Thread Sam McCall via cfe-commits
Author: sammccall Date: Tue Nov 20 02:56:03 2018 New Revision: 347297 URL: http://llvm.org/viewvc/llvm-project?rev=347297&view=rev Log: [clangd] Allow observation of changes to global CDBs. Summary: Currently, changes *within* CDBs are not tracked (CDB has no facility to do so). However, discover

[clang-tools-extra] r347298 - [clangd] Replay preamble #includes to clang-tidy checks.

2018-11-20 Thread Sam McCall via cfe-commits
Author: sammccall Date: Tue Nov 20 02:58:48 2018 New Revision: 347298 URL: http://llvm.org/viewvc/llvm-project?rev=347298&view=rev Log: [clangd] Replay preamble #includes to clang-tidy checks. Summary: This is needed to correctly handle checks that use IncludeInserter, which is very common. I co

r347352 - [CodeComplete] Penalize inherited ObjC properties for auto-completion

2018-11-20 Thread Sam McCall via cfe-commits
Author: sammccall Date: Tue Nov 20 14:06:54 2018 New Revision: 347352 URL: http://llvm.org/viewvc/llvm-project?rev=347352&view=rev Log: [CodeComplete] Penalize inherited ObjC properties for auto-completion Summary: Similar to auto-completion for ObjC methods, inherited properties should be penali

[clang-tools-extra] r347450 - [clangd] Respect task cancellation in TUScheduler.

2018-11-22 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu Nov 22 02:22:16 2018 New Revision: 347450 URL: http://llvm.org/viewvc/llvm-project?rev=347450&view=rev Log: [clangd] Respect task cancellation in TUScheduler. Summary: - Reads are never executed if canceled before ready-to run. In practice, we finalize cancelled read

[clang-tools-extra] r347538 - [clangd] Auto-index watches global CDB for changes.

2018-11-26 Thread Sam McCall via cfe-commits
Author: sammccall Date: Mon Nov 26 01:51:50 2018 New Revision: 347538 URL: http://llvm.org/viewvc/llvm-project?rev=347538&view=rev Log: [clangd] Auto-index watches global CDB for changes. Summary: Instead of receiving compilation commands, auto-index is triggered by just filenames to reindex, and

[clang-tools-extra] r347554 - [clangd] Fix missing include from r347538 - fix windows buildbots

2018-11-26 Thread Sam McCall via cfe-commits
Author: sammccall Date: Mon Nov 26 05:35:02 2018 New Revision: 347554 URL: http://llvm.org/viewvc/llvm-project?rev=347554&view=rev Log: [clangd] Fix missing include from r347538 - fix windows buildbots Modified: clang-tools-extra/trunk/clangd/index/Background.cpp Modified: clang-tools-extra/

[clang-tools-extra] r347567 - [clangd] Enable auto-index behind a flag.

2018-11-26 Thread Sam McCall via cfe-commits
Author: sammccall Date: Mon Nov 26 08:00:11 2018 New Revision: 347567 URL: http://llvm.org/viewvc/llvm-project?rev=347567&view=rev Log: [clangd] Enable auto-index behind a flag. Summary: Ownership and configuration: The auto-index (background index) is maintained by ClangdServer, like Dynamic. (T

[clang-tools-extra] r347655 - [clangd] Prevent thread starvation in tests on loaded systems.

2018-11-27 Thread Sam McCall via cfe-commits
Author: sammccall Date: Tue Nov 27 04:09:13 2018 New Revision: 347655 URL: http://llvm.org/viewvc/llvm-project?rev=347655&view=rev Log: [clangd] Prevent thread starvation in tests on loaded systems. Summary: Background index deliberately runs low-priority, but for tests this may stop them making

[clang-tools-extra] r357102 - [clangd] Support utf-8 offsets (rather than utf-16) as a protocol extension

2019-03-27 Thread Sam McCall via cfe-commits
Author: sammccall Date: Wed Mar 27 10:47:49 2019 New Revision: 357102 URL: http://llvm.org/viewvc/llvm-project?rev=357102&view=rev Log: [clangd] Support utf-8 offsets (rather than utf-16) as a protocol extension Summary: Still some pieces to go here: unit tests for new SourceCode functionality an

[clang-tools-extra] r357173 - [clangd] Support UTF-32 (i.e. codepoint) offsets.

2019-03-28 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu Mar 28 07:37:51 2019 New Revision: 357173 URL: http://llvm.org/viewvc/llvm-project?rev=357173&view=rev Log: [clangd] Support UTF-32 (i.e. codepoint) offsets. Summary: (Changes to UTF-8/UTF-16 here are NFC, moving things around to make the cases more symmetrical) Revie

[clang-tools-extra] r357175 - [clangd] Update error message to fix tests after r357173

2019-03-28 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu Mar 28 08:07:15 2019 New Revision: 357175 URL: http://llvm.org/viewvc/llvm-project?rev=357175&view=rev Log: [clangd] Update error message to fix tests after r357173 Modified: clang-tools-extra/trunk/unittests/clangd/DraftStoreTests.cpp Modified: clang-tools-extra/

[clang-tools-extra] r357186 - Disable warnings when indexing as a standalone action.

2019-03-28 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu Mar 28 10:07:28 2019 New Revision: 357186 URL: http://llvm.org/viewvc/llvm-project?rev=357186&view=rev Log: Disable warnings when indexing as a standalone action. Summary: - we don't record the warnings at all - we don't want to stop indexing if we hit error-limit due

r357686 - [CodeComplete] Fix crash when completing ObjC block parameter with a broken type

2019-04-04 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu Apr 4 04:34:18 2019 New Revision: 357686 URL: http://llvm.org/viewvc/llvm-project?rev=357686&view=rev Log: [CodeComplete] Fix crash when completing ObjC block parameter with a broken type Summary: The fix isn't great, but it's hard to fix properly because the completi

[clang-tools-extra] r357689 - [clangd] Stop passing around PCHContainerOperations, just create it in place. NFC

2019-04-04 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu Apr 4 05:56:03 2019 New Revision: 357689 URL: http://llvm.org/viewvc/llvm-project?rev=357689&view=rev Log: [clangd] Stop passing around PCHContainerOperations, just create it in place. NFC Modified: clang-tools-extra/trunk/clangd/ClangdServer.cpp clang-tools-

[clang-tools-extra] r357690 - [clangd] Test #import directive go-to-definition. NFC

2019-04-04 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu Apr 4 06:09:02 2019 New Revision: 357690 URL: http://llvm.org/viewvc/llvm-project?rev=357690&view=rev Log: [clangd] Test #import directive go-to-definition. NFC Modified: clang-tools-extra/trunk/unittests/clangd/XRefsTests.cpp Modified: clang-tools-extra/trunk/un

r357770 - [Tooling] add a Heuristic field indicating that a CompileCommand was guessed.

2019-04-05 Thread Sam McCall via cfe-commits
Author: sammccall Date: Fri Apr 5 08:22:20 2019 New Revision: 357770 URL: http://llvm.org/viewvc/llvm-project?rev=357770&view=rev Log: [Tooling] add a Heuristic field indicating that a CompileCommand was guessed. Summary: Use cases: - a tool that dumps the heuristic used for each header in a pr

[clang-tools-extra] r358074 - [clangd] Refactor speculateCompletionFilter and also extract scope.

2019-04-10 Thread Sam McCall via cfe-commits
Author: sammccall Date: Wed Apr 10 04:50:40 2019 New Revision: 358074 URL: http://llvm.org/viewvc/llvm-project?rev=358074&view=rev Log: [clangd] Refactor speculateCompletionFilter and also extract scope. Summary: Intent is to use the heuristically-parsed scope in cases where we get bogus results

[clang-tools-extra] r358075 - [clangd] Add -header-insertion=never flag to disable include insertion in code completion

2019-04-10 Thread Sam McCall via cfe-commits
Author: sammccall Date: Wed Apr 10 05:15:35 2019 New Revision: 358075 URL: http://llvm.org/viewvc/llvm-project?rev=358075&view=rev Log: [clangd] Add -header-insertion=never flag to disable include insertion in code completion Summary: One clear use case: use with an editor that reacts poorly to

[clang-tools-extra] r358091 - [clangd] Don't insert extra namespace qualifiers when Sema gets lost.

2019-04-10 Thread Sam McCall via cfe-commits
Author: sammccall Date: Wed Apr 10 08:16:54 2019 New Revision: 358091 URL: http://llvm.org/viewvc/llvm-project?rev=358091&view=rev Log: [clangd] Don't insert extra namespace qualifiers when Sema gets lost. Summary: There are cases where Sema can't tell that "foo" in foo::Bar is a namespace qualif

[clang-tools-extra] r358098 - [clangd] Fix non-indexing of builtin functions like printf when the TU is C

2019-04-10 Thread Sam McCall via cfe-commits
Author: sammccall Date: Wed Apr 10 09:26:58 2019 New Revision: 358098 URL: http://llvm.org/viewvc/llvm-project?rev=358098&view=rev Log: [clangd] Fix non-indexing of builtin functions like printf when the TU is C Modified: clang-tools-extra/trunk/clangd/index/SymbolCollector.cpp clang-tool

[clang-tools-extra] r358157 - [clangd] Include compile command heuristic in logs

2019-04-11 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu Apr 11 01:17:15 2019 New Revision: 358157 URL: http://llvm.org/viewvc/llvm-project?rev=358157&view=rev Log: [clangd] Include compile command heuristic in logs Modified: clang-tools-extra/trunk/clangd/TUScheduler.cpp clang-tools-extra/trunk/test/clangd/did-chang

Re: [PATCH] D59605: [clangd] Introduce background-indexer

2019-04-11 Thread Sam McCall via cfe-commits
Thanks - I think there's quite a lot of background missing here: what/who is this for, why a separate binary from clangd-indexer (or and how do they relate, how much of the BackgroundIndex code structure makes sense with multiple users. I assume there's been some offline discussion about this, but

[clang-tools-extra] r358561 - [clangd] lower_bound -> bsearch, NFC

2019-04-16 Thread Sam McCall via cfe-commits
Author: sammccall Date: Wed Apr 17 00:00:36 2019 New Revision: 358561 URL: http://llvm.org/viewvc/llvm-project?rev=358561&view=rev Log: [clangd] lower_bound -> bsearch, NFC Modified: clang-tools-extra/trunk/clangd/index/Symbol.cpp clang-tools-extra/trunk/clangd/index/dex/PostingList.cpp

[clang-tools-extra] r358571 - [clangd] Include insertion: require header guards, drop other heuristics, treat .def like .inc.

2019-04-17 Thread Sam McCall via cfe-commits
Author: sammccall Date: Wed Apr 17 03:36:02 2019 New Revision: 358571 URL: http://llvm.org/viewvc/llvm-project?rev=358571&view=rev Log: [clangd] Include insertion: require header guards, drop other heuristics, treat .def like .inc. Summary: We do have some reports of include insertion behaving b

[clang-tools-extra] r358575 - [clangd] Include textual diagnostic ID as Diagnostic.code.

2019-04-17 Thread Sam McCall via cfe-commits
Author: sammccall Date: Wed Apr 17 05:35:16 2019 New Revision: 358575 URL: http://llvm.org/viewvc/llvm-project?rev=358575&view=rev Log: [clangd] Include textual diagnostic ID as Diagnostic.code. Reviewers: kadircet Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, jdoerfert, cfe-c

[clang-tools-extra] r358605 - [clangd] Recognize "don't include me directly" pattern, and suppress include insertion.

2019-04-17 Thread Sam McCall via cfe-commits
Author: sammccall Date: Wed Apr 17 11:33:07 2019 New Revision: 358605 URL: http://llvm.org/viewvc/llvm-project?rev=358605&view=rev Log: [clangd] Recognize "don't include me directly" pattern, and suppress include insertion. Summary: Typically used with umbrella headers, e.g. GTK: #if !defined

[clang-tools-extra] r358611 - [clangd] Use shorter, more recognizable codes for diagnostics.

2019-04-17 Thread Sam McCall via cfe-commits
Author: sammccall Date: Wed Apr 17 13:12:03 2019 New Revision: 358611 URL: http://llvm.org/viewvc/llvm-project?rev=358611&view=rev Log: [clangd] Use shorter, more recognizable codes for diagnostics. Summary: - for warnings, use the flag the warning is controlled by (-Wfoo) - for errors, keep us

[clang-tools-extra] r358612 - [clangd] Strip the ' [some-check-name]' suffix from clang-tidy diagnostics. The check name is reported in Diagnostic.code.

2019-04-17 Thread Sam McCall via cfe-commits
Author: sammccall Date: Wed Apr 17 13:15:08 2019 New Revision: 358612 URL: http://llvm.org/viewvc/llvm-project?rev=358612&view=rev Log: [clangd] Strip the ' [some-check-name]' suffix from clang-tidy diagnostics. The check name is reported in Diagnostic.code. Reviewers: kadircet Subscribers: ily

[clang-tools-extra] r358655 - [clangd] Log verbosely (LSP bodies) in lit tests. NFC

2019-04-18 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu Apr 18 03:32:08 2019 New Revision: 358655 URL: http://llvm.org/viewvc/llvm-project?rev=358655&view=rev Log: [clangd] Log verbosely (LSP bodies) in lit tests. NFC Modified: clang-tools-extra/trunk/clangd/tool/ClangdMain.cpp Modified: clang-tools-extra/trunk/clangd/

[clang-tools-extra] r358675 - [clangd] Support relatedInformation in diagnostics.

2019-04-18 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu Apr 18 08:17:07 2019 New Revision: 358675 URL: http://llvm.org/viewvc/llvm-project?rev=358675&view=rev Log: [clangd] Support relatedInformation in diagnostics. Summary: We already have the structure internally, we just need to expose it. Reviewers: ilya-biryukov Subs

[clang-tools-extra] r358696 - [CodeComplete] Remove obsolete isOutputBinary().

2019-04-18 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu Apr 18 10:35:55 2019 New Revision: 358696 URL: http://llvm.org/viewvc/llvm-project?rev=358696&view=rev Log: [CodeComplete] Remove obsolete isOutputBinary(). Summary: It's never set to true. Its only effect would be to set stdout to binary mode. Hopefully we have better

r358696 - [CodeComplete] Remove obsolete isOutputBinary().

2019-04-18 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu Apr 18 10:35:55 2019 New Revision: 358696 URL: http://llvm.org/viewvc/llvm-project?rev=358696&view=rev Log: [CodeComplete] Remove obsolete isOutputBinary(). Summary: It's never set to true. Its only effect would be to set stdout to binary mode. Hopefully we have better

[clang-tools-extra] r359112 - [clangd] Fix broken helper deep in unit test. NFC

2019-04-24 Thread Sam McCall via cfe-commits
Author: sammccall Date: Wed Apr 24 10:00:38 2019 New Revision: 359112 URL: http://llvm.org/viewvc/llvm-project?rev=359112&view=rev Log: [clangd] Fix broken helper deep in unit test. NFC Modified: clang-tools-extra/trunk/unittests/clangd/TestIndex.cpp Modified: clang-tools-extra/trunk/unittes

[clang-tools-extra] r359202 - [clangd] Use JSON streaming API for Trace rather than pasting strings. NFC

2019-04-25 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu Apr 25 09:37:07 2019 New Revision: 359202 URL: http://llvm.org/viewvc/llvm-project?rev=359202&view=rev Log: [clangd] Use JSON streaming API for Trace rather than pasting strings. NFC Modified: clang-tools-extra/trunk/clangd/Trace.cpp clang-tools-extra/trunk/tes

[clang-tools-extra] r359214 - [clangd] Optimize "don't include me" check.

2019-04-25 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu Apr 25 10:47:07 2019 New Revision: 359214 URL: http://llvm.org/viewvc/llvm-project?rev=359214&view=rev Log: [clangd] Optimize "don't include me" check. Summary: llvm::Regex is really slow, and regex evaluation during preamble indexing was showing up as 25% on a profile

[clang-tools-extra] r359284 - [clangd] Query index in code completion no-compile mode.

2019-04-26 Thread Sam McCall via cfe-commits
Author: sammccall Date: Fri Apr 26 00:45:49 2019 New Revision: 359284 URL: http://llvm.org/viewvc/llvm-project?rev=359284&view=rev Log: [clangd] Query index in code completion no-compile mode. Summary: We scrape the enclosing scopes from the source file, and use them in the query. Reviewers: ka

[clang-tools-extra] r359289 - filecheck etc are not clangd-specific deps. NFC

2019-04-26 Thread Sam McCall via cfe-commits
Author: sammccall Date: Fri Apr 26 02:20:36 2019 New Revision: 359289 URL: http://llvm.org/viewvc/llvm-project?rev=359289&view=rev Log: filecheck etc are not clangd-specific deps. NFC Modified: clang-tools-extra/trunk/test/CMakeLists.txt Modified: clang-tools-extra/trunk/test/CMakeLists.txt

[clang-tools-extra] r359434 - [clangd] Fix windows buildbot, remove stray file after r359424. NFC

2019-04-29 Thread Sam McCall via cfe-commits
Author: sammccall Date: Mon Apr 29 03:35:56 2019 New Revision: 359434 URL: http://llvm.org/viewvc/llvm-project?rev=359434&view=rev Log: [clangd] Fix windows buildbot, remove stray file after r359424. NFC Removed: clang-tools-extra/trunk/test/clangd/Unit/lit.site.cfg.py.in Modified: clang-

[clang-tools-extra] r359442 - [clangd] Fix unittests CMake rules

2019-04-29 Thread Sam McCall via cfe-commits
Author: sammccall Date: Mon Apr 29 04:47:52 2019 New Revision: 359442 URL: http://llvm.org/viewvc/llvm-project?rev=359442&view=rev Log: [clangd] Fix unittests CMake rules Modified: clang-tools-extra/trunk/clangd/test/CMakeLists.txt clang-tools-extra/trunk/clangd/unittests/CMakeLists.txt

[clang-tools-extra] r359455 - [clangd] Add separate unit tests for CanonicalIncludes. NFC

2019-04-29 Thread Sam McCall via cfe-commits
Author: sammccall Date: Mon Apr 29 07:36:26 2019 New Revision: 359455 URL: http://llvm.org/viewvc/llvm-project?rev=359455&view=rev Log: [clangd] Add separate unit tests for CanonicalIncludes. NFC Added: clang-tools-extra/trunk/clangd/unittests/CanonicalIncludesTests.cpp Modified: clang-to

[clang-tools-extra] r359564 - [clangd] gen_std uses multiprocessing pool to be fast. While here, log ambiguous symbols. NFC

2019-04-30 Thread Sam McCall via cfe-commits
Author: sammccall Date: Tue Apr 30 07:21:10 2019 New Revision: 359564 URL: http://llvm.org/viewvc/llvm-project?rev=359564&view=rev Log: [clangd] gen_std uses multiprocessing pool to be fast. While here, log ambiguous symbols. NFC Modified: clang-tools-extra/trunk/clangd/include-mapping/gen_s

[clang-tools-extra] r359763 - [clangd] Restore conventional names for lit configs, and .in/.py split. Fix build_mode indirection.

2019-05-02 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu May 2 01:00:39 2019 New Revision: 359763 URL: http://llvm.org/viewvc/llvm-project?rev=359763&view=rev Log: [clangd] Restore conventional names for lit configs, and .in/.py split. Fix build_mode indirection. Added: clang-tools-extra/trunk/clangd/test/lit.cfg.py

[clang-tools-extra] r359770 - [clangd] Standard library mapping: prefer "primary" versions of functions over variants.

2019-05-02 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu May 2 02:31:24 2019 New Revision: 359770 URL: http://llvm.org/viewvc/llvm-project?rev=359770&view=rev Log: [clangd] Standard library mapping: prefer "primary" versions of functions over variants. Reviewers: kadircet Subscribers: ilya-biryukov, MaskRay, jkorous, arph

[clang-tools-extra] r359771 - [clangd] Improvements to header mapping: more precise parsing of cppreference symbol pages.

2019-05-02 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu May 2 02:34:30 2019 New Revision: 359771 URL: http://llvm.org/viewvc/llvm-project?rev=359771&view=rev Log: [clangd] Improvements to header mapping: more precise parsing of cppreference symbol pages. Summary: Previously we were just jumping from the symbol index to th

[clang-tools-extra] r359778 - [clangd] Fix code completion of macros defined in the preamble region of the main file.

2019-05-02 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu May 2 04:06:44 2019 New Revision: 359778 URL: http://llvm.org/viewvc/llvm-project?rev=359778&view=rev Log: [clangd] Fix code completion of macros defined in the preamble region of the main file. Summary: This is a tricky case (we baked the assumption that symbols com

[clang-tools-extra] r359799 - Reapply r359778: [clangd] Fix code completion of macros defined in the preamble region of the main file.

2019-05-02 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu May 2 09:12:36 2019 New Revision: 359799 URL: http://llvm.org/viewvc/llvm-project?rev=359799&view=rev Log: Reapply r359778: [clangd] Fix code completion of macros defined in the preamble region of the main file. The bad assert has been removed, and updateOutOfDateIde

[clang-tools-extra] r359880 - [clangd] Fix header-guard check for include insertion, and don't index header guards.

2019-05-03 Thread Sam McCall via cfe-commits
Author: sammccall Date: Fri May 3 06:17:29 2019 New Revision: 359880 URL: http://llvm.org/viewvc/llvm-project?rev=359880&view=rev Log: [clangd] Fix header-guard check for include insertion, and don't index header guards. Summary: Both of these attempt to check whether a header guard exists whil

[clang-tools-extra] r360016 - [clangd] Support -fallback-style, similar to clang-format.

2019-05-06 Thread Sam McCall via cfe-commits
Author: sammccall Date: Mon May 6 01:11:59 2019 New Revision: 360016 URL: http://llvm.org/viewvc/llvm-project?rev=360016&view=rev Log: [clangd] Support -fallback-style, similar to clang-format. Reviewers: kadircet Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits Tags: #clang

[clang-tools-extra] r360020 - [clangd] Always call getFormatStyleForFile().

2019-05-06 Thread Sam McCall via cfe-commits
Author: sammccall Date: Mon May 6 01:39:17 2019 New Revision: 360020 URL: http://llvm.org/viewvc/llvm-project?rev=360020&view=rev Log: [clangd] Always call getFormatStyleForFile(). This means "format" will no longer return an error if the -fallback-style flag is invalid, it will log and use LLVM

[clang-tools-extra] r360030 - [clangd] Boost code completion results that were named in the last few lines.

2019-05-06 Thread Sam McCall via cfe-commits
Author: sammccall Date: Mon May 6 03:25:10 2019 New Revision: 360030 URL: http://llvm.org/viewvc/llvm-project?rev=360030&view=rev Log: [clangd] Boost code completion results that were named in the last few lines. Summary: The hope is this will catch a few patterns with repetition: SomeClass*

[clang-tools-extra] r360039 - [clangd] Expose whether no-compile completion was used.

2019-05-06 Thread Sam McCall via cfe-commits
Author: sammccall Date: Mon May 6 05:03:26 2019 New Revision: 360039 URL: http://llvm.org/viewvc/llvm-project?rev=360039&view=rev Log: [clangd] Expose whether no-compile completion was used. Summary: Embedding clients want to experiment with showing such results in e.g. a different color. Revi

[clang-tools-extra] r360115 - [clangd] add CLANG_ENABLE_CLANGD option to build clangd. Require threads.

2019-05-07 Thread Sam McCall via cfe-commits
Author: sammccall Date: Tue May 7 00:05:47 2019 New Revision: 360115 URL: http://llvm.org/viewvc/llvm-project?rev=360115&view=rev Log: [clangd] add CLANG_ENABLE_CLANGD option to build clangd. Require threads. Reviewers: gribozavr Subscribers: mgorny, ilya-biryukov, MaskRay, jkorous, arphaman, k

[clang-tools-extra] r360116 - [clangd] Move Rename into its own file, and add unit test. NFC

2019-05-07 Thread Sam McCall via cfe-commits
Author: sammccall Date: Tue May 7 00:11:56 2019 New Revision: 360116 URL: http://llvm.org/viewvc/llvm-project?rev=360116&view=rev Log: [clangd] Move Rename into its own file, and add unit test. NFC Reviewers: kadircet Subscribers: mgorny, ilya-biryukov, MaskRay, jkorous, arphaman, jfb, cfe-comm

[clang-tools-extra] r360118 - [clangd] Add test that r360116 accidentally fixed a duplicate-edits bug in rename. NFC

2019-05-07 Thread Sam McCall via cfe-commits
Author: sammccall Date: Tue May 7 00:45:41 2019 New Revision: 360118 URL: http://llvm.org/viewvc/llvm-project?rev=360118&view=rev Log: [clangd] Add test that r360116 accidentally fixed a duplicate-edits bug in rename. NFC Modified: clang-tools-extra/trunk/clangd/refactor/Rename.cpp clan

[clang-tools-extra] r360119 - [clangd] switchSourceHeader uses null not empty string as sentinel.

2019-05-07 Thread Sam McCall via cfe-commits
Author: sammccall Date: Tue May 7 00:55:35 2019 New Revision: 360119 URL: http://llvm.org/viewvc/llvm-project?rev=360119&view=rev Log: [clangd] switchSourceHeader uses null not empty string as sentinel. As far as I can see, only theia actually implements this, and it expects null. Modified:

[clang-tools-extra] r360121 - [clangd] Oops, switchSourceHeader still needs to return a URI.

2019-05-07 Thread Sam McCall via cfe-commits
Author: sammccall Date: Tue May 7 01:30:32 2019 New Revision: 360121 URL: http://llvm.org/viewvc/llvm-project?rev=360121&view=rev Log: [clangd] Oops, switchSourceHeader still needs to return a URI. Reviewers: kadircet Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits Tags: #c

r360122 - [Tooling] Don't mmap the JSONCompilationDatabase, it's not correct for long-lived processes.

2019-05-07 Thread Sam McCall via cfe-commits
Author: sammccall Date: Tue May 7 02:05:15 2019 New Revision: 360122 URL: http://llvm.org/viewvc/llvm-project?rev=360122&view=rev Log: [Tooling] Don't mmap the JSONCompilationDatabase, it's not correct for long-lived processes. Reviewers: ilya-biryukov Subscribers: cfe-commits Tags: #clang D

r360153 - [Tooling] Add -x flags when inferring compile commands for files with no/invalid extension.

2019-05-07 Thread Sam McCall via cfe-commits
Author: sammccall Date: Tue May 7 07:34:06 2019 New Revision: 360153 URL: http://llvm.org/viewvc/llvm-project?rev=360153&view=rev Log: [Tooling] Add -x flags when inferring compile commands for files with no/invalid extension. Summary: We treat them as headers, as the motivating case is C++ sta

r360224 - [Sema] Correct typos in return statements so the return types of 'auto' functions are always deduced.

2019-05-07 Thread Sam McCall via cfe-commits
Author: sammccall Date: Tue May 7 22:49:42 2019 New Revision: 360224 URL: http://llvm.org/viewvc/llvm-project?rev=360224&view=rev Log: [Sema] Correct typos in return statements so the return types of 'auto' functions are always deduced. Summary: e.g. auto foo() { return no_such_thing; //

Re: [PATCH] D52078: [clangd] Store preamble macros in dynamic index.

2018-09-15 Thread Sam McCall via cfe-commits
On Sat, Sep 15, 2018, 08:36 Eric Liu via Phabricator < revi...@reviews.llvm.org> wrote: > ioeric added inline comments. > > > > Comment at: clangd/index/FileIndex.h:93 > std::pair > indexAST(ASTContext &AST, std::shared_ptr PP, > + bool IndexMacros = false, > ---

r342449 - [CodeComplete] Add completions for filenames in #include directives.

2018-09-18 Thread Sam McCall via cfe-commits
Author: sammccall Date: Tue Sep 18 01:40:41 2018 New Revision: 342449 URL: http://llvm.org/viewvc/llvm-project?rev=342449&view=rev Log: [CodeComplete] Add completions for filenames in #include directives. Summary: The dir component ("somedir" in #include ) is considered fixed. We append "foo" to

[clang-tools-extra] r342453 - [clangd] Update code completion for #include completions in r342449

2018-09-18 Thread Sam McCall via cfe-commits
Author: sammccall Date: Tue Sep 18 02:08:28 2018 New Revision: 342453 URL: http://llvm.org/viewvc/llvm-project?rev=342453&view=rev Log: [clangd] Update code completion for #include completions in r342449 Modified: clang-tools-extra/trunk/clangd/CodeComplete.cpp Modified: clang-tools-extra/tr

[clang-tools-extra] r342456 - [clangd] dexp tool uses llvm::cl to parse its flags.

2018-09-18 Thread Sam McCall via cfe-commits
Author: sammccall Date: Tue Sep 18 02:49:57 2018 New Revision: 342456 URL: http://llvm.org/viewvc/llvm-project?rev=342456&view=rev Log: [clangd] dexp tool uses llvm::cl to parse its flags. Summary: We can use cl::ResetCommandLineParser() to support different types of command-lines, as long as we'

Re: [PATCH] D52078: [clangd] Store preamble macros in dynamic index.

2018-09-18 Thread Sam McCall via cfe-commits
On Tue, Sep 18, 2018, 16:28 Eric Liu via Phabricator < revi...@reviews.llvm.org> wrote: > ioeric added a comment. > > In https://reviews.llvm.org/D52078#1238301, @sammccall wrote: > > > Something not listed in cons: because macros aren't namespaced and we > don't have lots of signals, they can be

[clang-tools-extra] r342505 - [clangd] Fix error handling for SymbolID parsing (notably YAML and dexp)

2018-09-18 Thread Sam McCall via cfe-commits
Author: sammccall Date: Tue Sep 18 12:00:59 2018 New Revision: 342505 URL: http://llvm.org/viewvc/llvm-project?rev=342505&view=rev Log: [clangd] Fix error handling for SymbolID parsing (notably YAML and dexp) Modified: clang-tools-extra/trunk/clangd/index/Index.cpp clang-tools-extra/trunk

[clang-tools-extra] r342888 - [clangd] Do bounds checks while reading data, otherwise var-length records are too painful. NFC

2018-09-24 Thread Sam McCall via cfe-commits
Author: sammccall Date: Mon Sep 24 07:51:15 2018 New Revision: 342888 URL: http://llvm.org/viewvc/llvm-project?rev=342888&view=rev Log: [clangd] Do bounds checks while reading data, otherwise var-length records are too painful. NFC Modified: clang-tools-extra/trunk/clangd/index/Serialization

[clang-tools-extra] r342903 - [clangd] Fix uninit bool in r342888

2018-09-24 Thread Sam McCall via cfe-commits
Author: sammccall Date: Mon Sep 24 09:52:48 2018 New Revision: 342903 URL: http://llvm.org/viewvc/llvm-project?rev=342903&view=rev Log: [clangd] Fix uninit bool in r342888 Modified: clang-tools-extra/trunk/clangd/index/Serialization.cpp Modified: clang-tools-extra/trunk/clangd/index/Serializ

[clang-tools-extra] r342999 - [clangd] Merge binary + YAML serialization behind a (mostly) common interface.

2018-09-25 Thread Sam McCall via cfe-commits
Author: sammccall Date: Tue Sep 25 11:06:43 2018 New Revision: 342999 URL: http://llvm.org/viewvc/llvm-project?rev=342999&view=rev Log: [clangd] Merge binary + YAML serialization behind a (mostly) common interface. Summary: Interface is in one file, implementation in two as they have little in co

[clang-tools-extra] r343017 - [clangd] Fix reversed RIFF/YAML serialization

2018-09-25 Thread Sam McCall via cfe-commits
Author: sammccall Date: Tue Sep 25 12:53:33 2018 New Revision: 343017 URL: http://llvm.org/viewvc/llvm-project?rev=343017&view=rev Log: [clangd] Fix reversed RIFF/YAML serialization Modified: clang-tools-extra/trunk/clangd/index/Serialization.cpp Modified: clang-tools-extra/trunk/clangd/inde

[clang-tools-extra] r343019 - [clangd] Extract mapper logic from clangd-indexer into a library.

2018-09-25 Thread Sam McCall via cfe-commits
Author: sammccall Date: Tue Sep 25 13:02:36 2018 New Revision: 343019 URL: http://llvm.org/viewvc/llvm-project?rev=343019&view=rev Log: [clangd] Extract mapper logic from clangd-indexer into a library. Summary: Soon we can drop support for MR-via-YAML. I need to modify some out-of-tree versions t

Re: [PATCH] D52650: [clangd] NFC: Migrate to LLVM STLExtras API where possible

2018-09-28 Thread Sam McCall via cfe-commits
I think it's fine to update others too, this is a trivially-safe change and a nice readability improvement. No need to put everything in the same patch though. On Fri, Sep 28, 2018, 16:23 Kirill Bobyrev via Phabricator < revi...@reviews.llvm.org> wrote: > kbobyrev added a comment. > > Also, I'm n

[clang-tools-extra] r343453 - [clangd] Query dex index using query-style trigrams, not identifier-style trigrams

2018-10-01 Thread Sam McCall via cfe-commits
Author: sammccall Date: Mon Oct 1 03:42:51 2018 New Revision: 343453 URL: http://llvm.org/viewvc/llvm-project?rev=343453&view=rev Log: [clangd] Query dex index using query-style trigrams, not identifier-style trigrams Modified: clang-tools-extra/trunk/clangd/index/dex/Dex.cpp Modified: cla

r343457 - [CodeComplete] #include completion treats -I as non-system (require header-like extension).

2018-10-01 Thread Sam McCall via cfe-commits
Author: sammccall Date: Mon Oct 1 04:56:42 2018 New Revision: 343457 URL: http://llvm.org/viewvc/llvm-project?rev=343457&view=rev Log: [CodeComplete] #include completion treats -I as non-system (require header-like extension). Modified: cfe/trunk/lib/Sema/SemaCodeComplete.cpp cfe/trunk/

r343488 - [Basic] Update clang tests (really testing sys::fs) that broke with r343460

2018-10-01 Thread Sam McCall via cfe-commits
Author: sammccall Date: Mon Oct 1 09:07:03 2018 New Revision: 343488 URL: http://llvm.org/viewvc/llvm-project?rev=343488&view=rev Log: [Basic] Update clang tests (really testing sys::fs) that broke with r343460 Modified: cfe/trunk/unittests/Basic/VirtualFileSystemTest.cpp Modified: cfe/trun

[clang-tools-extra] r343580 - [clangd] Dex iterator printer shows query structure, not iterator state.

2018-10-02 Thread Sam McCall via cfe-commits
Author: sammccall Date: Tue Oct 2 04:51:36 2018 New Revision: 343580 URL: http://llvm.org/viewvc/llvm-project?rev=343580&view=rev Log: [clangd] Dex iterator printer shows query structure, not iterator state. Summary: This makes it suitable for logging (which immediately found a bug, to be fixed

[clang-tools-extra] r343589 - [clangd] Dex: add Corpus factory for iterators, rename, fold constant. NFC

2018-10-02 Thread Sam McCall via cfe-commits
Author: sammccall Date: Tue Oct 2 06:44:26 2018 New Revision: 343589 URL: http://llvm.org/viewvc/llvm-project?rev=343589&view=rev Log: [clangd] Dex: add Corpus factory for iterators, rename, fold constant. NFC Summary: - Corpus avoids having to pass size to the true iterator, and (soon) any it

[clang-tools-extra] r343590 - [clangd] Zap TODONEs

2018-10-02 Thread Sam McCall via cfe-commits
Author: sammccall Date: Tue Oct 2 06:51:43 2018 New Revision: 343590 URL: http://llvm.org/viewvc/llvm-project?rev=343590&view=rev Log: [clangd] Zap TODONEs Modified: clang-tools-extra/trunk/clangd/index/dex/Iterator.h Modified: clang-tools-extra/trunk/clangd/index/dex/Iterator.h URL: http:

[clang-tools-extra] r343622 - Reland r343589 "[clangd] Dex: add Corpus factory for iterators, rename, fold constant. NFC""

2018-10-02 Thread Sam McCall via cfe-commits
Author: sammccall Date: Tue Oct 2 12:59:23 2018 New Revision: 343622 URL: http://llvm.org/viewvc/llvm-project?rev=343622&view=rev Log: Reland r343589 "[clangd] Dex: add Corpus factory for iterators, rename, fold constant. NFC"" This reverts commit r343610. Modified: clang-tools-extra/trunk

Re: [clang-tools-extra] r343589 - [clangd] Dex: add Corpus factory for iterators, rename, fold constant. NFC

2018-10-02 Thread Sam McCall via cfe-commits
build after this change. Declaring the field `Corpus Corpus;` upsets GCC. I > considered trying to pick a different field name, but I wasn't able to come > up with one I liked, so I'm punting it back to you. =/ > > On Tue, Oct 2, 2018 at 6:46 AM Sam McCall via cfe-commits <

[clang-tools-extra] r343759 - [clangd] clangd-indexer: Drop support for MR-via-YAML

2018-10-04 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu Oct 4 01:30:03 2018 New Revision: 343759 URL: http://llvm.org/viewvc/llvm-project?rev=343759&view=rev Log: [clangd] clangd-indexer: Drop support for MR-via-YAML Summary: It's slow, and the open-source reduce implementation doesn't scale properly. While here, tidy up s

[clang-tools-extra] r343760 - [clangd] Support refs() in dex. Largely cloned from MemIndex.

2018-10-04 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu Oct 4 02:16:12 2018 New Revision: 343760 URL: http://llvm.org/viewvc/llvm-project?rev=343760&view=rev Log: [clangd] Support refs() in dex. Largely cloned from MemIndex. Reviewers: hokein Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-c

[clang-tools-extra] r343764 - [clangd] Revert accidental flag change

2018-10-04 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu Oct 4 03:10:35 2018 New Revision: 343764 URL: http://llvm.org/viewvc/llvm-project?rev=343764&view=rev Log: [clangd] Revert accidental flag change Modified: clang-tools-extra/trunk/clangd/indexer/IndexerMain.cpp Modified: clang-tools-extra/trunk/clangd/indexer/Ind

[clang-tools-extra] r343774 - [clangd] Dex: FALSE iterator, peephole optimizations, fix AND bug

2018-10-04 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu Oct 4 06:12:23 2018 New Revision: 343774 URL: http://llvm.org/viewvc/llvm-project?rev=343774&view=rev Log: [clangd] Dex: FALSE iterator, peephole optimizations, fix AND bug Summary: The FALSE iterator will be used in a followup patch to fix a logic bug in Dex (current

[clang-tools-extra] r343775 - [cland] Dex: fix/simplify short-trigram generation

2018-10-04 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu Oct 4 07:01:55 2018 New Revision: 343775 URL: http://llvm.org/viewvc/llvm-project?rev=343775&view=rev Log: [cland] Dex: fix/simplify short-trigram generation Summary: 1) Instead of x$$ for a short-query trigram, just use x 2) Make rules more coherent: prefixes of leng

[clang-tools-extra] r343777 - [clangd] Remove one-segment-skipping from Dex trigrams.

2018-10-04 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu Oct 4 07:08:11 2018 New Revision: 343777 URL: http://llvm.org/viewvc/llvm-project?rev=343777&view=rev Log: [clangd] Remove one-segment-skipping from Dex trigrams. Summary: Currently queries like "ab" can match identifiers like a_yellow_bee. The value of allowing this

[clang-tools-extra] r343778 - [clangd] clangd-indexer gathers refs and stores them in index files.

2018-10-04 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu Oct 4 07:09:55 2018 New Revision: 343778 URL: http://llvm.org/viewvc/llvm-project?rev=343778&view=rev Log: [clangd] clangd-indexer gathers refs and stores them in index files. Reviewers: ioeric Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-com

[clang-tools-extra] r343780 - [clangd] expose MergedIndex class

2018-10-04 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu Oct 4 07:20:22 2018 New Revision: 343780 URL: http://llvm.org/viewvc/llvm-project?rev=343780&view=rev Log: [clangd] expose MergedIndex class Summary: This allows inheriting from it, so index() can ga away and allowing TestTU::index) to be fixed. Reviewers: ioeric Su

[clang-tools-extra] r343793 - [clangd] Fix ambiguous constructor in DexTest

2018-10-04 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu Oct 4 09:05:22 2018 New Revision: 343793 URL: http://llvm.org/viewvc/llvm-project?rev=343793&view=rev Log: [clangd] Fix ambiguous constructor in DexTest Modified: clang-tools-extra/trunk/unittests/clangd/DexTests.cpp Modified: clang-tools-extra/trunk/unittests/cl

[clang-tools-extra] r343800 - [clangd] Add std::move for converting-return to satisfy older compilers

2018-10-04 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu Oct 4 10:15:41 2018 New Revision: 343800 URL: http://llvm.org/viewvc/llvm-project?rev=343800&view=rev Log: [clangd] Add std::move for converting-return to satisfy older compilers Modified: clang-tools-extra/trunk/unittests/clangd/TestTU.cpp Modified: clang-tools-

Re: [clang-tools-extra] r343780 - [clangd] expose MergedIndex class

2018-10-04 Thread Sam McCall via cfe-commits
n-void function [-Wreturn-type] > } > ^ > > Douglas Yung > > > -Original Message- > > From: cfe-commits [mailto:cfe-commits-boun...@lists.llvm.org] On Behalf > > Of Sam McCall via cfe-commits > > Sent: Thursday, October 04, 2018 7:20 > > To: cf

[clang-tools-extra] r343802 - [clangd] Simplify Dex query tree logic and fix missing-posting-list bug

2018-10-04 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu Oct 4 10:18:55 2018 New Revision: 343802 URL: http://llvm.org/viewvc/llvm-project?rev=343802&view=rev Log: [clangd] Simplify Dex query tree logic and fix missing-posting-list bug Summary: The bug being fixed: when a posting list doesn't exist in the index, it was prev

[clang-tools-extra] r343801 - [clangd] Dex: FALSE iterator, peephole optimizations, fix AND bug

2018-10-04 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu Oct 4 10:18:49 2018 New Revision: 343801 URL: http://llvm.org/viewvc/llvm-project?rev=343801&view=rev Log: [clangd] Dex: FALSE iterator, peephole optimizations, fix AND bug Summary: The FALSE iterator will be used in a followup patch to fix a logic bug in Dex (current

[clang-tools-extra] r343841 - [clangd] Make binary index format the default, remove dead flag.

2018-10-05 Thread Sam McCall via cfe-commits
Author: sammccall Date: Fri Oct 5 02:05:28 2018 New Revision: 343841 URL: http://llvm.org/viewvc/llvm-project?rev=343841&view=rev Log: [clangd] Make binary index format the default, remove dead flag. Reviewers: hokein Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, kadircet, cf

[clang-tools-extra] r343844 - [clangd] Fix a subtle case for GetBeginningOfIdentifier.

2018-10-05 Thread Sam McCall via cfe-commits
Author: sammccall Date: Fri Oct 5 05:08:06 2018 New Revision: 343844 URL: http://llvm.org/viewvc/llvm-project?rev=343844&view=rev Log: [clangd] Fix a subtle case for GetBeginningOfIdentifier. Calling getMacroArgExpansionLocation too early was causing Lexer::getRawToken to do the wrong thing - le

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