[all-commits] [llvm/llvm-project] 5c55d3: [CodeComplete] Member completion: heuristically re...

Sam McCall via All-commits all-commits at lists.llvm.org
Thu Feb 11 02:03:59 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5c55d3747b0cab17aaa07729cf90a49dbda71bbe
      https://github.com/llvm/llvm-project/commit/5c55d3747b0cab17aaa07729cf90a49dbda71bbe
  Author: Sam McCall <sam.mccall at gmail.com>
  Date:   2021-02-11 (Thu, 11 Feb 2021)

  Changed paths:
    M clang-tools-extra/clangd/unittests/CodeCompleteTests.cpp
    M clang/lib/Sema/SemaCodeComplete.cpp
    M clang/test/CodeCompletion/member-access.cpp

  Log Message:
  -----------
  [CodeComplete] Member completion: heuristically resolve some dependent base exprs

Today, inside a template, you can get completion for:

Foo<T> t;
t.^

t has dependent type Foo<T>, and we use the primary template to find its members.
However we also want this to work:

t.foo.bar().^

The type of t.foo.bar() is DependentTy, so we attempt to resolve using similar
heuristics (e.g. primary template).

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




More information about the All-commits mailing list