summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2009-04-26 01:30:08 +0000
committerEli Friedman <eli.friedman@gmail.com>2009-04-26 01:30:08 +0000
commitbd0e67362c14ba8d1bc482a19dc0620b21c7e443 (patch)
tree2f01f2a1b46eef1b7a09fcc63e7710971aa28262 /clang/lib/Sema
parent885db546711d269e5bdbcb7ba27dbf44712508d8 (diff)
downloadbcm5719-llvm-bd0e67362c14ba8d1bc482a19dc0620b21c7e443.tar.gz
bcm5719-llvm-bd0e67362c14ba8d1bc482a19dc0620b21c7e443.zip
Correct the order of the parameters to CheckAssignmentConstraints in
cleanup attribute checking. The difference isn't normally visible, but it can make a difference... llvm-svn: 70104
Diffstat (limited to 'clang/lib/Sema')
-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 8843d92c5ca..c0a3b44c43e 100644
--- a/clang/lib/Sema/SemaDeclAttr.cpp
+++ b/clang/lib/Sema/SemaDeclAttr.cpp
@@ -1013,7 +1013,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 (S.CheckAssignmentConstraints(Ty, ParamTy) != Sema::Compatible) {
+ if (S.CheckAssignmentConstraints(ParamTy, Ty) != Sema::Compatible) {
S.Diag(Attr.getLoc(),
diag::err_attribute_cleanup_func_arg_incompatible_type) <<
Attr.getParameterName() << ParamTy << Ty;
OpenPOWER on IntegriCloud