llvm-project/clang/test
Sam McCall 128ce70eef [CodeCompletion] Avoid spurious signature help for init-list args
Somewhat surprisingly, signature help is emitted as a side-effect of
computing the expected type of a function argument.
The reason is that both actions require enumerating the possible
function signatures and running partial overload resolution, and doing
this twice would be wasteful and complicated.

Change #1: document this, it's subtle :-)

However, sometimes we need to compute the expected type without having
reached the code completion cursor yet - in particular to allow
completion of designators.
eb4ab3358c did this but introduced a
regression - it emits signature help in the wrong location as a side-effect.

Change #2: only emit signature help if the code completion cursor was reached.

Currently there is PP.isCodeCompletionReached(), but we can't use it
because it's set *after* running code completion.
It'd be nice to set this implicitly when the completion token is lexed,
but ConsumeCodeCompletionToken() makes this complicated.

Change #3: call cutOffParsing() *first* when seeing a completion token.

After this, the fact that the Sema::Produce*SignatureHelp() functions
are even more confusing, as they only sometimes do that.
I don't want to rename them in this patch as it's another large
mechanical change, but we should soon.

Change #4: prepare to rename ProduceSignatureHelp() to GuessArgumentType() etc.

Differential Revision: https://reviews.llvm.org/D98488
2021-03-16 12:46:40 +01:00
..
APINotes
ARCMT
AST Implement P2173 for attributes on lambdas 2021-03-03 10:05:39 -05:00
ASTMerge Modify TypePrinter to differentiate between anonymous struct and unnamed struct 2021-02-22 14:16:43 -08:00
Analysis [analyzer][solver] Prevent infeasible states (PR49490) 2021-03-12 15:56:48 +03:00
CXX [clang] Fix ICE on invalid type parameters for concepts 2021-03-13 01:23:02 +01:00
ClangScanDeps Revert "[clang-scan-deps] Support clang-cl" 2020-12-14 13:32:38 -05:00
CodeCompletion [CodeCompletion] Avoid spurious signature help for init-list args 2021-03-16 12:46:40 +01:00
CodeGen Emit inline implementation of __builtin__wmemchr on MSVCRT platforms. 2021-03-15 15:30:55 -07:00
CodeGenCUDA Fix test cxx-call-kernel.cpp 2021-03-01 17:10:53 -05:00
CodeGenCXX [DebugInfo] Add an attribute to force type info to be emitted for types that are required to be complete. 2021-03-12 12:30:01 -08:00
CodeGenCoroutines [test] Move coro-retcon-unreachable.ll into llvm/test 2021-01-07 14:06:01 -08:00
CodeGenHIP
CodeGenObjC [ObjC][ARC] Use operand bundle 'clang.arc.attachedcall' instead of 2021-03-04 11:22:30 -08:00
CodeGenObjCXX [ObjC] Encode pointers to C++ classes as "^v" if the encoded string 2021-02-18 09:38:26 -08:00
CodeGenOpenCL [OpenCL] Respect calling convention for builtin 2021-03-15 17:26:51 +00:00
CodeGenOpenCLCXX [OpenCL] Create VoidPtrTy with generic AS in C++ for OpenCL mode 2021-02-17 12:18:46 +03:00
CodeGenSYCL [SYCL] Ignore file-scope asm during device-side SYCL compilation. 2021-02-12 17:00:45 -08:00
Coverage
CoverageMapping Revert "Revert "[Coverage] Emit gap region between statements if first statements contains terminate statements."" 2021-03-04 11:52:43 -08:00
Driver [OpenMP][AMDGPU] Skip backend and assemble phases for amdgcn 2021-03-16 04:58:14 +00:00
FixIt [Sema] Fix diagnostics for one-byte length modifier 2021-03-09 16:56:20 +01:00
Format [test] Use host platform specific error message substitution in lit tests - continued 2021-02-03 09:53:22 -05:00
Frontend Move EntryExitInstrumentation pass location 2021-03-01 10:08:10 -08:00
Headers [Clang][RISCV] Add custom TableGen backend for riscv-vector intrinsics. 2021-03-10 18:43:43 -08:00
Import clang-import-test: Clean up error output for files that cannot be found 2020-12-11 17:07:58 -08:00
Index [AIX][XCOFF] Fixed the test case which failed at aix OS because enable -mignore-xcoff-visibility by default. 2021-03-15 17:33:02 -04:00
Integration
InterfaceStubs [test] Make ELF tests less reliant on the lexicographical order of non-local symbols 2021-02-13 01:01:06 -08:00
Layout [Clang][Sema] Warn when function argument is less aligned than parameter 2021-03-09 10:37:32 +00:00
Lexer Add support for digit separators in C2x. 2021-03-12 07:21:03 -05:00
Misc [DebugInfo] Add an attribute to force type info to be emitted for types that are required to be complete. 2021-03-12 12:30:01 -08:00
Modules Make sure a module file with errors produced via '-fallow-pcm-with-compiler-errors' can be loaded when using implicit modules 2021-02-08 16:10:39 -08:00
OpenMP Revert "[OpenMP] Do not propagate match extensions to nested contexts" 2021-03-11 23:48:36 -06:00
PCH Modify TypePrinter to differentiate between anonymous struct and unnamed struct 2021-02-22 14:16:43 -08:00
Parser [OpenCL] Refactor diagnostic for OpenCL extension/feature 2021-03-12 11:43:53 +03:00
Preprocessor [PowerPC] Add __PCREL__ when PC Relative is enabled. 2021-03-15 15:13:02 -05:00
Profile [Driver] Rename -fprofile-{prefix-map,compilation-dir} to -fcoverage-{prefix-map,compilation-dir} 2021-02-25 21:40:12 -08:00
Refactor
Rewriter
Sema Allow __ieee128 as an alias to __float128 on ppc 2021-03-15 18:28:26 +01:00
SemaCUDA [CUDA][HIP] Support accessing static device variable in host code for -fgpu-rdc 2021-02-24 18:23:45 -05:00
SemaCXX [Sema] Add some basic lambda capture fix-its 2021-03-11 13:46:25 +00:00
SemaObjC [-Wcompletion-handler] Extend list of detected conventions 2021-03-10 10:43:19 +03:00
SemaObjCXX [Sema] Add some basic lambda capture fix-its 2021-03-11 13:46:25 +00:00
SemaOpenCL [OpenCL] Refactor diagnostic for OpenCL extension/feature 2021-03-12 11:43:53 +03:00
SemaOpenCLCXX [OpenCL] Fix default address space in template argument deduction. 2021-02-04 13:51:53 +00:00
SemaSYCL Fix missing error for use of 128-bit integer inside SPIR64 device code. 2020-12-07 10:42:32 -08:00
SemaTemplate Fix miscomputation of dependence for elaborated types that are 2021-02-04 13:14:15 -08:00
TableGen Detect diagnostic groups that are defined in multiple 'def's. 2021-02-18 17:19:01 -08:00
Templight
Tooling [Syntax] Add syntax-tree-dump in clang-check. 2021-01-29 14:10:27 +01:00
Unit Support multi-configuration generators correctly in several config files 2021-02-11 09:32:20 -08:00
VFS [VFS] Add support to RedirectingFileSystem for mapping a virtual directory to one in the external FS. 2021-02-02 14:56:17 +10:00
clang-rename
utils/update_cc_test_checks Replace func name with regex for update test scripts 2021-03-12 17:37:09 -08:00
.clang-format
CMakeLists.txt [clang] Add llvm-strip to test dependencies 2021-01-09 11:57:27 -08:00
TestRunner.sh
cxx-sections.data
lit.cfg.py [FileCheck] Default --allow-unused-prefixes to false 2021-02-08 13:37:04 -08:00
lit.site.cfg.py.in [test] Add ability to get error messages from CMake for errc substitution 2021-03-15 20:56:08 +01:00
make_test_dirs.pl Prefer /usr/bin/env xxx over /usr/bin/xxx where xxx = perl, python, awk 2021-02-25 11:32:27 +01:00