llvm-project/clang-tools-extra/clangd/unittests
Kadir Cetinkaya f5465e74ef
[clangd] Include expression in DecltypeTypeLoc sourcerange while building SelectionTree
Summary:
Currently AST only contains the location for `decltype` keyword,
therefore we were skipping expressions inside decltype while building selection
tree.

This patch extends source range in such cases to contain the expression as well.
A proper fix would require changes to Sema and DecltypeTypeLoc to contain these
location information.

Fixes https://github.com/clangd/clangd/issues/250.

Reviewers: sammccall

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D72594
2020-01-13 20:33:13 +01:00
..
xpc [clangd][xpc] Fix XPC unittests 2019-04-29 19:41:30 +00:00
ASTTests.cpp [clangd] Replace shortenNamespace with getQualification 2020-01-03 09:05:30 +01:00
Annotations.cpp
Annotations.h
BackgroundIndexTests.cpp [clangd] (take 2) Try harder to find a plausible `clang` as argv0, particularly on Mac. 2019-12-06 09:47:03 +01:00
CMakeLists.txt [clangd] Add path mappings functionality 2020-01-07 12:40:51 +01:00
CancellationTests.cpp
CanonicalIncludesTests.cpp [clangd] Use pre-populated mappings for standard symbols 2019-09-09 15:32:51 +00:00
ClangdTests.cpp [clangd] (take 2) Try harder to find a plausible `clang` as argv0, particularly on Mac. 2019-12-06 09:47:03 +01:00
CodeCompleteTests.cpp NFC: Fix trivial typos in comments 2020-01-04 10:28:41 -05:00
CodeCompletionStringsTests.cpp Code completion should not ignore default parameters in functions. 2019-08-07 16:52:21 +00:00
CollectMacrosTests.cpp [clangd] NFC, add getLangOpts helper to ParsedAST 2019-12-04 16:55:25 -08:00
CompileCommandsTests.cpp [clangd] Try to fix CompileCommandsTests on windows. NFC 2019-12-06 12:28:01 +01:00
ContextTests.cpp [clang-tools-extra] Migrate llvm::make_unique to std::make_unique 2019-08-14 23:52:23 +00:00
DexTests.cpp [clangd] Add bool return type to Index::refs API. 2019-11-13 14:42:30 +01:00
DiagnosticsTests.cpp [clangd] Adjust diagnostic range to be inside main file 2020-01-09 18:02:33 +01:00
DraftStoreTests.cpp
ExpectedTypeTest.cpp [clangd] Rename ClangdUnit.h -> ParsedAST.h. NFC 2019-09-04 09:46:06 +00:00
FSTests.cpp [clangd] Make PreambleStatusCache handle filenames more carefully 2019-07-01 10:11:18 +00:00
FileDistanceTests.cpp
FileIndexTests.cpp [clangd] Add xref for macros to FileIndex. 2020-01-08 08:27:50 +01:00
FindSymbolsTests.cpp [clangd] Fix typo in symbol kind conversion 2019-11-15 17:34:22 +01:00
FindTargetTests.cpp [clangd] Assert that the testcases in FindExplicitReferencesTest.All have no diagnostics 2020-01-12 22:18:21 -05:00
FormatTests.cpp [clangd] Revamp textDocument/onTypeFormatting. 2019-06-10 14:26:21 +00:00
FormattedStringTests.cpp [clangd] Render header of hover card as a heading 2020-01-13 20:24:09 +01:00
FunctionTests.cpp
FuzzyMatchTests.cpp [clangd] Qualify uses of ::testing everywhere. NFC 2019-05-06 10:08:47 +00:00
GlobalCompilationDatabaseTests.cpp [clangd] (take 2) Try harder to find a plausible `clang` as argv0, particularly on Mac. 2019-12-06 09:47:03 +01:00
HeaderSourceSwitchTests.cpp [clangd] Catch an unchecked "Expected<T>" in HeaderSourceSwitch. 2019-10-07 11:37:25 +00:00
HeadersTests.cpp [clangd] Surface errors from command-line parsing 2019-08-28 09:24:55 +00:00
HoverTests.cpp [clangd] Render header of hover card as a heading 2020-01-13 20:24:09 +01:00
IndexActionTests.cpp [Tooling] Migrated APIs that take ownership of objects to unique_ptr 2019-08-30 09:29:34 +00:00
IndexTests.cpp [clangd] Add bool return type to Index::refs API. 2019-11-13 14:42:30 +01:00
JSONTransportTests.cpp
Matchers.h Replace llvm::integer_sequence and friends with the C++14 standard version 2019-08-15 10:56:05 +00:00
ParsedASTTests.cpp Fix issues reported by -Wrange-loop-analysis when building with latest Clang (trunk). NFC. 2020-01-07 13:58:26 -05:00
PathMappingTests.cpp [clangd] Add path mappings functionality 2020-01-07 12:40:51 +01:00
PrintASTTests.cpp [clangd] Fixed printTemplateSpecializationArgs not printing partial variable specialization arguments. 2019-08-09 07:35:16 +00:00
QualityTests.cpp [clangd] Boost code completion results that were named in the last few lines. 2019-05-06 10:25:10 +00:00
RIFFTests.cpp
RenameTests.cpp Fix issues reported by -Wrange-loop-analysis when building with latest Clang (trunk). NFC. 2020-01-07 13:58:26 -05:00
SelectionTests.cpp [clangd] Include expression in DecltypeTypeLoc sourcerange while building SelectionTree 2020-01-13 20:33:13 +01:00
SemanticHighlightingTests.cpp Reland "[AST] Traverse the class type loc inside the member type loc."" 2019-12-09 11:18:12 +01:00
SemanticSelectionTests.cpp [clangd] Prefer the left character if the character on the right of the cursor is semicolon. 2019-11-28 13:15:10 +01:00
SerializationTests.cpp [clangd] Use our own relation kind. 2019-10-17 14:08:28 +00:00
SourceCodeTests.cpp [clangd] NFC, add getLangOpts helper to ParsedAST 2019-12-04 16:55:25 -08:00
SymbolCollectorTests.cpp [clangd] Use expansion location when the ref is inside macros. 2019-12-09 16:34:01 +01:00
SymbolInfoTests.cpp NFC: Fix trivial typos in comments 2020-01-04 10:28:41 -05:00
SyncAPI.cpp NFC: Fix trivial typos in comments 2020-01-04 10:28:41 -05:00
SyncAPI.h [clangd] Implement cross-file rename. 2019-11-26 10:04:31 +01:00
TUSchedulerTests.cpp NFC: Fix trivial typos in comments 2020-01-04 10:28:41 -05:00
TestFS.cpp [clangd] Remove the extra ";", NFC 2019-07-11 12:31:18 +00:00
TestFS.h [clangd] Reland rL365634 2019-07-11 09:54:31 +00:00
TestIndex.cpp
TestIndex.h
TestScheme.h
TestTU.cpp [clangd] Surface errors from command-line parsing 2019-08-28 09:24:55 +00:00
TestTU.h [clangd] Rename ClangdUnit.h -> ParsedAST.h. NFC 2019-09-04 09:46:06 +00:00
ThreadingTests.cpp
TraceTests.cpp
TweakTesting.cpp Revert "[clangd] Reapply b60896fad9 Fall back to selecting token-before-cursor if token-after-cursor fails." 2019-12-16 19:07:49 +01:00
TweakTesting.h [clangd] Define out-of-line availability checks 2019-12-04 08:21:09 +01:00
TweakTests.cpp NFC: Fix trivial typos in comments 2020-01-04 10:28:41 -05:00
TypeHierarchyTests.cpp [clangd] Show template arguments in type hierarchy when possible 2020-01-12 22:31:40 -05:00
URITests.cpp
XRefsTests.cpp [clangd] Publish xref for macros from Index and AST. 2020-01-13 11:11:18 +01:00
lit.cfg.py [clangd] Restore conventional names for lit configs, and .in/.py split. Fix build_mode indirection. 2019-05-02 08:00:39 +00:00
lit.site.cfg.py.in [clangd] Restore conventional names for lit configs, and .in/.py split. Fix build_mode indirection. 2019-05-02 08:00:39 +00:00