llvm-project/clang
Kadir Cetinkaya 24364cd12b
[clang][CodeComplete] Make completion work after initializer lists
Summary:
CodeCompletion was not being triggered after successfully parsed
initializer lists, e.g.

```cpp
void foo(int, bool);
void bar() {
  foo({1}^, false);
}
```

CodeCompletion would suggest the function foo as an overload candidate up until
the point marked with `^` but after that point we do not trigger signature help
since parsing succeeds.

This patch handles that case by failing in parsing expression lists whenever we
see a codecompletion token, in addition to getting an invalid subexpression.

Reviewers: sammccall

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D73177
2020-01-23 15:32:46 +01:00
..
INPUTS
bindings [Wdocumentation] Implement \anchor 2019-12-21 14:52:21 +01:00
cmake [CMake][Fuchsia] Disable in-process cc1 2020-01-22 10:11:54 -08:00
docs Add a bit of documentation on attribute spellings that were missing. 2020-01-22 15:22:40 -05:00
examples Update clang-interpreter example to incorporate changes in ce2207abaf. 2020-01-21 22:00:50 -08:00
include [ARM,MVE] Support immediate vbicq,vorrq,vmvnq intrinsics. 2020-01-23 11:53:52 +00:00
lib [clang][CodeComplete] Make completion work after initializer lists 2020-01-23 15:32:46 +01:00
runtime
test [clang][CodeComplete] Make completion work after initializer lists 2020-01-23 15:32:46 +01:00
tools Revert "[cmake] Fix clang builds with BUILD_SHARED=ON and CLANG_LINK_CLANG_DYLIB=ON" 2020-01-22 16:12:45 -08:00
unittests Treat C# `using` as a control statement 2020-01-23 13:19:55 +01:00
utils [ARM,MVE] Make the MVE intrinsics work in C++! 2020-01-23 14:10:27 +00:00
www [www] Update cxx_status page to list changes on the Clang 10 branch as 2020-01-22 14:48:56 -08:00
.arcconfig
.clang-format
.clang-tidy
.gitignore
CMakeLists.txt [Clang][Driver] Re-use the calling process instead of creating a new process for the cc1 invocation 2020-01-13 10:40:18 -05:00
CODE_OWNERS.TXT
INSTALL.txt
LICENSE.TXT
ModuleInfo.txt
NOTES.txt
README.txt [NFC] test commit reverted 2019-12-21 22:12:07 +04:00

README.txt

//===----------------------------------------------------------------------===//
// C Language Family Front-end
//===----------------------------------------------------------------------===//

Welcome to Clang.  This is a compiler front-end for the C family of languages
(C, C++, Objective-C, and Objective-C++) which is built as part of the LLVM
compiler infrastructure project.

Unlike many other compiler frontends, Clang is useful for a number of things
beyond just compiling code: we intend for Clang to be host to a number of
different source-level tools.  One example of this is the Clang Static Analyzer.

If you're interested in more (including how to build Clang) it is best to read
the relevant web sites.  Here are some pointers:

Information on Clang:             http://clang.llvm.org/
Building and using Clang:         http://clang.llvm.org/get_started.html
Clang Static Analyzer:            http://clang-analyzer.llvm.org/
Information on the LLVM project:  http://llvm.org/

If you have questions or comments about Clang, a great place to discuss them is
on the Clang development mailing list:
  http://lists.llvm.org/mailman/listinfo/cfe-dev

If you find a bug in Clang, please file it in the LLVM bug tracker:
  http://llvm.org/bugs/