[PATCH] D53654: [clang] Improve ctor initializer completions.
Kadir Cetinkaya via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 25 06:13:01 PDT 2018
kadircet added inline comments.
================
Comment at: lib/Sema/SemaCodeComplete.cpp:5101
+ const auto *ND = Base.getType()->getAsCXXRecordDecl();
+ if (isa<ClassTemplateSpecializationDecl>(ND) ||
+ isa<ClassTemplatePartialSpecializationDecl>(ND)) {
----------------
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.
Repository:
rC Clang
https://reviews.llvm.org/D53654
More information about the cfe-commits
mailing list