mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-28 15:36:07 +00:00

Summary: The example that was broken before (^ designates completion points): class Foo { Foo() : fie^ld^() {} // no completions were provided here. int field; }; To fix it we don't cut off lexing after an identifier followed by code completion token is lexed. Instead we skip the rest of identifier and continue lexing. This is consistent with behavior of completion when completion token is right before the identifier. Reviewers: sammccall, aaron.ballman, bkramer, sepavloff, arphaman, rsmith Reviewed By: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D44932 llvm-svn: 330833
7 lines
252 B
C++
7 lines
252 B
C++
// Check that clang does not crash when completing at the last char in the
|
|
// buffer.
|
|
// NOTE: This file must *NOT* have newline at the end.
|
|
// RUN: %clang_cc1 -code-completion-at=%s:7:2 %s | FileCheck %s
|
|
// CHECK: COMPLETION: foo
|
|
using foo = int***;
|
|
f |