[PATCH] D46909: [Sema] Fix assertion when constructor is disabled with partially specialized template.

2018-05-16 Thread Volodymyr Sapsai via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL332509: [Sema] Fix assertion when constructor is disabled with partially specialized… (authored by vsapsai, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D46909: [Sema] Fix assertion when constructor is disabled with partially specialized template.

2018-05-16 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Thanks for the quick review, Richard. I'll keep in mind the idea with comparing results of multiple lookups when I work on other partial specialization-related bugs. https://reviews.llvm.org/D46909 ___ cfe-commits mailing

[PATCH] D46909: [Sema] Fix assertion when constructor is disabled with partially specialized template.

2018-05-15 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. Looks good. It might be beneficial to do the lookup twice in this case and then issue a diagnostic if the results differ, but given how rarely this is happening, it doesn't really seem

[PATCH] D46909: [Sema] Fix assertion when constructor is disabled with partially specialized template.

2018-05-15 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai updated this revision to Diff 146944. vsapsai added a comment. Potentially, VarTemplateDecl is susceptible to the same bug as ClassTemplateSpecializationDecl. But I wasn't able to trigger it. And based on code I've convinced myself that the mentioned early exit in Sema::CheckVarTemplateId

[PATCH] D46909: [Sema] Fix assertion when constructor is disabled with partially specialized template.

2018-05-15 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added inline comments. Comment at: clang/lib/Sema/SemaTemplate.cpp:3873-3881 // Find the variable template specialization declaration that // corresponds to these arguments. void *InsertPos = nullptr; if (VarTemplateSpecializationDecl *Spec =

[PATCH] D46909: [Sema] Fix assertion when constructor is disabled with partially specialized template.

2018-05-15 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai created this revision. vsapsai added reviewers: rsmith, arphaman. The added test case was triggering assertion > Assertion failed: > (!SpecializedTemplate.is() && "Already set > to a class template partial specialization!"), function