This revision was automatically updated to reflect the committed changes.
Closed by commit rC345844: [clang] Improve ctor initializer completions.
(authored by kadircet, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D53654?vs=171926&id=172140#toc
Repository:
rC Clang
htt
ilya-biryukov accepted this revision.
ilya-biryukov added a comment.
This revision is now accepted and ready to land.
LGTM. Thanks for the change!
Repository:
rC Clang
https://reviews.llvm.org/D53654
___
cfe-commits mailing list
cfe-commits@lists
kadircet updated this revision to Diff 171926.
kadircet added a comment.
- Revert back declaration.
Repository:
rC Clang
https://reviews.llvm.org/D53654
Files:
lib/Sema/SemaCodeComplete.cpp
test/CodeCompletion/ctor-initializer.cpp
test/Index/complete-ctor-inits.cpp
test/Index/complet
ilya-biryukov added inline comments.
Comment at: lib/Sema/SemaCodeComplete.cpp:176
public:
+void AddConstructorResults(const CXXRecordDecl *Record, Result R);
+
AddConstructorResults is not defined and not used. Remove it?
Repository:
rC Clang
https:/
kadircet added inline comments.
Comment at: lib/Sema/SemaCodeComplete.cpp:5136
+ auto AddDefaultCtorInit = [&](const char *TypedName,
+const char *TypeName,
+const NamedDecl* ND) {
ilya-biryukov wro
kadircet updated this revision to Diff 171899.
kadircet marked 8 inline comments as done.
kadircet added a comment.
- Address comments.
Repository:
rC Clang
https://reviews.llvm.org/D53654
Files:
lib/Sema/SemaCodeComplete.cpp
test/CodeCompletion/ctor-initializer.cpp
test/Index/complete
ilya-biryukov added a comment.
Mostly NITs
Comment at: lib/Sema/SemaCodeComplete.cpp:5136
+ auto AddDefaultCtorInit = [&](const char *TypedName,
+const char *TypeName,
+const NamedDecl* ND) {
kadi
kadircet added inline comments.
Comment at: lib/Sema/SemaCodeComplete.cpp:821
+
+DeclContext::lookup_result getConstructorResults(ASTContext &Context,
+ const CXXRecordDecl *Record,
ilya-biryukov wrote:
> There's a
kadircet updated this revision to Diff 171703.
kadircet marked 8 inline comments as done.
kadircet added a comment.
- Address comments.
Repository:
rC Clang
https://reviews.llvm.org/D53654
Files:
lib/Sema/SemaCodeComplete.cpp
test/CodeCompletion/ctor-initializer.cpp
test/Index/complete
ilya-biryukov added inline comments.
Comment at: lib/Sema/SemaCodeComplete.cpp:813
+static void AddTemplateParameterChunks(ASTContext &Context,
+ const PrintingPolicy &Policy,
We don't seem to need this fwd-decl anymore. Re
kadircet added inline comments.
Comment at: lib/Sema/SemaCodeComplete.cpp:5135
+ };
+ auto AddDefaultCtorInit = [&](const char *TypedName,
+const char *TypeName,
ZaMaZaN4iK wrote:
> Is it good idea to capture ALL by reference? Pr
ZaMaZaN4iK added inline comments.
Comment at: lib/Sema/SemaCodeComplete.cpp:5135
+ };
+ auto AddDefaultCtorInit = [&](const char *TypedName,
+const char *TypeName,
Is it good idea to capture ALL by reference? Probably will be bet
kadircet updated this revision to Diff 171516.
kadircet marked 5 inline comments as done.
kadircet added a comment.
- Address comments & offline discussions.
Repository:
rC Clang
https://reviews.llvm.org/D53654
Files:
lib/Sema/SemaCodeComplete.cpp
test/CodeCompletion/ctor-initializer.cpp
ilya-biryukov added inline comments.
Comment at: include/clang/Sema/CodeCompleteConsumer.h:767
+ /// When Kind == RK_Declaration and a FieldDecl has been passed as
+ /// Declaration, this will hold the identifiers name. To be used later on
when
+ /// generating constructors f
kadircet updated this revision to Diff 171259.
kadircet added a comment.
- Add a generic constructor if found none.
- format && add comments.
- Add generic constructors to tests.
Repository:
rC Clang
https://reviews.llvm.org/D53654
Files:
include/clang/Sema/CodeCompleteConsumer.h
lib/Sem
kadircet updated this revision to Diff 171099.
kadircet marked an inline comment as done.
kadircet added a comment.
- Use addConstructorResult.
Repository:
rC Clang
https://reviews.llvm.org/D53654
Files:
include/clang/Sema/CodeCompleteConsumer.h
lib/Sema/SemaCodeComplete.cpp
test/CodeC
kadircet updated this revision to Diff 171077.
kadircet marked 7 inline comments as done.
kadircet added a comment.
- Address comments.
Repository:
rC Clang
https://reviews.llvm.org/D53654
Files:
include/clang/Sema/CodeCompleteConsumer.h
lib/Sema/SemaCodeComplete.cpp
test/CodeCompletio
ilya-biryukov added inline comments.
Comment at: lib/Sema/SemaCodeComplete.cpp:5101
+const auto *ND = Base.getType()->getAsCXXRecordDecl();
+if (isa(ND) ||
+isa(ND)) {
kadircet wrote:
> kadircet wrote:
> > ilya-biryukov wrote:
> > > Why special-ca
kadircet added inline comments.
Comment at: lib/Sema/SemaCodeComplete.cpp:5101
+const auto *ND = Base.getType()->getAsCXXRecordDecl();
+if (isa(ND) ||
+isa(ND)) {
kadircet wrote:
> ilya-biryukov wrote:
> > Why special-case the template specializat
kadircet added inline comments.
Comment at: lib/Sema/SemaCodeComplete.cpp:5101
+const auto *ND = Base.getType()->getAsCXXRecordDecl();
+if (isa(ND) ||
+isa(ND)) {
ilya-biryukov wrote:
> Why special-case the template specializations?
> Are we tryin
ilya-biryukov added a comment.
Great idea, this will definitely improve the UX of completion!
NIT: a typo in the change description: 'bas' should be 'base'.
Pedantic NIT (sorry!): in the change description, we should probably use
'initializers' instead of 'initializations'
Co
kadircet created this revision.
kadircet added a reviewer: ilya-biryukov.
Herald added subscribers: cfe-commits, arphaman, eraman.
Instead of providing generic "args" for member and bas class
initializations, tries to fetch relevant constructors and show their signatures.
Repository:
rC Clang
22 matches
Mail list logo