[cfe-commits] r110294 - in /cfe/trunk: lib/Sema/SemaDeclCXX.cpp test/SemaCXX/new-delete.cpp
Sebastian Redl
sebastian.redl at getdesigned.at
Wed Aug 4 17:45:34 PDT 2010
Author: cornedbee
Date: Wed Aug 4 19:45:34 2010
New Revision: 110294
URL: http://llvm.org/viewvc/llvm-project?rev=110294&view=rev
Log:
Remove a redundant and broken check. Fixes PR7810.
Modified:
cfe/trunk/lib/Sema/SemaDeclCXX.cpp
cfe/trunk/test/SemaCXX/new-delete.cpp
Modified: cfe/trunk/lib/Sema/SemaDeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclCXX.cpp?rev=110294&r1=110293&r2=110294&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclCXX.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclCXX.cpp Wed Aug 4 19:45:34 2010
@@ -5627,18 +5627,6 @@
diag::err_operator_delete_param_type))
return true;
- QualType FirstParamType = FnDecl->getParamDecl(0)->getType();
- if (FirstParamType->isDependentType())
- return SemaRef.Diag(FnDecl->getLocation(),
- diag::err_operator_delete_dependent_param_type)
- << FnDecl->getDeclName() << SemaRef.Context.VoidPtrTy;
-
- if (SemaRef.Context.getCanonicalType(FirstParamType) !=
- SemaRef.Context.VoidPtrTy)
- return SemaRef.Diag(FnDecl->getLocation(),
- diag::err_operator_delete_param_type)
- << FnDecl->getDeclName() << SemaRef.Context.VoidPtrTy;
-
return false;
}
Modified: cfe/trunk/test/SemaCXX/new-delete.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/new-delete.cpp?rev=110294&r1=110293&r2=110294&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/new-delete.cpp (original)
+++ cfe/trunk/test/SemaCXX/new-delete.cpp Wed Aug 4 19:45:34 2010
@@ -321,3 +321,14 @@
delete xi;
}
}
+
+namespace PR7810 {
+ struct X {
+ // cv is ignored in arguments
+ static void operator delete(void *const);
+ };
+ struct Y {
+ // cv is ignored in arguments
+ static void operator delete(void *volatile);
+ };
+}
More information about the cfe-commits
mailing list