@@ -48,6 +48,7 @@ class HeuristicResolverImpl {
48
48
lookupDependentName (CXXRecordDecl *RD, DeclarationName Name,
49
49
llvm::function_ref<bool (const NamedDecl *ND)> Filter);
50
50
TagDecl *resolveTypeToTagDecl (QualType T);
51
+ QualType simplifyType (QualType Type, const Expr *E, bool UnwrapPointer);
51
52
52
53
private:
53
54
ASTContext &Ctx;
@@ -73,15 +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 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
-
85
77
bool findOrdinaryMemberInDependentClasses (const CXXBaseSpecifier *Specifier,
86
78
CXXBasePath &Path,
87
79
DeclarationName Name);
@@ -537,5 +529,9 @@ const QualType HeuristicResolver::getPointeeType(QualType T) const {
537
529
TagDecl *HeuristicResolver::resolveTypeToTagDecl (QualType T) const {
538
530
return HeuristicResolverImpl (Ctx).resolveTypeToTagDecl (T);
539
531
}
532
+ QualType HeuristicResolver::simplifyType (QualType Type, const Expr *E,
533
+ bool UnwrapPointer) {
534
+ return HeuristicResolverImpl (Ctx).simplifyType (Type, E, UnwrapPointer);
535
+ }
540
536
541
537
} // namespace clang
0 commit comments