Drop uses of getAsPointerLikeType.
- No functionality change. llvm-svn: 65563
This commit is contained in:
parent
de68001e76
commit
b566c6c758
|
@ -3519,8 +3519,10 @@ Sema::ResolveAddressOfOverloadedFunction(Expr *From, QualType ToType,
|
|||
bool Complain) {
|
||||
QualType FunctionType = ToType;
|
||||
bool IsMember = false;
|
||||
if (const PointerLikeType *ToTypePtr = ToType->getAsPointerLikeType())
|
||||
if (const PointerType *ToTypePtr = ToType->getAsPointerType())
|
||||
FunctionType = ToTypePtr->getPointeeType();
|
||||
else if (const ReferenceType *ToTypeRef = ToType->getAsReferenceType())
|
||||
FunctionType = ToTypeRef->getPointeeType();
|
||||
else if (const MemberPointerType *MemTypePtr =
|
||||
ToType->getAsMemberPointerType()) {
|
||||
FunctionType = MemTypePtr->getPointeeType();
|
||||
|
|
|
@ -201,8 +201,10 @@ QualType Sema::ConvertDeclSpecToType(const DeclSpec &DS) {
|
|||
// or incomplete types shall not be restrict-qualified." C++ also allows
|
||||
// restrict-qualified references.
|
||||
if (TypeQuals & QualType::Restrict) {
|
||||
if (const PointerLikeType *PT = Result->getAsPointerLikeType()) {
|
||||
QualType EltTy = PT->getPointeeType();
|
||||
if (Result->isPointerType() || Result->isReferenceType()) {
|
||||
QualType EltTy = Result->isPointerType() ?
|
||||
Result->getAsPointerType()->getPointeeType() :
|
||||
Result->getAsReferenceType()->getPointeeType();
|
||||
|
||||
// If we have a pointer or reference, the pointee must have an object or
|
||||
// incomplete type.
|
||||
|
|
Loading…
Reference in New Issue