llvm-project/clang/lib/Parse
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
..
CMakeLists.txt [OpenMP][NFCI] Introduce llvm/IR/OpenMPConstants.h 2019-12-10 00:10:09 -06:00
ParseAST.cpp [Support] Add TimeTraceScope constructor without detail arg 2019-12-11 14:32:21 +00:00
ParseCXXInlineMethods.cpp Revert "[Concepts] Placeholder constraints and abbreviated templates" 2020-01-23 10:38:59 +01:00
ParseDecl.cpp Revert "[Concepts] Placeholder constraints and abbreviated templates" 2020-01-23 10:38:59 +01:00
ParseDeclCXX.cpp Revert "[Concepts] Placeholder constraints and abbreviated templates" 2020-01-23 10:38:59 +01:00
ParseExpr.cpp [clang][CodeComplete] Make completion work after initializer lists 2020-01-23 15:32:46 +01:00
ParseExprCXX.cpp [Concepts] Requires Expressions 2020-01-19 00:23:26 +02:00
ParseInit.cpp [c++20] Add support for designated direct-list-initialization syntax. 2019-08-31 01:00:37 +00:00
ParseObjc.cpp Implement __attribute__((objc_direct)), __attribute__((objc_direct_members)) 2019-11-18 11:48:40 -08:00
ParseOpenMP.cpp [Concepts] Function trailing requires clauses 2020-01-09 15:07:51 +02:00
ParsePragma.cpp Move vtordisp mode from Attr class to LangOptions.h, NFC 2019-11-22 15:47:46 -08:00
ParseStmt.cpp [Diagnostic] make Wmisleading-indendation not warn about labels 2020-01-06 23:22:27 +01:00
ParseStmtAsm.cpp Disallow an empty string literal in an asm label 2020-01-08 08:38:02 -05:00
ParseTemplate.cpp Revert "[Concepts] Placeholder constraints and abbreviated templates" 2020-01-23 10:38:59 +01:00
ParseTentative.cpp Revert "[Concepts] Placeholder constraints and abbreviated templates" 2020-01-23 10:38:59 +01:00
Parser.cpp Revert "[Concepts] Placeholder constraints and abbreviated templates" 2020-01-23 10:38:59 +01:00