@@ -49,6 +49,7 @@ class HeuristicResolverImpl {
49
49
lookupDependentName (CXXRecordDecl *RD, DeclarationName Name,
50
50
llvm::function_ref<bool (const NamedDecl *ND)> Filter);
51
51
TagDecl *resolveTypeToTagDecl (QualType T);
52
+ QualType simplifyType (QualType Type, const Expr *E, bool UnwrapPointer);
52
53
53
54
private:
54
55
ASTContext &Ctx;
@@ -74,15 +75,6 @@ class HeuristicResolverImpl {
74
75
QualType resolveExprToType (const Expr *E);
75
76
std::vector<const NamedDecl *> resolveExprToDecls (const Expr *E);
76
77
77
- // Helper function for simplifying a type.
78
- // `Type` is the type to simplify.
79
- // `E` is the expression whose type `Type` is, if known. This sometimes
80
- // contains information relevant to the type that's not stored in `Type`
81
- // itself.
82
- // If `UnwrapPointer` is true, exactly only pointer type will be unwrapped
83
- // during simplification, and the operation fails if no pointer type is found.
84
- QualType simplifyType (QualType Type, const Expr *E, bool UnwrapPointer);
85
-
86
78
bool findOrdinaryMemberInDependentClasses (const CXXBaseSpecifier *Specifier,
87
79
CXXBasePath &Path,
88
80
DeclarationName Name);
@@ -552,5 +544,9 @@ const QualType HeuristicResolver::getPointeeType(QualType T) const {
552
544
TagDecl *HeuristicResolver::resolveTypeToTagDecl (QualType T) const {
553
545
return HeuristicResolverImpl (Ctx).resolveTypeToTagDecl (T);
554
546
}
547
+ QualType HeuristicResolver::simplifyType (QualType Type, const Expr *E,
548
+ bool UnwrapPointer) {
549
+ return HeuristicResolverImpl (Ctx).simplifyType (Type, E, UnwrapPointer);
550
+ }
555
551
556
552
} // namespace clang
0 commit comments