summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-02-25 17:19:08 +0000
committerAnders Carlsson <andersca@mac.com>2009-02-25 17:19:08 +0000
commitf2f2e7f6a127f4559cbc6e17c6187a1abbeb0d82 (patch)
treeadce4726c36392b5e0e3c6dc561531e6473b7df7 /clang/lib
parent739ef0c183fa9031f82494d9df56170f3254e5b0 (diff)
downloadbcm5719-llvm-f2f2e7f6a127f4559cbc6e17c6187a1abbeb0d82.tar.gz
bcm5719-llvm-f2f2e7f6a127f4559cbc6e17c6187a1abbeb0d82.zip
Use CheckAssignmentConstraints for checking the cleanup attr function. Fixes PR3656.
llvm-svn: 65461
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Sema/SemaDeclAttr.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaDeclAttr.cpp b/clang/lib/Sema/SemaDeclAttr.cpp
index ce38edd7c5f..fb8b795af22 100644
--- a/clang/lib/Sema/SemaDeclAttr.cpp
+++ b/clang/lib/Sema/SemaDeclAttr.cpp
@@ -955,7 +955,7 @@ static void HandleCleanupAttr(Decl *d, const AttributeList &Attr, Sema &S) {
// If this ever proves to be a problem it should be easy to fix.
QualType Ty = S.Context.getPointerType(VD->getType());
QualType ParamTy = FD->getParamDecl(0)->getType();
- if (Ty != ParamTy) {
+ if (S.CheckAssignmentConstraints(Ty, ParamTy) != Sema::Compatible) {
S.Diag(Attr.getLoc(),
diag::err_attribute_cleanup_func_arg_incompatible_type) <<
Attr.getParameterName() << ParamTy << Ty;
OpenPOWER on IntegriCloud