================
@@ -7061,8 +7061,15 @@ NamedDecl *Sema::FindInstantiatedDecl(SourceLocation
Loc, NamedDecl *D,
// anonymous unions in class templates).
}
- if (!ParentDependsOnArgs)
+ if (!ParentDependsOnArgs) {
+ if (auto Found =
+ CurrentInstantiationScope
+ ? CurrentInstantiationScope->getInstantiationOfIfExists(D)
+ : nullptr) {
+ return cast<NamedDecl>(Found->dyn_cast<Decl *>());
----------------
ojhunt wrote:
`cast_or_null` would be appropriate
https://github.com/llvm/llvm-project/pull/165098
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits