Fixing SR-63731; Do I have the right code locations?

Hi there,

I'm currently working on a fix for issue SR-63731, which reports, that "accessor macro expansion doesn't remove initializer from stored properties" as required by SE-0389, Attached Macros.

As the fix should involve just removing the AST node for the initializer expression of the stored property, I thought I'd give it a shot and try to solve it.

I therefor scanned the swift codebase and came across the file lib/Sema/TypeCheckMacros.cpp, which I assume is the right place to implement the fix.

I then looked at the test files and was not sure, which file corresponded to the macro type checking, as the test files had quite a particular formatting and syntax.

Can anybody tell me, if I'm on the right track here? And maybe give a hint on how I could go on in my endeavor.

Maybe @Douglas_Gregor?

The compiler isn't removing the AST note entirely; it's treating it as not being part of the program.

Where are you observing that the initializer is not removed? That will help us say where to look to fix the issue.

Doug

@Douglas_Gregor

Where are you observing that the initializer is not removed? That will help us say where to look to fix the issue.

Answering this on the GitHub issue page (in short: assertMacroExpansion)