Allow the first parameter of operator new to be a cv-qualified
size_t. Also, fix an issue with initialization of parameters in calls,
where we weren't removing the cv-qualifiers on the parameter type
itself. Fixes PR5823.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91941 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaInit.h b/lib/Sema/SemaInit.h
index 959c55e..5eb819a 100644
--- a/lib/Sema/SemaInit.h
+++ b/lib/Sema/SemaInit.h
@@ -102,7 +102,7 @@
   
   /// \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