[all-commits] [llvm/llvm-project] a76e68: [CodeComplete] Member completion for concept-const...
Sam McCall via All-commits
all-commits at lists.llvm.org
Tue Mar 31 09:52:14 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: a76e68c9704fb5b3faf25bb8d51e405b5310ff08
https://github.com/llvm/llvm-project/commit/a76e68c9704fb5b3faf25bb8d51e405b5310ff08
Author: Sam McCall <sam.mccall at gmail.com>
Date: 2020-03-31 (Tue, 31 Mar 2020)
Changed paths:
M clang/include/clang/Sema/Scope.h
M clang/lib/Sema/CodeCompleteConsumer.cpp
M clang/lib/Sema/SemaCodeComplete.cpp
A clang/test/CodeCompletion/concepts.cpp
Log Message:
-----------
[CodeComplete] Member completion for concept-constrained types.
Summary:
The basic idea is to walk through the concept definition, looking for
t.foo() where t has the constrained type.
In this patch:
- nested types are recognized and offered after ::
- variable/function members are recognized and offered after the correct
dot/arrow/colon trigger
- member functions are recognized (anything directly called). parameter
types are presumed to be the argument types. parameters are unnamed.
- result types are available when a requirement has a type constraint.
These are printed as constraints, except same_as<T> which prints as T.
Not in this patch:
- support for merging/overloading when two locations describe the same member.
The last one wins, for any given name. This is probably important...
- support for nested template members (T::x<int>)
- support for completing members of (instantiations of) template template parameters
Reviewers: nridge, saar.raz
Subscribers: mgrang, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D73649
More information about the All-commits
mailing list