[Accepted] SE-0550: `@instrumentation` attribute for functions [was: `@noSanitize` attribute for functions]

Hello, Swift community!

The review of SE-0550: @instrumentation attribute for functions ended on October 20th.

Feedback on this proposal was that the feature itself was generally useful, with most of the discussion revolving around the spelling and about specific implementation details. The review period was extended to give the community time to comment on changes that were requested by the Language Steering Group during its initial review. Those changes were:

  • Rename the attribute to @instrumentation(disable: <comma-delimited list of sanitizers>), where the list of sanitizer names are the lowerCamelCase form of the sanitizer name passed to the -sanitize= command line flag.
  • Propagate the disablement of sanitizers to closures and nested declarations, matching the behavior of @section.
  • Support @instrumentation(default) to re-enable sanitizers in nested contexts whose outer contexts disabled them.
  • Rename the compiler condition to #if moduleInstrumentation(<sanitizer name>), indicating that condition is evaluated based on the sanitizer settings that apply to the module/compiler invocation, not inherited from any outer lexical context.

Since the author has incorporated these changes into the proposal and no other concerns were raised during the extended review period, the Language Steering Group accepts this proposal.

Thanks to everybody who participated in the review!

—Tony Allevato, review manager

6 Likes