swiftlang / swift-experimental-string-processing

An early experimental general-purpose pattern matching engine for Swift.
Apache License 2.0
278 stars 47 forks source link

[nfc] Avoid pointer conversions #691

Closed glessard closed 1 year ago

glessard commented 1 year ago

Preparing for a compiler that's less permissive about pointer conversions.

  1. Use the stdlib's pattern for lazy atomic references, by explicitly declaring the pointer as a computed property.
  2. Use an explicit pointer when a C function isn't detected as such by the compiler.
glessard commented 1 year ago

@swift-ci please test

natecook1000 commented 1 year ago

LGTM - how did you discover these issues? New compiler, or certain flags?

glessard commented 1 year ago

This was using a compiler branch that implements (most of) my restricted pointer conversions pitch.

glessard commented 1 year ago

@swift-ci please test linux platform

natecook1000 commented 1 year ago

@swift-ci Please test

glessard commented 1 year ago

This should be cherry-picked to the branch used for development snapshot toolchains.