I found that ClassTemplateDecl::getSpecializations is const-qualified, but ClassTemplateDecl::getPartialSpecializationsis not, which has very similar implementation to the former method.
So there is a patch to fix it.
By the way, I do not know who is suitable to review my patch, so if there is better choice as reviewers, please add to "reviewers", thanks.