From: Mike Stump Date: Wed, 9 Dec 2009 01:50:36 +0000 (+0000) Subject: Add support for the cleanup attribute for C++; we don't have to copy X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b89192151e3bda48d7cfb41ff61842d9cd06fc82;p=clang Add support for the cleanup attribute for C++; we don't have to copy all of g++'s bugs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90924 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Sema/SemaDeclAttr.cpp b/lib/Sema/SemaDeclAttr.cpp index 23dccdf62e..e219923f6d 100644 --- a/lib/Sema/SemaDeclAttr.cpp +++ b/lib/Sema/SemaDeclAttr.cpp @@ -1058,10 +1058,6 @@ static void HandlePureAttr(Decl *d, const AttributeList &Attr, Sema &S) { } static void HandleCleanupAttr(Decl *d, const AttributeList &Attr, Sema &S) { - // Match gcc which ignores cleanup attrs when compiling C++. - if (S.getLangOptions().CPlusPlus) - return; - if (!Attr.getParameterName()) { S.Diag(Attr.getLoc(), diag::err_attribute_wrong_number_arguments) << 1; return;