[PATCH] D107026: [Clang] Add support for attribute 'escape'

Valeriy Savchenko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 29 04:03:13 PDT 2021


vsavchenko added a comment.

Great job!  It looks good, but I have a couple of minor tweaks.

I see that the "applies to pointer arguments only" warning is not tested for `noescape`, but I still find it to be a good practice to write a test with a bunch of cases with attributes applied in wrong places.

Additionally, I believe that `escape` and `noescape` convey the same information, and it is totally okay to have two attributes because the user has to have a choice to say either "I do escape it" or "I definitely do not escape it" when the default is unspecified at all.  But I do think that we should add a check disallowing both of these attributes to be used at the same time for the same parameter, since they directly contradict one another.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D107026/new/

https://reviews.llvm.org/D107026



More information about the cfe-commits mailing list