llvm-project/clang/test/CodeCompletion
Ilya Biryukov b3510c4254 [CodeComplete] Fix completion at the end of keywords
Summary:
Make completion behave consistently no matter if it is run at the
start, in the middle or at the end of an identifier that happens to
be a keyword or a macro name. Since completion is often ran on
incomplete identifiers, they may turn into keywords by accident.

For example, we should produce same results for all of these
completion points:

    // ^ is completion point.
    ^class
    cla^ss
    class^

Previously clang produced different results for the last case (as if
the completion point was after a space: `class ^`).

This change also updates some offsets in tests that (unintentionally?)
relied on the old behavior.

Reviewers: sammccall, bkramer, arphaman, aaron.ballman

Reviewed By: sammccall

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D45887

llvm-svn: 330717
2018-04-24 13:48:53 +00:00
..
Inputs [Lex] Fix crash on code completion in comment in included file. 2018-01-19 23:41:47 +00:00
PR9728.cpp
auto.cpp
auto_type.c [CodeCompletion] Code complete the '__auto_type' keyword 2017-02-13 23:35:59 +00:00
bracket-decl.c
call.c
call.cpp Avoid printing some redundant name qualifiers in completion 2017-11-08 10:39:09 +00:00
comments.cpp [Lex] Fix crash on code completion in comment in included file. 2018-01-19 23:41:47 +00:00
constexpr.cpp
crash-func-init.cpp Fixed a crash in code completion. 2017-09-08 13:36:38 +00:00
ctor-initializer.cpp Fix heuristics skipping invalid ctor-initializers with C++11 2016-11-03 07:36:17 +00:00
documentation.cpp
documentation.m
enable-if-attr-crash.cpp [SemaOverload] Fixed crash on code completion 2018-03-09 14:43:29 +00:00
end-of-ident-macro.cpp [CodeComplete] Fix completion at the end of keywords 2018-04-24 13:48:53 +00:00
end-of-ident.cpp [CodeComplete] Fix completion at the end of keywords 2018-04-24 13:48:53 +00:00
enum-switch-case-qualified.cpp
enum-switch-case.c
enum-switch-case.cpp
function-templates.cpp
functions.cpp Add default values for function parameter chunks 2017-07-19 10:45:40 +00:00
ignore-ns-level-decls.cpp [Sema] Ignore decls in namespaces when global decls are not wanted. 2017-12-13 10:26:49 +00:00
inside-macros.cpp [CodeComplete] Fix completion in the middle of idents in macro calls 2018-01-22 17:18:28 +00:00
keywords.cpp [CodeCompletion] Code complete the missing C++11 keywords 2017-02-13 23:19:40 +00:00
macros-in-modules.c
macros-in-modules.m
macros.c [CodeComplete] Fix completion at the end of keywords 2018-04-24 13:48:53 +00:00
member-access.c
member-access.cpp [CodeComplete] Omit templated constructors from member list too. 2018-01-22 20:44:47 +00:00
namespace-alias.cpp
namespace.cpp [CodeComplete] Fix completion at the end of keywords 2018-04-24 13:48:53 +00:00
nested-name-specifier.cpp
objc-expr.m
objc-message.m
objc-message.mm Implement filtering for code completion of identifiers. 2016-07-27 14:56:59 +00:00
objc-protocol-member-access.m [CodeCompletion] Show protocol properties that are accessed through qualified id 2016-10-12 11:40:15 +00:00
operator.cpp [CodeComplete] Fix completion at the end of keywords 2018-04-24 13:48:53 +00:00
ordinary-name-cxx11.cpp [CodeCompletion] Code complete the missing C++11 keywords 2017-02-13 23:19:40 +00:00
ordinary-name.c [CodeCompletion] Allow system headers providing private symbols with a single underscore. 2016-07-01 01:17:02 +00:00
ordinary-name.cpp
pch-and-module.m Fix CodeCompletion & TypoCorrection when combining a PCH with Modules 2016-05-04 00:53:13 +00:00
pragma-macro-token-caching.c [Preprocessor] Fix incorrect token caching that occurs when lexing _Pragma 2017-02-24 17:45:16 +00:00
preamble.c
qualifiers-as-written.cpp Workaround reverse-iteration buildbot breakages. Filed PR35244. 2017-11-08 13:05:52 +00:00
some_struct.h
stdin.c
tag.c [CodeComplete] Fix completion at the end of keywords 2018-04-24 13:48:53 +00:00
tag.cpp [CodeComplete] Fix completion at the end of keywords 2018-04-24 13:48:53 +00:00
templates.cpp
truncation.c
truncation.c.h
uninstantiated_params.cpp Avoid printing some redundant name qualifiers in completion 2017-11-08 10:39:09 +00:00
using-namespace.cpp [CodeComplete] Fix completion at the end of keywords 2018-04-24 13:48:53 +00:00
using.cpp [CodeComplete] Fix completion at the end of keywords 2018-04-24 13:48:53 +00:00