diff options
author | Krystian Stasiowski <sdkrystian@gmail.com> | 2024-08-06 12:40:44 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-06 12:40:44 -0400 |
commit | 55ea36002bd364518c20b3ce282640c920697bf7 (patch) | |
tree | 6568006f4e746aabdcb6a494c67ccc7fcee47240 /clang/lib/Sema/SemaDecl.cpp | |
parent | b7cd564fa3ecc2a9ed0fded98c24f68e2dad63ad (diff) | |
download | llvm-55ea36002bd364518c20b3ce282640c920697bf7.zip llvm-55ea36002bd364518c20b3ce282640c920697bf7.tar.gz llvm-55ea36002bd364518c20b3ce282640c920697bf7.tar.bz2 |
[Clang][Sema] Make UnresolvedLookupExprs in class scope explicit specializations instantiation dependent (#100392)
A class member named by an expression in a member function that may instantiate to a static _or_ non-static member is represented by a `UnresolvedLookupExpr` in order to defer the implicit transformation to a class member access expression until instantiation. Since `ASTContext::getDecltypeType` only creates a `DecltypeType` that has a `DependentDecltypeType` as its canonical type when the operand is instantiation dependent, and since we do not transform types unless they are instantiation dependent, we need to mark the `UnresolvedLookupExpr` as instantiation dependent in order to correctly build a `DecltypeType` using the expression as its operand with a `DependentDecltypeType` canonical type. Fixes #99873.
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r-- | clang/lib/Sema/SemaDecl.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index bab32b9..1da16d6 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -1219,7 +1219,7 @@ Corrected: return NameClassification::OverloadSet(UnresolvedLookupExpr::Create( Context, Result.getNamingClass(), SS.getWithLocInContext(Context), Result.getLookupNameInfo(), ADL, Result.begin(), Result.end(), - /*KnownDependent=*/false)); + /*KnownDependent=*/false, /*KnownInstantiationDependent=*/false)); } ExprResult |