@@ -48,6 +48,7 @@ class HeuristicResolverImpl {
4848 lookupDependentName (CXXRecordDecl *RD, DeclarationName Name,
4949 llvm::function_ref<bool (const NamedDecl *ND)> Filter);
5050 TagDecl *resolveTypeToTagDecl (QualType T);
51+ QualType simplifyType (QualType Type, const Expr *E, bool UnwrapPointer);
5152
5253private:
5354 ASTContext &Ctx;
@@ -73,15 +74,6 @@ class HeuristicResolverImpl {
7374 QualType resolveExprToType (const Expr *E);
7475 std::vector<const NamedDecl *> resolveExprToDecls (const Expr *E);
7576
76- // Helper function for simplifying a type.
77- // `Type` is the type to simplify.
78- // `E` is the expression whose type `Type` is, if known. This sometimes
79- // contains information relevant to the type that's not stored in `Type`
80- // itself.
81- // If `UnwrapPointer` is true, exactly only pointer type will be unwrapped
82- // during simplification, and the operation fails if no pointer type is found.
83- QualType simplifyType (QualType Type, const Expr *E, bool UnwrapPointer);
84-
8577 bool findOrdinaryMemberInDependentClasses (const CXXBaseSpecifier *Specifier,
8678 CXXBasePath &Path,
8779 DeclarationName Name);
@@ -537,5 +529,9 @@ const QualType HeuristicResolver::getPointeeType(QualType T) const {
537529TagDecl *HeuristicResolver::resolveTypeToTagDecl (QualType T) const {
538530 return HeuristicResolverImpl (Ctx).resolveTypeToTagDecl (T);
539531}
532+ QualType HeuristicResolver::simplifyType (QualType Type, const Expr *E,
533+ bool UnwrapPointer) {
534+ return HeuristicResolverImpl (Ctx).simplifyType (Type, E, UnwrapPointer);
535+ }
540536
541537} // namespace clang
0 commit comments