File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -6283,21 +6283,22 @@ inline ASTContext &TypeBase::getASTContext() {
6283
6283
}
6284
6284
6285
6285
inline bool TypeBase::isTypeVariableOrMember () {
6286
- if (is<TypeVariableType>())
6287
- return true ;
6286
+ Type t (this );
6288
6287
6289
- if (auto depMemTy = getAs<DependentMemberType>())
6290
- return depMemTy ->getBase ()-> isTypeVariableOrMember ();
6288
+ while (auto *memberTy = t-> getAs <DependentMemberType>())
6289
+ t = memberTy ->getBase ();
6291
6290
6292
- return false ;
6291
+ return t-> is <TypeVariableType>() ;
6293
6292
}
6294
6293
6295
6294
inline bool TypeBase::isTypeParameter () {
6296
- if (is<GenericTypeParamType>())
6297
- return true ;
6295
+ Type t (this );
6298
6296
6299
- if (auto depMemTy = getAs<DependentMemberType>())
6300
- return depMemTy->getBase ()->isTypeParameter ();
6297
+ while (auto *memberTy = t->getAs <DependentMemberType>())
6298
+ t = memberTy->getBase ();
6299
+
6300
+ return t->is <GenericTypeParamType>();
6301
+ }
6301
6302
6302
6303
return false ;
6303
6304
}
You can’t perform that action at this time.
0 commit comments