diff options
author | John McCall <rjmccall@apple.com> | 2011-01-19 06:33:43 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2011-01-19 06:33:43 +0000 |
commit | f4c7371fb1d3cebcfb40abad4537bb82515704ea (patch) | |
tree | 1ef9169970f5c94e0694b1b1b1c6d9acffc96c74 /lib/Sema/SemaOverload.cpp | |
parent | f7e22d86167a9fbb42c5ab5b349a34d123a2e2b5 (diff) |
Change QualType::getTypePtr() to return a const pointer, then change a
thousand other things which were (generally inadvertantly) relying on that.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123814 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaOverload.cpp')
-rw-r--r-- | lib/Sema/SemaOverload.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Sema/SemaOverload.cpp b/lib/Sema/SemaOverload.cpp index 4bb95912e6..06a34c22c5 100644 --- a/lib/Sema/SemaOverload.cpp +++ b/lib/Sema/SemaOverload.cpp @@ -647,8 +647,8 @@ bool Sema::IsOverload(FunctionDecl *New, FunctionDecl *Old, isa<FunctionNoProtoType>(NewQType.getTypePtr())) return false; - FunctionProtoType* OldType = cast<FunctionProtoType>(OldQType); - FunctionProtoType* NewType = cast<FunctionProtoType>(NewQType); + const FunctionProtoType* OldType = cast<FunctionProtoType>(OldQType); + const FunctionProtoType* NewType = cast<FunctionProtoType>(NewQType); // The signature of a function includes the types of its // parameters (C++ 1.3.10), which includes the presence or absence @@ -1012,7 +1012,7 @@ static bool IsStandardConversion(Sema &S, Expr* From, QualType ToType, FromType = Fn->getType(); if (CXXMethodDecl *Method = dyn_cast<CXXMethodDecl>(Fn)) { if (!Method->isStatic()) { - Type *ClassType + const Type *ClassType = S.Context.getTypeDeclType(Method->getParent()).getTypePtr(); FromType = S.Context.getMemberPointerType(FromType, ClassType); } @@ -1760,8 +1760,8 @@ bool Sema::isObjCPointerConversion(QualType FromType, QualType ToType, /// for equlity of their argument types. Caller has already checked that /// they have same number of arguments. This routine assumes that Objective-C /// pointer types which only differ in their protocol qualifiers are equal. -bool Sema::FunctionArgTypesAreEqual(FunctionProtoType* OldType, - FunctionProtoType* NewType){ +bool Sema::FunctionArgTypesAreEqual(const FunctionProtoType *OldType, + const FunctionProtoType *NewType) { if (!getLangOptions().ObjC1) return std::equal(OldType->arg_type_begin(), OldType->arg_type_end(), NewType->arg_type_begin()); |