diff options
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/Sema/SemaDeclCXX.cpp | 2 | ||||
-rw-r--r-- | clang/lib/Sema/SemaExprCXX.cpp | 3 | ||||
-rw-r--r-- | clang/lib/Sema/SemaInit.h | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp index 9e30af8f187..ded89b453c9 100644 --- a/clang/lib/Sema/SemaDeclCXX.cpp +++ b/clang/lib/Sema/SemaDeclCXX.cpp @@ -4707,7 +4707,7 @@ CheckOperatorNewDeleteTypes(Sema &SemaRef, const FunctionDecl *FnDecl, << FnDecl->getDeclName() << ExpectedFirstParamType; // Check that the first parameter type is what we expect. - if (SemaRef.Context.getCanonicalType(FirstParamType) != + if (SemaRef.Context.getCanonicalType(FirstParamType).getUnqualifiedType() != ExpectedFirstParamType) return SemaRef.Diag(FnDecl->getLocation(), InvalidParamTypeDiag) << FnDecl->getDeclName() << ExpectedFirstParamType; diff --git a/clang/lib/Sema/SemaExprCXX.cpp b/clang/lib/Sema/SemaExprCXX.cpp index dd3d2ea2ce4..45ee4fd64e7 100644 --- a/clang/lib/Sema/SemaExprCXX.cpp +++ b/clang/lib/Sema/SemaExprCXX.cpp @@ -737,7 +737,8 @@ void Sema::DeclareGlobalAllocationFunction(DeclarationName Name, // FIXME: Do we need to check for default arguments here? FunctionDecl *Func = cast<FunctionDecl>(*Alloc); if (Func->getNumParams() == 1 && - Context.getCanonicalType(Func->getParamDecl(0)->getType())==Argument) + Context.getCanonicalType( + Func->getParamDecl(0)->getType().getUnqualifiedType()) == Argument) return; } } diff --git a/clang/lib/Sema/SemaInit.h b/clang/lib/Sema/SemaInit.h index 959c55e3d32..5eb819a6917 100644 --- a/clang/lib/Sema/SemaInit.h +++ b/clang/lib/Sema/SemaInit.h @@ -102,7 +102,7 @@ private: /// \brief Create the initialization entity for a parameter. InitializedEntity(ParmVarDecl *Parm) - : Kind(EK_Parameter), Parent(0), Type(Parm->getType()), + : Kind(EK_Parameter), Parent(0), Type(Parm->getType().getUnqualifiedType()), VariableOrMember(reinterpret_cast<DeclaratorDecl*>(Parm)) { } /// \brief Create the initialization entity for the result of a |