[all-commits] [llvm/llvm-project] 138adb: [clangd] Refine logic on $0 in completion snippets

zyn0217 via All-commits all-commits at lists.llvm.org
Fri Mar 17 02:57:41 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 138adb0980328d6b958a732d6853d0111aa9cb51
      https://github.com/llvm/llvm-project/commit/138adb0980328d6b958a732d6853d0111aa9cb51
  Author: Younan Zhang <zyn7109 at gmail.com>
  Date:   2023-03-17 (Fri, 17 Mar 2023)

  Changed paths:
    M clang-tools-extra/clangd/CodeComplete.cpp
    M clang-tools-extra/clangd/CodeCompletionStrings.cpp
    M clang-tools-extra/clangd/CodeCompletionStrings.h
    M clang-tools-extra/clangd/index/SymbolCollector.cpp
    M clang-tools-extra/clangd/unittests/CodeCompleteTests.cpp
    M clang-tools-extra/clangd/unittests/CodeCompletionStringsTests.cpp

  Log Message:
  -----------
  [clangd] Refine logic on $0 in completion snippets

We have a workaround from D128621 that makes $0 no longer being
a placeholder to conform a vscode feature. However, we have to
refine the logic as it may suppress the last parameter placeholder
for constructor of base class because not all patterns of completion
are compound statements.

This fixes clangd/clangd#1479

Reviewed By: nridge

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




More information about the All-commits mailing list