File tree 1 file changed +3
-2
lines changed
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) {
357
357
while (d) {
358
358
if (auto *r = dyn_cast<CXXRecordDecl>(d)) {
359
359
if (auto *s = dyn_cast<ClassTemplateSpecializationDecl>(r)) {
360
- if (!s->getTypeAsWritten ()) {
360
+ if (!s->isExplicitSpecialization ()) {
361
361
llvm::PointerUnion<ClassTemplateDecl *,
362
362
ClassTemplatePartialSpecializationDecl *>
363
363
result = s->getSpecializedTemplateOrPartial ();
@@ -533,7 +533,8 @@ class IndexDataConsumer : public index::IndexDataConsumer {
533
533
name.replace (i, short_name.size (), qualified);
534
534
def.short_name_offset = i + qualified.size () - short_name.size ();
535
535
}
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 ();
537
538
for (int paren = 0 ; i; i--) {
538
539
// Skip parentheses in "(anon struct)::name"
539
540
if (name[i - 1 ] == ' )' )
You can’t perform that action at this time.
0 commit comments