]> granicus.if.org Git - clang/commitdiff
Add support for the cleanup attribute for C++; we don't have to copy
authorMike Stump <mrs@apple.com>
Wed, 9 Dec 2009 01:50:36 +0000 (01:50 +0000)
committerMike Stump <mrs@apple.com>
Wed, 9 Dec 2009 01:50:36 +0000 (01:50 +0000)
all of g++'s bugs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90924 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaDeclAttr.cpp

index 23dccdf62ecf5f50f6c2af7b2e1da1bcb834dd57..e219923f6dae207de163499e7a4cc6aae1411c50 100644 (file)
@@ -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;