File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -81,6 +81,10 @@ class HeuristicResolver {
8181 // could look up the name appearing on the RHS.
8282 const QualType getPointeeType (QualType T) const ;
8383
84+ // Heuristically resolve a possibly-dependent type `T` to a TagDecl
85+ // in which a member's name can be looked up.
86+ TagDecl *resolveTypeToTagDecl (QualType T) const ;
87+
8488private:
8589 ASTContext &Ctx;
8690};
Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ class HeuristicResolverImpl {
4747 std::vector<const NamedDecl *>
4848 lookupDependentName (CXXRecordDecl *RD, DeclarationName Name,
4949 llvm::function_ref<bool (const NamedDecl *ND)> Filter);
50+ TagDecl *resolveTypeToTagDecl (QualType T);
5051
5152private:
5253 ASTContext &Ctx;
@@ -72,11 +73,6 @@ class HeuristicResolverImpl {
7273 QualType resolveExprToType (const Expr *E);
7374 std::vector<const NamedDecl *> resolveExprToDecls (const Expr *E);
7475
75- // Helper function for HeuristicResolver::resolveDependentMember()
76- // which takes a possibly-dependent type `T` and heuristically
77- // resolves it to a TagDecl in which we can try name lookup.
78- TagDecl *resolveTypeToTagDecl (QualType T);
79-
8076 // Helper function for simplifying a type.
8177 // `Type` is the type to simplify.
8278 // `E` is the expression whose type `Type` is, if known. This sometimes
@@ -538,5 +534,8 @@ std::vector<const NamedDecl *> HeuristicResolver::lookupDependentName(
538534const QualType HeuristicResolver::getPointeeType (QualType T) const {
539535 return HeuristicResolverImpl (Ctx).getPointeeType (T);
540536}
537+ TagDecl *HeuristicResolver::resolveTypeToTagDecl (QualType T) const {
538+ return HeuristicResolverImpl (Ctx).resolveTypeToTagDecl (T);
539+ }
541540
542541} // namespace clang
You can’t perform that action at this time.
0 commit comments