[PATCH] D32210: [Sema][ObjC] Add support for attribute "noescape"

Akira Hatanaka via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 4 13:41:47 PDT 2017


ahatanak updated this revision to Diff 109814.
ahatanak added a comment.

Include noescape attribute information in the function prototype and modify the AST printer and name mangling accordingly.

Also, make changes to allow implicit conversion from a function that takes noescape parameters to a function that doesn't. For example:

void (*fnptr0)(int *) = &noescapefunc; // valid conversion.
void (*fnptr1)(__attribute__((noescape)) int *) = &escapefunc; // invalid conversion.


https://reviews.llvm.org/D32210

Files:
  include/clang/AST/Type.h
  include/clang/Basic/Attr.td
  include/clang/Basic/AttrDocs.td
  include/clang/Basic/DiagnosticSemaKinds.td
  include/clang/Sema/Sema.h
  lib/AST/ItaniumMangle.cpp
  lib/AST/TypePrinter.cpp
  lib/CodeGen/CGCall.cpp
  lib/Sema/SemaDeclAttr.cpp
  lib/Sema/SemaDeclCXX.cpp
  lib/Sema/SemaDeclObjC.cpp
  lib/Sema/SemaExpr.cpp
  lib/Sema/SemaOverload.cpp
  lib/Sema/SemaTemplate.cpp
  lib/Sema/SemaType.cpp
  test/CodeGenCXX/noescape.cpp
  test/CodeGenObjC/noescape.m
  test/Misc/ast-dump-attr.cpp
  test/Misc/pragma-attribute-supported-attributes-list.test
  test/Misc/warning-flags.c
  test/Sema/noescape.c
  test/SemaObjCXX/noescape.mm

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32210.109814.patch
Type: text/x-patch
Size: 29189 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170804/857e9578/attachment-0001.bin>


More information about the cfe-commits mailing list