Skip to content

[clang] fix DependentNameType -> UnresolvedUsingType transforms #153862

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion clang/lib/Sema/TreeTransform.h
Original file line number Diff line number Diff line change
Expand Up @@ -7668,8 +7668,11 @@ QualType TreeTransform<Derived>::TransformDependentNameType(
} else if (isa<TypedefType>(Result)) {
TLB.push<TypedefTypeLoc>(Result).set(TL.getElaboratedKeywordLoc(),
QualifierLoc, TL.getNameLoc());
} else if (isa<UnresolvedUsingType>(Result)) {
auto NewTL = TLB.push<UnresolvedUsingTypeLoc>(Result);
NewTL.set(TL.getElaboratedKeywordLoc(), QualifierLoc, TL.getNameLoc());
} else {
DependentNameTypeLoc NewTL = TLB.push<DependentNameTypeLoc>(Result);
auto NewTL = TLB.push<DependentNameTypeLoc>(Result);
NewTL.setElaboratedKeywordLoc(TL.getElaboratedKeywordLoc());
NewTL.setQualifierLoc(QualifierLoc);
NewTL.setNameLoc(TL.getNameLoc());
Expand Down
8 changes: 8 additions & 0 deletions clang/test/SemaCXX/using-decl-templates.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,3 +153,11 @@ T foo(T t) { // OK
}
} // namespace sss
} // namespace func_templ

namespace DependentName {
template <typename T> struct S {
using typename T::Ty;
static Ty Val;
};
template <typename T> typename S<T>::Ty S<T>::Val;
} // DependentName