summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clangd/index/SymbolCollector.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* [clangd] Encode Line/Column as a 32-bits integer.Haojian Wu2018-10-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | Summary: This would buy us more memory. Using a 32-bits integer is enough for most human-readable source code (up to 4M lines and 4K columns). Previsouly, we used 8 bytes for a position, now 4 bytes, it would save us 8 bytes for each Ref and each Symbol instance. For LLVM-project binary index file, we save ~13% memory. | Before | After | | 412MB | 355MB | Reviewers: sammccall Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D53363 llvm-svn: 344735
* [clangd] Fix buildbot failure.Haojian Wu2018-10-171-3/+5
| | | | llvm-svn: 344680
* [clangd] Collect refs from headers.Haojian Wu2018-10-171-14/+33
| | | | | | | | | | | | | | | | | Summary: Add a flag to SymbolCollector to collect refs fdrom headers. Note that we collect refs from headers in static index, and we don't do it for dynamic index because of the preamble (we skip function body in preamble, collecting it will result incomplete results). Reviewers: sammccall Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D53322 llvm-svn: 344678
* [clangd] Fix some references missing in dynamic index.Haojian Wu2018-10-151-17/+19
| | | | | | | | | | | | | | | | | | | Summary: Previously, SymbolCollector postfilters all references at the end to find all references of interesting symbols. It was incorrect when indxing main AST where we don't see locations of symbol declarations and definitions in the main AST (as those are in preamble AST). The fix is to do earily check during collecting references. Reviewers: sammccall Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D53273 llvm-svn: 344507
* [clangd] NFC: Migrate to LLVM STLExtras API where possibleKirill Bobyrev2018-10-071-2/+1
| | | | | | | | | | | | | | This patch improves readability by migrating `std::function(ForwardIt start, ForwardIt end, ...)` to LLVM's STLExtras range-based equivalent `llvm::function(RangeT &&Range, ...)`. Similar change in Clang: D52576. Reviewed By: sammccall Differential Revision: https://reviews.llvm.org/D52650 llvm-svn: 343937
* [clangd] Remove last usage of ast matchers from SymbolCollector. NFCSam McCall2018-10-051-4/+2
| | | | llvm-svn: 343849
* [clangd] Get rid of AST matchers in SymbolCollector. NFCEric Liu2018-09-171-13/+36
| | | | | | | | | | Reviewers: ilya-biryukov, kadircet Subscribers: MaskRay, jkorous, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D52089 llvm-svn: 342362
* [clangd] Canonicalize include paths in clangd.Eric Liu2018-09-071-6/+6
| | | | | | Get rid of "../" and "../../". llvm-svn: 341645
* [clangd] Add "Deprecated" field to Symbol and CodeCompletion.Eric Liu2018-09-061-2/+5
| | | | | | | | | | | | | | Summary: Also set "deprecated" field in LSP CompletionItem. Reviewers: sammccall, kadircet Reviewed By: sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D51724 llvm-svn: 341576
* [clangd] Set SymbolID for sema macros so that they can be merged with index ↵Eric Liu2018-09-061-10/+6
| | | | | | | | | | | | macros. Reviewers: sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D51688 llvm-svn: 341534
* [clangd] SymbolOccurrences -> Refs and cleanupSam McCall2018-09-041-13/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: A few things that I noticed while merging the SwapIndex patch: - SymbolOccurrences and particularly SymbolOccurrenceSlab are unwieldy names, and these names appear *a lot*. Ref, RefSlab, etc seem clear enough and read/format much better. - The asymmetry between SymbolSlab and RefSlab (build() vs freeze()) is confusing and irritating, and doesn't even save much code. Avoiding RefSlab::Builder was my idea, but it was a bad one; add it. - DenseMap<SymbolID, ArrayRef<Ref>> seems like a reasonable compromise for constructing MemIndex - and means many less wasted allocations than the current DenseMap<SymbolID, vector<Ref*>> for FileIndex, and none for slabs. - RefSlab::find() is not actually used for anything, so we can throw away the DenseMap and keep the representation much more compact. - A few naming/consistency fixes: e.g. Slabs,Refs -> Symbols,Refs. Reviewers: ioeric Subscribers: ilya-biryukov, MaskRay, jkorous, mgrang, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D51605 llvm-svn: 341368
* [clangd] Support multiple #include headers in one symbol.Eric Liu2018-09-031-2/+5
| | | | | | | | | | | | | | | | | | | | Summary: Currently, a symbol can have only one #include header attached, which might not work well if the symbol can be imported via different #includes depending on where it's used. This patch stores multiple #include headers (with # references) for each symbol, so that CodeCompletion can decide which include to insert. In this patch, code completion simply picks the most popular include as the default inserted header. We also return all possible includes and their edits in the `CodeCompletion` results. Reviewers: sammccall Reviewed By: sammccall Subscribers: mgrang, ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D51291 llvm-svn: 341304
* [clangd] Flatten out Symbol::Details. It was ill-conceived, sorry.Sam McCall2018-08-311-8/+4
| | | | | | | | | | Reviewers: ioeric Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D51504 llvm-svn: 341211
* [clangd] Collect symbol occurrences in SymbolCollector.Haojian Wu2018-08-311-15/+59
| | | | | | | | | | SymbolCollector will be used for two cases: - collect Symbol type only, used for indexing preamble AST. - collect Symbol and SymbolOccurrences, used for indexing main AST. For finding local references from the AST, we will implement it in other ways. llvm-svn: 341208
* [clangd] Share getSymbolID implementation.Haojian Wu2018-08-071-9/+8
| | | | | | | | | | | | Summary: And remove all duplicated implementation. Reviewers: ioeric Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D50375 llvm-svn: 339116
* [clangd] Upgrade logging facilities with levels and formatv.Sam McCall2018-07-111-3/+2
| | | | | | | | | | | | | | | | | | | | | | Summary: log() is split into four functions: - elog()/log()/vlog() have different severity levels, allowing filtering - dlog() is a lazy macro which uses LLVM_DEBUG - it logs to the logger, but conditionally based on -debug-only flag and is omitted in release builds All logging functions use formatv-style format strings now, e.g: log("Could not resolve URI {0}: {1}", URI, Result.takeError()); Existing log sites have been split between elog/log/vlog by best guess. This includes a workaround for passing Error to formatv that can be simplified when D49170 or similar lands. Subscribers: ilya-biryukov, javed.absar, ioeric, MaskRay, jkorous, cfe-commits Differential Revision: https://reviews.llvm.org/D49008 llvm-svn: 336785
* [clangd] Make sure macro information exists before increasing usage count.Eric Liu2018-07-091-6/+4
| | | | llvm-svn: 336581
* [clangd] Support indexing MACROs.Eric Liu2018-07-091-24/+110
| | | | | | | | | | | | | | Summary: This is not enabled in the global-symbol-builder or dynamic index yet. Reviewers: sammccall Reviewed By: sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, cfe-commits Differential Revision: https://reviews.llvm.org/D49028 llvm-svn: 336553
* [clangd] Track origins of symbols (various indexes, Sema).Sam McCall2018-07-051-0/+1
| | | | | | | | | | | | Summary: Surface it in the completion items C++ API, and when a flag is set. Reviewers: ioeric Subscribers: ilya-biryukov, MaskRay, jkorous, cfe-commits Differential Revision: https://reviews.llvm.org/D48938 llvm-svn: 336309
* [clangd] Always remove dots before converting paths to URIs in symbol collector.Eric Liu2018-06-251-1/+2
| | | | llvm-svn: 335458
* [clangd] More precise representation of symbol names/labels in the index.Sam McCall2018-06-221-13/+7
| | | | | | | | | | | | | | | | | | | | | | Summary: Previously, the strings matched LSP completion pretty closely. The completion label was a single string, for instance. This made implementing completion itself easy but makes it hard to use the names in other way, e.g. pretty-printed name in synthesized documentation/hover. It also limits our introspection into completion items, which can only be as precise as the indexed symbols. This change is a prerequisite to improvements to overload bundling which need to inspect e.g. signature structure. Reviewers: ioeric Subscribers: ilya-biryukov, MaskRay, jkorous, cfe-commits Differential Revision: https://reviews.llvm.org/D48475 llvm-svn: 335360
* [clangd] Expose qualified symbol names in CompletionItem (C++ structure ↵Eric Liu2018-06-221-12/+1
| | | | | | | | | | | | | | | | | | | | only, no json). Summary: The qualified name can be used to match a completion item to its corresponding symbol. This can be useful for tools that measure code completion quality. Qualified names are not precise for identifying symbols; we need to figure out a better way to identify completion items. Reviewers: sammccall Reviewed By: sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, cfe-commits Differential Revision: https://reviews.llvm.org/D48425 llvm-svn: 335334
* [clangd] Remove FilterText from the index.Sam McCall2018-06-221-2/+2
| | | | | | | | | | | | | | | | | Summary: It's almost always identical to Name, and in fact we never used it (we used name instead). The only case where they differ is objc method selectors (foo: vs foo:bar:). We can live with the latter for both name and filterText, so I've made that change too. Reviewers: ioeric Subscribers: ilya-biryukov, MaskRay, jkorous, cfe-commits Differential Revision: https://reviews.llvm.org/D48375 llvm-svn: 335321
* [clangd] Expose 'shouldCollectSymbol' helper from SymbolCollector.Eric Liu2018-06-211-46/+47
| | | | | | | | | | | | | | Summary: This allows tools to examine symbols that would be collected in a symbol index. For example, a tool that measures index-based completion quality would be interested in references to symbols that are collected in the index. Reviewers: sammccall Reviewed By: sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, cfe-commits Differential Revision: https://reviews.llvm.org/D48418 llvm-svn: 335218
* [clangd] Add "member" symbols to the indexMarc-Andre Laperle2018-06-051-11/+13
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: This adds more symbols to the index: - member variables and functions - enum constants in scoped enums The code completion behavior should remain intact but workspace symbols should now provide much more useful symbols. Other symbols should be considered such as the ones in "main files" (files not being included) but this can be done separately as this introduces its fair share of problems. Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com> Reviewers: ioeric, sammccall Reviewed By: ioeric, sammccall Subscribers: hokein, sammccall, jkorous, klimek, ilya-biryukov, jkorous-apple, ioeric, MaskRay, cfe-commits Differential Revision: https://reviews.llvm.org/D44954 llvm-svn: 334017
* [clangd] Avoid indexing decls associated with friend decls.Eric Liu2018-06-041-0/+13
| | | | | | | | | | | | | | | | | | | | Summary: These decls are sometime used as the canonical declarations (e.g. for go-to-def), which seems to be bad. - friend decls that are not definitions should be ignored for indexing purposes - this means they should never be selected as canonical decl - if the friend decl is the only decl, then the symbol should not be indexed Reviewers: sammccall Reviewed By: sammccall Subscribers: mgorny, klimek, ilya-biryukov, MaskRay, jkorous, cfe-commits Differential Revision: https://reviews.llvm.org/D47623 llvm-svn: 333885
* [clangd] Serve comments for headers decls from dynamic index onlyIlya Biryukov2018-05-241-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: To fix a crash in code completion that occurrs when reading doc comments from files that were updated after the preamble was computed. In that case, the files on disk could've been changed and we can't rely on finding the comment text with the same range anymore. The current workaround is to not provide comments from the headers at all and rely on the dynamic index instead. A more principled solution would be to store contents of the files read inside the preamble, but it is way harder to implement properly, given that it would definitely increase the sizes of the preamble. Together with D47272, this should fix all preamble-related crashes we're aware of. Reviewers: sammccall Reviewed By: sammccall Subscribers: klimek, ioeric, MaskRay, jkorous, cfe-commits Differential Revision: https://reviews.llvm.org/D47274 llvm-svn: 333189
* [clangd] Skip .inc headers when canonicalizing header #include.Eric Liu2018-05-241-11/+19
| | | | | | | | | | | | | | | | Summary: This assumes that .inc files are supposed to be included via headers that include them. Reviewers: sammccall Reviewed By: sammccall Subscribers: klimek, ilya-biryukov, MaskRay, jkorous, cfe-commits Differential Revision: https://reviews.llvm.org/D47187 llvm-svn: 333188
* [clangd] Retrieve minimally formatted comment text in completion.Ilya Biryukov2018-05-161-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Previous implementation used to extract brief text from doxygen comments. Brief text parsing slows down completion and is not suited for non-doxygen comments. This commit switches to providing comments that mimic the ones originally written in the source code, doing minimal reindenting and removing the comments markers to make the output more user-friendly. It means we lose support for doxygen-specific features, e.g. extracting brief text, but provide useful results for non-doxygen comments. Switching the doxygen support back is an option, but I suggest to see whether the current approach gives more useful results. Reviewers: sammccall, hokein, ioeric Reviewed By: sammccall Subscribers: klimek, MaskRay, jkorous, cfe-commits Differential Revision: https://reviews.llvm.org/D45999 llvm-svn: 332459
* [clangd] Filter out private proto symbols in SymbolCollector.Eric Liu2018-05-161-0/+43
| | | | | | | | | | | | | | | | | Summary: This uses heuristics to identify private proto symbols. For example, top-level symbols whose name contains "_" are considered private. These symbols are not expected to be used by users. Reviewers: ilya-biryukov, malaperle Reviewed By: ilya-biryukov Subscribers: sammccall, klimek, MaskRay, jkorous, cfe-commits Differential Revision: https://reviews.llvm.org/D46751 llvm-svn: 332456
* [clangd] Log error message instead write to errs(). NFCEric Liu2018-05-151-2/+1
| | | | llvm-svn: 332366
* [clangd] Also use UTF-16 in index position.Haojian Wu2018-04-301-7/+3
| | | | | | | | | | Reviewers: sammccall Subscribers: klimek, ilya-biryukov, ioeric, MaskRay, jkorous, cfe-commits Differential Revision: https://reviews.llvm.org/D46258 llvm-svn: 331168
* [clangd] Implementation of workspace/symbol requestMarc-Andre Laperle2018-04-231-10/+2
| | | | | | | | | | | | | | | | | | | | | | | Summary: This is a basic implementation of the "workspace/symbol" request which is used to find symbols by a string query. Since this is similar to code completion in terms of result, this implementation reuses the "fuzzyFind" in order to get matches. For now, the scoring algorithm is the same as code completion and improvements could be done in the future. The index model doesn't contain quite enough symbols for this to cover common symbols like methods, enum class enumerators, functions in unamed namespaces, etc. The index model will be augmented separately to achieve this. Reviewers: sammccall, ilya-biryukov Reviewed By: sammccall Subscribers: jkorous, hokein, simark, sammccall, klimek, mgorny, ilya-biryukov, mgrang, jkorous-apple, ioeric, MaskRay, cfe-commits Differential Revision: https://reviews.llvm.org/D44882 llvm-svn: 330637
* [clangd] Fix label and snippet for funcs in the indexIlya Biryukov2018-04-141-8/+3
| | | | | | | This is a follow-up to r330004 to fix functions with required template args, e.g. std::make_shared. llvm-svn: 330087
* [clangd] Match AST and Index label for template SymbolsIlya Biryukov2018-04-131-1/+16
| | | | | | | | | | | | | | | | Summary: Previsouly, class completions items from the index were missing template parameters in both the snippet and the label. Reviewers: sammccall, hokein Reviewed By: sammccall Subscribers: klimek, jkorous-apple, ioeric, MaskRay, cfe-commits Differential Revision: https://reviews.llvm.org/D45482 llvm-svn: 330004
* [clangd] Add line and column number to the index symbol.Haojian Wu2018-04-131-3/+18
| | | | | | | | | | | | | | | | | | Summary: LSP is using Line & column as symbol position, clangd needs to transfer file offset to Line & column when sending results back to LSP client, which is a high cost, especially for finding workspace symbol -- we have to read the file content from disk (if it isn't loaded in memory). Saving these information in the index will make the clangd life eaiser. Reviewers: sammccall Subscribers: klimek, ilya-biryukov, jkorous-apple, ioeric, MaskRay, cfe-commits Differential Revision: https://reviews.llvm.org/D45513 llvm-svn: 329997
* [clangd] Adapt index interfaces to D45014, and fix the old bugs.Sam McCall2018-04-091-2/+3
| | | | | | | | | | | | | Summary: Fix bugs: - don't count occurrences of decls where we don't spell the name - findDefinitions at MACRO(^X) goes to the definition of MACRO Subscribers: klimek, ilya-biryukov, jkorous-apple, ioeric, MaskRay, cfe-commits Differential Revision: https://reviews.llvm.org/D45356 llvm-svn: 329571
* [clangd] Fix repeated word typo. NFCFangrui Song2018-03-291-1/+1
| | | | llvm-svn: 328819
* [clangd] Collect the number of files referencing a symbol in the static index.Sam McCall2018-03-121-23/+44
| | | | | | | | | | | | | | | Summary: This is an important ranking signal. It's off for the dynamic index for now. Correspondingly, tell the index infrastructure only to report declarations for the dynamic index. Reviewers: ioeric, hokein Subscribers: klimek, ilya-biryukov, jkorous-apple, cfe-commits Differential Revision: https://reviews.llvm.org/D44315 llvm-svn: 327275
* [clangd] Use identifier range as the definition range.Haojian Wu2018-03-091-18/+5
| | | | | | | | | | | | Summary: This also matches the range in symbol index. Reviewers: sammccall Subscribers: klimek, ilya-biryukov, jkorous-apple, ioeric, cfe-commits Differential Revision: https://reviews.llvm.org/D44247 llvm-svn: 327129
* [clangd] Don't index template specializations.Sam McCall2018-03-091-1/+7
| | | | | | | | | | | | | | Summary: These have different USRs than the underlying entity, but are not typically interesting in their own right and can be numerous (e.g. generated traits). Reviewers: ioeric Subscribers: klimek, ilya-biryukov, jkorous-apple, cfe-commits Differential Revision: https://reviews.llvm.org/D44298 llvm-svn: 327127
* [clangd] Support include canonicalization in symbol leve.Eric Liu2018-03-011-5/+5
| | | | | | | | | | | | | | | | | Summary: Symbols with different canonical includes might be defined in the same header (e.g. symbols defined in STL <iosfwd>). This patch adds support for mapping from qualified symbol names to canonical headers and special mapping for symbols in <iosfwd> Reviewers: sammccall, hokein Reviewed By: sammccall Subscribers: klimek, ilya-biryukov, jkorous-apple, cfe-commits Differential Revision: https://reviews.llvm.org/D43869 llvm-svn: 326456
* [clangd] Prefer the definition of a TagDecl (e.g. class) as ↵Eric Liu2018-02-281-12/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CanonicalDeclaration. Summary: Currently, we pick the first declaration of a symbol in a TU, which is considered canonical in the clangIndex, as the canonical declaration in clangd. This causes forward declarations that might appear in a random header to be used as a canonical declaration, which is not desirable for features like go-to-declaration or include insertion. For example, for class X, we would consider the forward declaration in fwd.h to be the canonical declaration, while the preferred canonical declaration should be the actual definition in x.h. ``` // fwd.h class X; // forward decl // x.h class X {}; ``` This patch fixes the issue by making symbol collector favor the actual definition of a TagDecl (i.e. class/struct/enum/union) found in a header file over the first seen declarations in a TU. Other symbol types like functions are not handled because using the first seen declarations as canonical declarations is usually a good heuristic for them. Reviewers: sammccall Subscribers: klimek, ilya-biryukov, jkorous-apple, cfe-commits Differential Revision: https://reviews.llvm.org/D43823 llvm-svn: 326313
* [clangd] Not collect include headers for dynamic index for now.Eric Liu2018-02-221-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The new behaviors introduced by this patch: o When include collection is enabled, we always set IncludeHeader field in Symbol even if it's the same as FileURI in decl. o Disable include collection in FileIndex which is currently only used to build dynamic index. We should revisit when we actually want to use FileIndex to global index. o Code-completion only uses IncludeHeader to insert headers but not FileURI in CanonicalDeclaration. This ensures that inserted headers are always canonicalized. Note that include insertion can still be triggered for symbols that are already included if they are merged from dynamic index and static index, but we would only use includes that are already canonicalized (e.g. from static index). Reason for change: Collecting header includes in dynamic index enables inserting includes for headers that are not indexed but opened in the editor. Comparing to inserting includes for symbols in global/static index, this is nice-to-have but would probably require non-trivial amount of work to get right. For example: o Currently it's not easy to fully support CanonicalIncludes in dynamic index, given the way we run dynamic index. o It's also harder to reason about the correctness of include canonicalization for dynamic index (i.e. symbols in the current file/TU) than static index where symbols are collected offline and sanity check is possible before shipping to production. o We have less control/flexibility over symbol info in the dynamic index (e.g. URIs, path normalization), which could be used to help make decision when inserting includes. As header collection (especially canonicalization) is relatively new, and enabling it for dynamic index would immediately affect current users with only dynamic index support, I propose we disable it for dynamic index for now to avoid compromising other hot features like code completion and only support it for static index where include insertion would likely to bring more value. Reviewers: ilya-biryukov, sammccall, hokein Subscribers: klimek, jkorous-apple, cfe-commits Differential Revision: https://reviews.llvm.org/D43550 llvm-svn: 325764
* [clangd] collect symbol #include & insert #include in global code completion.Eric Liu2018-02-161-0/+55
| | | | | | | | | | | | | | | | | | Summary: o Collect suitable #include paths for index symbols. This also does smart mapping for STL symbols and IWYU pragma (code borrowed from include-fixer). o For global code completion, add a command for inserting new #include in each code completion item. Reviewers: sammccall Reviewed By: sammccall Subscribers: klimek, mgorny, ilya-biryukov, jkorous-apple, hintonda, cfe-commits Differential Revision: https://reviews.llvm.org/D42640 llvm-svn: 325343
* [clangd] SymbolLocation only covers symbol name.Haojian Wu2018-02-131-18/+12
| | | | | | | | | | | | | | Summary: * Change the offset range to half-open, [start, end). * Fix a few fixmes. Reviewers: sammccall Subscribers: klimek, ilya-biryukov, jkorous-apple, ioeric, cfe-commits Differential Revision: https://reviews.llvm.org/D43182 llvm-svn: 324992
* [clangd] Collect definitions when indexing.Sam McCall2018-02-091-57/+90
| | | | | | | | | | | | | | | | | | | | | | | | | Within a TU: - as now, collect a declaration from the first occurrence of a symbol (taking clang's canonical declaration) - when we first see a definition occurrence, copy the symbol and add it Across TUs/sources: - mergeSymbol in Merge.h is responsible for combining matching Symbols. This covers dynamic/static merges and cross-TU merges in the static index. - it prefers declarations from Symbols that have a definition. - GlobalSymbolBuilderMain is modified to use mergeSymbol as a reduce step. Random cleanups (can be pulled out): - SymbolFromYAML -> SymbolsFromYAML, new singular SymbolFromYAML added - avoid uninit'd SymbolLocations. Add an idiomatic way to check "absent". - CanonicalDeclaration (as well as Definition) are mapped as optional in YAML. - added operator<< for Symbol & SymbolLocation, for debugging Reviewers: ioeric, hokein Subscribers: klimek, ilya-biryukov, jkorous-apple, cfe-commits Differential Revision: https://reviews.llvm.org/D42942 llvm-svn: 324735
* [clangd] Use URIs in index symbols.Eric Liu2018-02-061-34/+49
| | | | | | | | | | | | Reviewers: hokein, sammccall Reviewed By: sammccall Subscribers: klimek, ilya-biryukov, jkorous-apple, cfe-commits Differential Revision: https://reviews.llvm.org/D42915 llvm-svn: 324358
* [clangd] Fix incorrect file path for symbols defined by the compile ↵Haojian Wu2018-02-061-4/+9
| | | | | | | | | | | | | | | | command-line option. Summary: Reviewers: ioeric Reviewed By: ioeric Subscribers: klimek, ilya-biryukov, jkorous-apple, cfe-commits Differential Revision: https://reviews.llvm.org/D42913 llvm-svn: 324328
* [clangd] Remove a unused include. NFCEric Liu2018-02-021-1/+0
| | | | llvm-svn: 324073
OpenPOWER on IntegriCloud