ilya-biryukov added inline comments.
================ Comment at: lib/Sema/SemaCodeComplete.cpp:5101 + const auto *ND = Base.getType()->getAsCXXRecordDecl(); + if (isa<ClassTemplateSpecializationDecl>(ND) || + isa<ClassTemplatePartialSpecializationDecl>(ND)) { ---------------- kadircet wrote: > kadircet wrote: > > ilya-biryukov wrote: > > > Why special-case the template specializations? > > > Are we trying to provide results for dependent types here? > > Sorry, my bad forgot to add a comment. It is rather for backward > > compatibility. Since previous version was adding results directly without > > consulting results, it also added template specializations, whereas current > > version can't add them due to the filtering in > > resultbuilder(https://github.com/llvm-mirror/clang/blob/master/lib/Sema/SemaCodeComplete.cpp#L543). > > So, special casing in here to make sure we still provide those results, > > but can be deleted if seems unimportant. > > > > Not adding a comment until we decide on keeping/deleting the special case. > without consulting results -> without consulting "ResultBuilder" Maybe call AddResult instead of MaybeAddResult (it does not do the checking)? I can hardly see why we might want to filter out any of the results. Also, maybe pass a decl the particular constructor, rather than the CXXRecordDecl to the `ResultBuilder`? Repository: rC Clang https://reviews.llvm.org/D53654 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits