summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDeclCXX.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-12-22 23:42:49 +0000
committerDouglas Gregor <dgregor@apple.com>2009-12-22 23:42:49 +0000
commit684d7bdc43fdbb0ed39acd238df46ca48441c32f (patch)
treed3b4bdfe587fa0efda0cc688c5f853914b523ba8 /clang/lib/Sema/SemaDeclCXX.cpp
parentc7a67b78773f64f12bc332882cb4220ea61ff778 (diff)
downloadbcm5719-llvm-684d7bdc43fdbb0ed39acd238df46ca48441c32f.tar.gz
bcm5719-llvm-684d7bdc43fdbb0ed39acd238df46ca48441c32f.zip
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. llvm-svn: 91941
Diffstat (limited to 'clang/lib/Sema/SemaDeclCXX.cpp')
-rw-r--r--clang/lib/Sema/SemaDeclCXX.cpp2
1 files changed, 1 insertions, 1 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;
OpenPOWER on IntegriCloud