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 @@ -47,6 +47,7 @@ class HeuristicResolverImpl {
47
47
std::vector<const NamedDecl *>
48
48
lookupDependentName (CXXRecordDecl *RD, DeclarationName Name,
49
49
llvm::function_ref<bool (const NamedDecl *ND)> Filter);
50
+ TagDecl *resolveTypeToTagDecl (QualType T);
50
51
51
52
private:
52
53
ASTContext &Ctx;
@@ -72,11 +73,6 @@ class HeuristicResolverImpl {
72
73
QualType resolveExprToType (const Expr *E);
73
74
std::vector<const NamedDecl *> resolveExprToDecls (const Expr *E);
74
75
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
-
80
76
// Helper function for simplifying a type.
81
77
// `Type` is the type to simplify.
82
78
// `E` is the expression whose type `Type` is, if known. This sometimes
@@ -538,5 +534,8 @@ std::vector<const NamedDecl *> HeuristicResolver::lookupDependentName(
538
534
const QualType HeuristicResolver::getPointeeType (QualType T) const {
539
535
return HeuristicResolverImpl (Ctx).getPointeeType (T);
540
536
}
537
+ TagDecl *HeuristicResolver::resolveTypeToTagDecl (QualType T) const {
538
+ return HeuristicResolverImpl (Ctx).resolveTypeToTagDecl (T);
539
+ }
541
540
542
541
} // namespace clang
You can’t perform that action at this time.
0 commit comments