From 30c93dba5bb24637aa49b9222394d8aca7c88263 Mon Sep 17 00:00:00 2001 From: Akira Hatanaka Date: Wed, 20 Sep 2017 06:55:43 +0000 Subject: Revert "Add support for attribute 'noescape'." This reverts commit r313722. It looks like compiler-rt/lib/tsan/rtl/tsan_libdispatch_mac.cc cannot be compiled because some of the functions declared in the file do not match the ones in the SDK headers (which are annotated with 'noescape'). llvm-svn: 313725 --- clang/lib/Sema/SemaDeclAttr.cpp | 19 ------------------- 1 file changed, 19 deletions(-) (limited to 'clang/lib/Sema/SemaDeclAttr.cpp') diff --git a/clang/lib/Sema/SemaDeclAttr.cpp b/clang/lib/Sema/SemaDeclAttr.cpp index cffb860638d..b8432ebd53b 100644 --- a/clang/lib/Sema/SemaDeclAttr.cpp +++ b/clang/lib/Sema/SemaDeclAttr.cpp @@ -1531,22 +1531,6 @@ static void handleReturnsNonNullAttr(Sema &S, Decl *D, Attr.getAttributeSpellingListIndex())); } -static void handleNoEscapeAttr(Sema &S, Decl *D, const AttributeList &Attr) { - if (D->isInvalidDecl()) - return; - - // noescape only applies to pointer types. - QualType T = cast(D)->getType(); - if (!S.isValidPointerAttrType(T, /* RefOkay */ true)) { - S.Diag(Attr.getLoc(), diag::warn_attribute_pointers_only) - << Attr.getName() << Attr.getRange() << 0; - return; - } - - D->addAttr(::new (S.Context) NoEscapeAttr( - Attr.getRange(), S.Context, Attr.getAttributeSpellingListIndex())); -} - static void handleAssumeAlignedAttr(Sema &S, Decl *D, const AttributeList &Attr) { Expr *E = Attr.getArgAsExpr(0), @@ -6183,9 +6167,6 @@ static void ProcessDeclAttribute(Sema &S, Scope *scope, Decl *D, case AttributeList::AT_ReturnsNonNull: handleReturnsNonNullAttr(S, D, Attr); break; - case AttributeList::AT_NoEscape: - handleNoEscapeAttr(S, D, Attr); - break; case AttributeList::AT_AssumeAligned: handleAssumeAlignedAttr(S, D, Attr); break; -- cgit v1.2.3