aboutsummaryrefslogtreecommitdiff
path: root/lib
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
commitd5e3e8ec50d6ea481b3bc841dcbe853175d05122 (patch)
treefa795f5bdbed8c14db0588fc1f09a0095ad4fe85 /lib
parent259a565e3c89435863d9f2fdf47f49805793f4d0 (diff)
Correct the order of the parameters to CheckAssignmentConstraints in
cleanup attribute checking. The difference isn't normally visible, but it can make a difference... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70104 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Sema/SemaDeclAttr.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaDeclAttr.cpp b/lib/Sema/SemaDeclAttr.cpp
index 8843d92c5c..c0a3b44c43 100644
--- a/lib/Sema/SemaDeclAttr.cpp
+++ b/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;