File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -357,7 +357,7 @@ const Decl *getAdjustedDecl(const Decl *d) {
357357 while (d) {
358358 if (auto *r = dyn_cast<CXXRecordDecl>(d)) {
359359 if (auto *s = dyn_cast<ClassTemplateSpecializationDecl>(r)) {
360- if (!s->getTypeAsWritten ()) {
360+ if (!s->isExplicitSpecialization ()) {
361361 llvm::PointerUnion<ClassTemplateDecl *,
362362 ClassTemplatePartialSpecializationDecl *>
363363 result = s->getSpecializedTemplateOrPartial ();
@@ -533,7 +533,8 @@ class IndexDataConsumer : public index::IndexDataConsumer {
533533 name.replace (i, short_name.size (), qualified);
534534 def.short_name_offset = i + qualified.size () - short_name.size ();
535535 }
536- def.short_name_size = short_name.size ();
536+ // name may be empty while short_name is not.
537+ def.short_name_size = name.empty () ? 0 : short_name.size ();
537538 for (int paren = 0 ; i; i--) {
538539 // Skip parentheses in "(anon struct)::name"
539540 if (name[i - 1 ] == ' )' )
You can’t perform that action at this time.
0 commit comments