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 {
81
81
// could look up the name appearing on the RHS.
82
82
const QualType getPointeeType (QualType T) const ;
83
83
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
+
84
88
private:
85
89
ASTContext &Ctx;
86
90
};
Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ class HeuristicResolverImpl {
48
48
std::vector<const NamedDecl *>
49
49
lookupDependentName (CXXRecordDecl *RD, DeclarationName Name,
50
50
llvm::function_ref<bool (const NamedDecl *ND)> Filter);
51
+ TagDecl *resolveTypeToTagDecl (QualType T);
51
52
52
53
private:
53
54
ASTContext &Ctx;
@@ -73,11 +74,6 @@ class HeuristicResolverImpl {
73
74
QualType resolveExprToType (const Expr *E);
74
75
std::vector<const NamedDecl *> resolveExprToDecls (const Expr *E);
75
76
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
-
81
77
// Helper function for simplifying a type.
82
78
// `Type` is the type to simplify.
83
79
// `E` is the expression whose type `Type` is, if known. This sometimes
@@ -553,5 +549,8 @@ std::vector<const NamedDecl *> HeuristicResolver::lookupDependentName(
553
549
const QualType HeuristicResolver::getPointeeType (QualType T) const {
554
550
return HeuristicResolverImpl (Ctx).getPointeeType (T);
555
551
}
552
+ TagDecl *HeuristicResolver::resolveTypeToTagDecl (QualType T) const {
553
+ return HeuristicResolverImpl (Ctx).resolveTypeToTagDecl (T);
554
+ }
556
555
557
556
} // namespace clang
You can’t perform that action at this time.
0 commit comments