mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-19 11:35:51 -04:00

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
14 lines
473 B
C++
14 lines
473 B
C++
#define ID(X) X
|
|
|
|
void test(bool input_var) {
|
|
ID(input_var) = true;
|
|
// Check that input_var shows up when completing at the start, in the middle
|
|
// and at the end of the identifier.
|
|
//
|
|
// RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:4:6 %s -o - | FileCheck %s
|
|
// RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:4:8 %s -o - | FileCheck %s
|
|
// RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:4:15 %s -o - | FileCheck %s
|
|
|
|
// CHECK: input_var
|
|
}
|