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 @@ -48,6 +48,7 @@ class HeuristicResolverImpl {
4848 std::vector<const NamedDecl *>
4949 lookupDependentName (CXXRecordDecl *RD, DeclarationName Name,
5050 llvm::function_ref<bool (const NamedDecl *ND)> Filter);
51+ TagDecl *resolveTypeToTagDecl (QualType T);
5152
5253private:
5354 ASTContext &Ctx;
@@ -73,11 +74,6 @@ class HeuristicResolverImpl {
7374 QualType resolveExprToType (const Expr *E);
7475 std::vector<const NamedDecl *> resolveExprToDecls (const Expr *E);
7576
76- // Helper function for HeuristicResolver::resolveDependentMember()
77- // which takes a possibly-dependent type `T` and heuristically
78- // resolves it to a TagDecl in which we can try name lookup.
79- TagDecl *resolveTypeToTagDecl (QualType T);
80-
8177 // Helper function for simplifying a type.
8278 // `Type` is the type to simplify.
8379 // `E` is the expression whose type `Type` is, if known. This sometimes
@@ -553,5 +549,8 @@ std::vector<const NamedDecl *> HeuristicResolver::lookupDependentName(
553549const QualType HeuristicResolver::getPointeeType (QualType T) const {
554550 return HeuristicResolverImpl (Ctx).getPointeeType (T);
555551}
552+ TagDecl *HeuristicResolver::resolveTypeToTagDecl (QualType T) const {
553+ return HeuristicResolverImpl (Ctx).resolveTypeToTagDecl (T);
554+ }
556555
557556} // namespace clang
You can’t perform that action at this time.
0 commit comments