-
Notifications
You must be signed in to change notification settings - Fork 14.8k
[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
Conversation
This fixes a regression reported here #147835 (comment) Since this regression was never released, there are no release notes.
@llvm/pr-subscribers-clang Author: Matheus Izvekov (mizvekov) ChangesThis fixes a regression reported here #147835 (comment) Since this regression was never released, there are no release notes. Full diff: https://github.com/llvm/llvm-project/pull/153862.diff 2 Files Affected:
diff --git a/clang/lib/Sema/TreeTransform.h b/clang/lib/Sema/TreeTransform.h
index 1863e7f97e3f1..055d3cd1a8609 100644
--- a/clang/lib/Sema/TreeTransform.h
+++ b/clang/lib/Sema/TreeTransform.h
@@ -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());
diff --git a/clang/test/SemaCXX/using-decl-templates.cpp b/clang/test/SemaCXX/using-decl-templates.cpp
index c96c4879cb68c..58b30595b148c 100644
--- a/clang/test/SemaCXX/using-decl-templates.cpp
+++ b/clang/test/SemaCXX/using-decl-templates.cpp
@@ -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
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/59/builds/22695 Here is the relevant piece of the build log for the reference
|
This fixes a regression reported here #147835 (comment)
Since this regression was never released, there are no release notes.