@@ -49,6 +49,7 @@ class HeuristicResolverImpl {
4949 lookupDependentName (CXXRecordDecl *RD, DeclarationName Name,
5050 llvm::function_ref<bool (const NamedDecl *ND)> Filter);
5151 TagDecl *resolveTypeToTagDecl (QualType T);
52+ QualType simplifyType (QualType Type, const Expr *E, bool UnwrapPointer);
5253
5354private:
5455 ASTContext &Ctx;
@@ -74,15 +75,6 @@ class HeuristicResolverImpl {
7475 QualType resolveExprToType (const Expr *E);
7576 std::vector<const NamedDecl *> resolveExprToDecls (const Expr *E);
7677
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-
8678 bool findOrdinaryMemberInDependentClasses (const CXXBaseSpecifier *Specifier,
8779 CXXBasePath &Path,
8880 DeclarationName Name);
@@ -552,5 +544,9 @@ const QualType HeuristicResolver::getPointeeType(QualType T) const {
552544TagDecl *HeuristicResolver::resolveTypeToTagDecl (QualType T) const {
553545 return HeuristicResolverImpl (Ctx).resolveTypeToTagDecl (T);
554546}
547+ QualType HeuristicResolver::simplifyType (QualType Type, const Expr *E,
548+ bool UnwrapPointer) {
549+ return HeuristicResolverImpl (Ctx).simplifyType (Type, E, UnwrapPointer);
550+ }
555551
556552} // namespace clang
0 commit comments