Fix overloading of non-static member functions that differ in their cv-qualifiers
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59819 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaOverload.cpp b/lib/Sema/SemaOverload.cpp
index 0a77371..eb38eee 100644
--- a/lib/Sema/SemaOverload.cpp
+++ b/lib/Sema/SemaOverload.cpp
@@ -326,7 +326,7 @@
CXXMethodDecl* NewMethod = dyn_cast<CXXMethodDecl>(New);
if (OldMethod && NewMethod &&
!OldMethod->isStatic() && !NewMethod->isStatic() &&
- OldQType.getCVRQualifiers() != NewQType.getCVRQualifiers())
+ OldMethod->getTypeQualifiers() != NewMethod->getTypeQualifiers())
return true;
// The signatures match; this is not an overload.