summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/unittests
Commit message (Collapse)AuthorAgeFilesLines
...
* [clangd] Retrieve minimally formatted comment text in completion.Ilya Biryukov2018-05-163-17/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | 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/+35
| | | | | | | | | | | | | | | | | 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] Fix a link failure in unittestsHeejin Ahn2018-05-161-0/+1
| | | | | | | | | | | | | Summary: D46524 (rL332378) introduced a link failure when built with `-DSHARED_LIB=ON`, which this patch fixes. Reviewers: ioeric Subscribers: klimek, mgorny, ilya-biryukov, ioeric, MaskRay, jkorous, cfe-commits Differential Revision: https://reviews.llvm.org/D46906 llvm-svn: 332438
* [clangd] Extract scoring/ranking logic, and shave yaks.Sam McCall2018-05-158-119/+318
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Code completion scoring was embedded in CodeComplete.cpp, which is bad: - awkward to test. The mechanisms (extracting info from index/sema) can be unit-tested well, the policy (scoring) should be quantitatively measured. Neither was easily possible, and debugging was hard. The intermediate signal struct makes this easier. - hard to reuse. This is a bug in workspaceSymbols: it just presents the results in the index order, which is not sorted in practice, it needs to rank them! Also, index implementations care about scoring (both query-dependent and independent) in order to truncate result lists appropriately. The main yak shaved here is the build() function that had 3 variants across unit tests is unified in TestTU.h (rather than adding a 4th variant). Reviewers: ilya-biryukov Subscribers: klimek, mgorny, ioeric, MaskRay, jkorous, mgrang, cfe-commits Differential Revision: https://reviews.llvm.org/D46524 llvm-svn: 332378
* [clangd] Populate #include insertions as additional edits in completion items.Eric Liu2018-05-152-51/+227
| | | | | | | | | | | | | | | | | | | | Summary: o Remove IncludeInsertion LSP command. o Populate include insertion edits synchromously in completion items. o Share the code completion compiler instance and precompiled preamble to get existing inclusions in main file. o Include insertion logic lives only in CodeComplete now. o Use tooling::HeaderIncludes for inserting new includes. o Refactored tests. Reviewers: sammccall Reviewed By: sammccall Subscribers: klimek, ilya-biryukov, MaskRay, jkorous, cfe-commits Differential Revision: https://reviews.llvm.org/D46497 llvm-svn: 332363
* [clangd] Remove LSP command-based #include insertion.Eric Liu2018-05-151-61/+0
| | | | | | | | | | | | | | | | | Summary: clangd will populate #include insertions as addtionalEdits in completion items. The code completion tests in ClangdServerTest will be added back in D46497. Reviewers: ilya-biryukov, sammccall Reviewed By: ilya-biryukov Subscribers: klimek, MaskRay, jkorous, cfe-commits Differential Revision: https://reviews.llvm.org/D46676 llvm-svn: 332362
* [clangd] Don't query index when completing inside classesIlya Biryukov2018-05-141-0/+61
| | | | | | | | | | | | | | | | | Summary: We used to query the index when completing after class qualifiers, e.g. 'ClassName::^'. We should not do that for the same reasons we don't query the index for member access expressions. Reviewers: sammccall, ioeric Reviewed By: sammccall Subscribers: klimek, MaskRay, jkorous, cfe-commits Differential Revision: https://reviews.llvm.org/D46795 llvm-svn: 332226
* Partially revert r331456: [clang-tidy] Remove AnalyzeTemporaryDtors option.Roman Lebedev2018-05-081-0/+3
| | | | | | | | | | | | | | | | | | | That broke every single .clang-tidy config out there which happened to specify AnalyzeTemporaryDtors option: YAML:5:24: error: unknown key 'AnalyzeTemporaryDtors' AnalyzeTemporaryDtors: false ^~~~~ Error parsing <...>/.clang-tidy: Invalid argument More so, that error isn't actually a error, the clang-tidy does not exit with $? != 0, it continues with the default config. Surely this breakage isn't the intended behavior. But if it is, feel free to revert this commit. llvm-svn: 331822
* [clangd] Incorporate #occurrences in scoring code complete results.Sam McCall2018-05-031-0/+15
| | | | | | | | | | | | Summary: needs tests Reviewers: ilya-biryukov Subscribers: klimek, ioeric, MaskRay, jkorous, cfe-commits Differential Revision: https://reviews.llvm.org/D46183 llvm-svn: 331457
* [clang-tidy] Remove AnalyzeTemporaryDtors option.Alexander Kornienko2018-05-031-5/+0
| | | | | | | | Remove the `AnalyzeTemporaryDtors` option, since the corresponding `cfg-temporary-dtors` option of the Static Analyzer defaults to `true` since r326461. llvm-svn: 331456
* [clangd] Using index for GoToDefinition.Haojian Wu2018-04-301-7/+85
| | | | | | | | | | | | | | | | | | | Summary: This patch adds index support for GoToDefinition -- when we don't get the definition from local AST, we query our index (Static&Dynamic) index to get it. Since we currently collect top-level symbol in the index, it doesn't support all cases (e.g. class members), we will extend the index to include more symbols in the future. Reviewers: sammccall Subscribers: klimek, ilya-biryukov, jkorous-apple, ioeric, MaskRay, cfe-commits Differential Revision: https://reviews.llvm.org/D45717 llvm-svn: 331189
* [clangd] Also use UTF-16 in index position.Haojian Wu2018-04-301-0/+9
| | | | | | | | | | Reviewers: sammccall Subscribers: klimek, ilya-biryukov, ioeric, MaskRay, jkorous, cfe-commits Differential Revision: https://reviews.llvm.org/D46258 llvm-svn: 331168
* [clangd] Fix unicode handling, using UTF-16 where LSP requires it.Sam McCall2018-04-273-22/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The Language Server Protocol unfortunately mandates that locations in files be represented by line/column pairs, where the "column" is actually an index into the UTF-16-encoded text of the line. (This is because VSCode is written in JavaScript, which is UTF-16-native). Internally clangd treats source files at UTF-8, the One True Encoding, and generally deals with byte offsets (though there are exceptions). Before this patch, conversions between offsets and LSP Position pretended that Position.character was UTF-8 bytes, which is only true for ASCII lines. Now we examine the text to convert correctly (but don't actually need to transcode it, due to some nice details of the encodings). The updated functions in SourceCode are the blessed way to interact with the Position.character field, and anything else is likely to be wrong. So I also updated the other accesses: - CodeComplete needs a "clang-style" line/column, with column in utf-8 bytes. This is now converted via Position -> offset -> clang line/column (a new function is added to SourceCode.h for the second conversion). - getBeginningOfIdentifier skipped backwards in UTF-16 space, which is will behave badly when it splits a surrogate pair. Skipping backwards in UTF-8 coordinates gives the lexer a fighting chance of getting this right. While here, I clarified(?) the logic comments, fixed a bug with identifiers containing digits, simplified the signature slightly and added a test. This seems likely to cause problems with editors that have the same bug, and treat the protocol as if columns are UTF-8 bytes. But we can find and fix those. Reviewers: hokein Subscribers: klimek, ilya-biryukov, ioeric, MaskRay, jkorous, cfe-commits Differential Revision: https://reviews.llvm.org/D46035 llvm-svn: 331029
* [clangd] Initialize candidate count in unit testBenjamin Kramer2018-04-241-1/+1
| | | | | | Found by msan. llvm-svn: 330746
* [clangd] Implementation of workspace/symbol requestMarc-Andre Laperle2018-04-234-0/+258
| | | | | | | | | | | | | | | | | | | | | | | 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
* Fix tests after changes to clang-format in r330573.Manuel Klimek2018-04-231-8/+10
| | | | | | | | | | We do now both: - stop reformatting a sequence after a closing brace in more cases, in order to not misindent after an incorrect closing brace - format the closing brace when formatting the line containing the opening brace llvm-svn: 330580
* Parse .h files as objective-c++ if we don't have a compile command.Sam McCall2018-04-203-1/+41
| | | | | | | | | | | | Summary: This makes C++/objC not totally broken, without hurting C files too much. Reviewers: ilya-biryukov Subscribers: klimek, jkorous-apple, ioeric, cfe-commits Differential Revision: https://reviews.llvm.org/D45442 llvm-svn: 330418
* [clangd] Fix "fail to create file URI" warnings in FileIndexTest.Haojian Wu2018-04-171-2/+2
| | | | | | | | | | | | | | | Summary: When running the FileIndexTest, it shows "Failed to create an URI for file XXX: not a valid absolute file path" warnings, and the generated Symbols is missing Location information. Reviewers: ioeric Subscribers: klimek, ilya-biryukov, jkorous-apple, MaskRay, cfe-commits Differential Revision: https://reviews.llvm.org/D45692 llvm-svn: 330182
* [clangd] Fix label and snippet for funcs in the indexIlya Biryukov2018-04-141-4/+4
| | | | | | | 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-0/+38
| | | | | | | | | | | | | | | | 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-133-42/+50
| | | | | | | | | | | | | | | | | | 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
* [clang-apply-replacements] Convert tooling::Replacements to ↵Malcolm Parsons2018-04-113-70/+5
| | | | | | | | | | | | | | | | | | | | tooling::AtomicChange for conflict resolving of changes, code cleanup, and code formatting. Summary: By converting Replacements by AtomicChange, clang-apply-replacements is able like clang-tidy to automatically cleanup and format changes. This should permits to close this ticket: https://bugs.llvm.org/show_bug.cgi?id=35051 and attempt to follow hints from https://reviews.llvm.org/D43500 comments. Reviewers: klimek, ioeric Reviewed By: ioeric Subscribers: malcolm.parsons, mgorny, cfe-commits Differential Revision: https://reviews.llvm.org/D43764 Patch by Jeremy Demeule. llvm-svn: 329813
* [clangd] Use operator<< to prevent printers issues in GtestMarc-Andre Laperle2018-04-103-39/+1
| | | | | | | | | | | | | | | | | | | | | | | Summary: It is possible that there will be two different instantiations of the printer template for a given type and some tests could end up calling the wrong (default) one. For example, it was seen in CodeCompleteTests.cpp when printing CompletionItems that it would use the wrong printer because the default is also instantiated in ClangdTests.cpp. With this change, objects that were previously printed with a custom Printer now get printed through the operator<< which is declared alongside the class. This rule of the thumb should make it less error-prone. Reviewers: simark, ilya-biryukov, sammccall Reviewed By: simark, ilya-biryukov, sammccall Subscribers: bkramer, hokein, sammccall, klimek, ilya-biryukov, jkorous-apple, ioeric, MaskRay, cfe-commits Differential Revision: https://reviews.llvm.org/D44764 llvm-svn: 329725
* s/LLVM_ON_WIN32/_WIN32/, clang-tools-extraNico Weber2018-04-103-5/+5
| | | | | | | | | | | LLVM_ON_WIN32 is set exactly with MSVC and MinGW (but not Cygwin) in HandleLLVMOptions.cmake, which is where _WIN32 defined too. Just use the default macro instead of a reinvented one. See thread "Replacing LLVM_ON_WIN32 with just _WIN32" on llvm-dev and cfe-dev. No intended behavior change. llvm-svn: 329695
* [cmake] Include LLVMTestingSupport when doing stand-alone buildMichal Gorny2018-04-091-0/+9
| | | | | | | | | | | | | | Explicitly include and build lib/Testing/Support from LLVM sources when doing a stand-alone build. This is necessary since clangd tests started to depend on LLVMTestingSupport library which is neither installed by LLVM, nor built by clang itself. Since completely separate build of clang-tools-extra is not supported, this relies on variables set by clang CMakeLists. Differential Revision: https://reviews.llvm.org/D45409 llvm-svn: 329594
* [clangd] Allow using customized include path in URI.Haojian Wu2018-04-092-0/+26
| | | | | | | | | | | | | | | | | | | Summary: Calculating the include path from absolute file path does not always work for all build system, e.g. bazel uses symlink as the build working directory. The absolute file path from editor and clang is diverged from each other. We need to address it properly in build sysmtem integration. This patch worksarounds the issue by providing a hook in URI which allows clients to provide their customized include path. Reviewers: sammccall Subscribers: klimek, ilya-biryukov, jkorous-apple, ioeric, MaskRay, cfe-commits Differential Revision: https://reviews.llvm.org/D45426 llvm-svn: 329578
* [clangd] Adapt index interfaces to D45014, and fix the old bugs.Sam McCall2018-04-092-1/+18
| | | | | | | | | | | | | 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] synthesize fix message when the diagnostic doesn't provide one.Sam McCall2018-04-031-16/+9
| | | | | | | | | | | | | | | | | | | | Summary: Currently if a fix is attached directly to a diagnostic, we repeat the diagnostic message as the fix message. From eyeballing the top diagnostics, it seems describing the textual replacement would be much clearer. e.g. error: use of undeclared identifier 'goo'; did you mean 'foo'? action before: use of undeclared identifier 'goo'; did you mean 'foo'? action after: change 'goo' to 'foo' Reviewers: ilya-biryukov Subscribers: klimek, jkorous-apple, ioeric, MaskRay, cfe-commits Differential Revision: https://reviews.llvm.org/D45069 llvm-svn: 329090
* [clangd] Support incremental document syncingSimon Marchi2018-03-262-0/+351
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch adds support for incremental document syncing, as described in the LSP spec. The protocol specifies ranges in terms of Position (a line and a character), and our drafts are stored as plain strings. So I see two things that may not be super efficient for very large files: - Converting a Position to an offset (the positionToOffset function) requires searching for end of lines until we reach the desired line. - When we update a range, we construct a new string, which implies copying the whole document. However, for the typical size of a C++ document and the frequency of update (at which a user types), it may not be an issue. This patch aims at getting the basic feature in, and we can always improve it later if we find it's too slow. Signed-off-by: Simon Marchi <simon.marchi@ericsson.com> Reviewers: malaperle, ilya-biryukov Reviewed By: ilya-biryukov Subscribers: MaskRay, klimek, mgorny, ilya-biryukov, jkorous-apple, ioeric, cfe-commits Differential Revision: https://reviews.llvm.org/D44272 llvm-svn: 328500
* Fix misuse of llvm::YAML in clangd test.Jordan Rose2018-03-231-1/+1
| | | | | | Caught by LLVM r328345! llvm-svn: 328354
* [clangd] Remove 'static' from a function inside anonymous ns. NFCIlya Biryukov2018-03-231-1/+1
| | | | llvm-svn: 328302
* Make positionToOffset return llvm::Expected<size_t>Simon Marchi2018-03-213-21/+58
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: To implement incremental document syncing, we want to verify that the ranges provided by the front-end are valid. Currently, positionToOffset deals with invalid Positions by returning 0 or Code.size(), which are two valid offsets. Instead, return an llvm:Expected<size_t> with an error if the position is invalid. According to the LSP, if the character value exceeds the number of characters of the given line, it should default back to the end of the line. It makes sense in some contexts to have this behavior, and does not in other contexts. The AllowColumnsBeyondLineLength parameter allows to decide what to do in that case, default back to the end of the line, or return an error. Reviewers: ilya-biryukov Subscribers: klimek, ilya-biryukov, jkorous-apple, ioeric, cfe-commits Differential Revision: https://reviews.llvm.org/D44673 llvm-svn: 328100
* [clangd] Handle multiple callbacks from Sema's completionIlya Biryukov2018-03-161-0/+37
| | | | | | | | | | | | | | | | | | Summary: When parser backtracks, we might receive multiple code completion callbacks. Previously we had a failing assertion there, now we take first results and hope they are good enough. Reviewers: sammccall Reviewed By: sammccall Subscribers: klimek, jkorous-apple, ioeric, cfe-commits Differential Revision: https://reviews.llvm.org/D44567 llvm-svn: 327717
* Move DraftMgr from ClangdServer to ClangdLSPServerSimon Marchi2018-03-161-1/+4
| | | | | | | | | | | | | | | | | | | | Summary: This patch moves the draft manager closer to the edge of Clangd, from ClangdServer to ClangdLSPServer. This will make it easier to implement incremental document sync, by making ClangdServer only deal with complete documents. As a result, DraftStore doesn't have to deal with versioning, and thus its API can be simplified. It is replaced by a StringMap in ClangdServer holding a current version number for each file. Signed-off-by: Simon Marchi <simon.marchi@ericsson.com> Subscribers: klimek, mgorny, ilya-biryukov, jkorous-apple, ioeric, cfe-commits Differential Revision: https://reviews.llvm.org/D44408 llvm-svn: 327711
* [change-namespace] Don't match a function call/ref multiple times.Eric Liu2018-03-151-2/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Previously, the matcher matches a function call/ref multiple times, one for each decl ancestor. This might cause problems. For example, in the following case, `func()` would be matched once (with namespace context) before using decl is seen and once after using decl is seeing, which would result in different conflicting replacements as the first match would replace `func` with "ns::func" as it doesn't know about the using decl. ``` namespace x { namespace { using ::ns::func; void f() { func(); } } } ``` Switching from `hasDescendant` matching to `hasAncestor` matching solves the problem. Reviewers: hokein Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D44517 llvm-svn: 327629
* [clangd] Don't expose vfs in TUScheduler::runWithPreamble.Ilya Biryukov2018-03-141-2/+1
| | | | | | | | | | | | | | | | Summary: It was previously an easy way to concurrently access a mutable vfs, which is a recipe for disaster. Reviewers: sammccall Reviewed By: sammccall Subscribers: klimek, jkorous-apple, cfe-commits, ioeric Differential Revision: https://reviews.llvm.org/D44463 llvm-svn: 327537
* [clangd] Remove forceReparse, add a flag to addDocument insteadIlya Biryukov2018-03-143-33/+26
| | | | | | | | | | | | | | Summary: To make the removal of DraftMgr from ClangdServer easier (D44408). Reviewers: sammccall, simark Reviewed By: sammccall, simark Subscribers: simark, klimek, jkorous-apple, ioeric, cfe-commits Differential Revision: https://reviews.llvm.org/D44462 llvm-svn: 327532
* [clangd] Add an interface that finds symbol by SymbolID in SymbolIndex.Eric Liu2018-03-142-9/+59
| | | | | | | | | | | | | | | | Summary: Potential use case: argument go-to-definition result with symbol information (e.g. function definition in cc file) that might not be in the AST. Reviewers: sammccall Reviewed By: sammccall Subscribers: klimek, ilya-biryukov, jkorous-apple, cfe-commits Differential Revision: https://reviews.llvm.org/D44305 llvm-svn: 327487
* [clangd] Use the macro name range as the definition range.Haojian Wu2018-03-131-2/+2
| | | | | | | | | | | | | | Summary: This also aligns with the behavior of declarations. Reviewers: sammccall Reviewed By: sammccall Subscribers: klimek, ilya-biryukov, jkorous-apple, ioeric, cfe-commits Differential Revision: https://reviews.llvm.org/D44423 llvm-svn: 327401
* [clangd] Fix irrelevant declaratations in goto definition (on macros).Haojian Wu2018-03-131-0/+9
| | | | | | | | | | | | | | | Summary: DeclrationAndMacrosFinder will find some declarations (not macro!) that are referened inside the macro somehow, isSearchedLocation() is not sufficient, we don't know whether the searched source location is macro or not. Reviewers: ilya-biryukov Subscribers: klimek, jkorous-apple, ioeric, cfe-commits Differential Revision: https://reviews.llvm.org/D44293 llvm-svn: 327387
* [clangd] Remove extra ";", NFC.Haojian Wu2018-03-131-1/+1
| | | | llvm-svn: 327386
* [clangd] Remove Tagged and some related APIs from ClangdServer.Sam McCall2018-03-128-102/+84
| | | | | | | | | | | | Context can do what Tagged was intended to support (snapshot filesystems), and less intrusively. getTaggedFileSystem() no longer needs a filename. Cleanups while here: - code-complete now returns errors as Expected, like other functions - added an alias Callback<T> for the usual callback function type llvm-svn: 327344
* [clangd] Fix diagnostic errors in the test code, NFC.Haojian Wu2018-03-121-1/+3
| | | | | | | | | | | | Reviewers: ilya-biryukov Reviewed By: ilya-biryukov Subscribers: klimek, jkorous-apple, cfe-commits, ioeric Differential Revision: https://reviews.llvm.org/D44294 llvm-svn: 327293
* [clangd] Revamp handling of diagnostics.Ilya Biryukov2018-03-125-87/+178
| | | | | | | | | | | | | | | | Summary: The new implementation attaches notes to diagnostic message and shows the original diagnostics in the message of the note. Reviewers: hokein, ioeric, sammccall Reviewed By: sammccall Subscribers: klimek, mgorny, cfe-commits, jkorous-apple Differential Revision: https://reviews.llvm.org/D44142 llvm-svn: 327282
* [clangd] Collect the number of files referencing a symbol in the static index.Sam McCall2018-03-122-1/+30
| | | | | | | | | | | | | | | 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-092-17/+29
| | | | | | | | | | | | 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-0/+13
| | | | | | | | | | | | | | 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] Don't end completion item labels with '::'Ilya Biryukov2018-03-061-0/+12
| | | | llvm-svn: 326809
* [clangd] Address missed comments from D44003Sam McCall2018-03-061-2/+4
| | | | llvm-svn: 326798
* [clangd] Sort includes when formatting code or inserting new includes.Eric Liu2018-03-061-4/+47
| | | | | | | | | | Reviewers: hokein, ilya-biryukov Subscribers: klimek, jkorous-apple, cfe-commits Differential Revision: https://reviews.llvm.org/D44138 llvm-svn: 326773
OpenPOWER on IntegriCloud