Skip to content

Commit 148a7f9

Browse files
author
git apple-llvm automerger
committed
Merge commit 'db70369f400e' from llvm.org/release/21.x into stable/21.x
2 parents 790d24e + db70369 commit 148a7f9

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

clang/lib/Sema/SemaExprCXX.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,8 @@ ParsedType Sema::getDestructorName(const IdentifierInfo &II,
347347
CheckTypenameType(ElaboratedTypeKeyword::None, SourceLocation(),
348348
SS.getWithLocInContext(Context), II, NameLoc, &TSI,
349349
/*DeducedTSTContext=*/true);
350+
if (T.isNull())
351+
return ParsedType();
350352
return CreateParsedType(T, TSI);
351353
}
352354

clang/test/SemaTemplate/destructor-template.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,3 +104,18 @@ struct T : S {
104104
~T() = default;
105105
};
106106
} // namespace PR38671
107+
108+
namespace GH159630 {
109+
110+
struct X {
111+
template<typename T>
112+
struct typo { // expected-note {{'typo' declared here}}
113+
~typo();
114+
};
115+
};
116+
117+
template<typename T>
118+
X::typo<T>::typ0::~typ0() {} // expected-error {{no member named 'typ0'}} \
119+
// expected-error {{no type named 'typ0'}}
120+
121+
}

0 commit comments

Comments
 (0)