llvm-project/clang/lib/Lex
Ilya Biryukov b8f231a42c [CodeComplete] Fix completion in the middle of idents in macro calls
Summary:
This patch removes IdentifierInfo from completion token after remembering
the identifier in the preprocessor.

Prior to this patch, completion token had the IdentifierInfo set to null when
completing at the start of identifier and to the II for completion prefix
when in the middle of identifier.

This patch unifies how code completion token is handled when it is insterted
before the identifier and in the middle of the identifier.

The actual IdentifierInfo can still be obtained from the Preprocessor.

Reviewers: bkramer, arphaman

Reviewed By: bkramer

Subscribers: cfe-commits

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

llvm-svn: 323133
2018-01-22 17:18:28 +00:00
..
CMakeLists.txt
HeaderMap.cpp Use StringRef for MemoryBuffer identifier API (NFC) 2016-10-01 16:38:28 +00:00
HeaderSearch.cpp Track shadow modules with a generation counter. 2018-01-05 22:13:56 +00:00
Lexer.cpp [Lex] Avoid out-of-bounds dereference in LexAngledStringLiteral. 2018-01-12 18:54:35 +00:00
LiteralSupport.cpp Now that C++17 is official (https://www.iso.org/standard/68564.html), start changing the C++1z terminology over to C++17. NFC intended, these are all mechanical changes. 2017-12-04 20:27:34 +00:00
MacroArgs.cpp [c++2a] Implement P0306 __VA_OPT__ (Comma omission and comma deletion) 2017-10-15 01:26:26 +00:00
MacroInfo.cpp [Lex] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-12-04 23:16:21 +00:00
ModuleMap.cpp Track shadow modules with a generation counter. 2018-01-05 22:13:56 +00:00
PPCaching.cpp [Lex] Fix crash on code completion in comment in included file. 2018-01-19 23:41:47 +00:00
PPCallbacks.cpp
PPConditionalDirectiveRecord.cpp Switch PPCallbacks to take the new MacroDefinition instead of MacroDirective*, in order to preserve full information on module macro expansion. 2015-05-04 03:15:40 +00:00
PPDirectives.cpp [PCH] Serialize skipped preprocessor ranges 2018-01-15 19:14:16 +00:00
PPExpressions.cpp Keep the IdentifierInfo in the Token for alternative operator keyword 2017-07-14 09:23:40 +00:00
PPLexerChange.cpp [Lex] Fix crash on code completion in comment in included file. 2018-01-19 23:41:47 +00:00
PPMacroExpansion.cpp __is_target_environment: Check the environment after parsing it 2017-12-15 20:07:53 +00:00
PTHLexer.cpp [Lex] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-12-06 23:18:41 +00:00
Pragma.cpp Preserve unknown STDC pragma through preprocessor 2018-01-05 22:45:03 +00:00
PreprocessingRecord.cpp [PCH] Serialize skipped preprocessor ranges 2018-01-15 19:14:16 +00:00
Preprocessor.cpp [CodeComplete] Fix completion in the middle of idents in macro calls 2018-01-22 17:18:28 +00:00
PreprocessorLexer.cpp [Lex] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-12-04 23:16:21 +00:00
ScratchBuffer.cpp [Lex] Use WritableMemoryBuffer in ScratchBuffer.cpp 2018-01-11 10:43:45 +00:00
TokenConcatenation.cpp Now that C++17 is official (https://www.iso.org/standard/68564.html), start changing the C++1z terminology over to C++17. NFC intended, these are all mechanical changes. 2017-12-04 20:27:34 +00:00
TokenLexer.cpp [Lex] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-12-08 22:39:26 +00:00
UnicodeCharSets.h