[all-commits] [llvm/llvm-project] 92417e: [CodeCompletion] Signature help for braced constru...

Sam McCall via All-commits all-commits at lists.llvm.org
Mon Jan 3 11:15:17 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 92417eaf3329dc823c905ec6a608b83ac62b4f7c
      https://github.com/llvm/llvm-project/commit/92417eaf3329dc823c905ec6a608b83ac62b4f7c
  Author: Sam McCall <sam.mccall at gmail.com>
  Date:   2022-01-03 (Mon, 03 Jan 2022)

  Changed paths:
    M clang-tools-extra/clangd/ClangdLSPServer.cpp
    M clang-tools-extra/clangd/CodeComplete.cpp
    M clang-tools-extra/clangd/test/initialize-params.test
    M clang-tools-extra/clangd/unittests/CodeCompleteTests.cpp
    M clang/include/clang/Sema/CodeCompleteConsumer.h
    M clang/include/clang/Sema/Sema.h
    M clang/lib/Frontend/ASTUnit.cpp
    M clang/lib/Parse/ParseDecl.cpp
    M clang/lib/Parse/ParseDeclCXX.cpp
    M clang/lib/Parse/ParseExprCXX.cpp
    M clang/lib/Parse/ParseInit.cpp
    M clang/lib/Parse/ParseOpenMP.cpp
    M clang/lib/Sema/CodeCompleteConsumer.cpp
    M clang/lib/Sema/SemaCodeComplete.cpp
    M clang/test/CodeCompletion/ctor-signature.cpp
    M clang/tools/libclang/CIndexCodeCompletion.cpp
    M lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp

  Log Message:
  -----------
  [CodeCompletion] Signature help for braced constructor calls

Implementation is based on the "expected type" as used for
designated-initializers in braced init lists. This means it can deduce the type
in some cases where it's not written:

  void foo(Widget);
  foo({ /*help here*/ });

Only basic constructor calls are in scope of this patch, excluded are:
 - aggregate initialization (no help is offered for aggregates)
 - initializer_list initialization (no help is offered for these constructors)

Fixes https://github.com/clangd/clangd/issues/306

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




More information about the All-commits mailing list