-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Start adding extern logic for functions. (#3809)
This starts propagating is_extern on import, and warns when merging an imported non-extern declaration with a local non-extern declaration. Note this doesn't address import conflicts yet (i.e., two libraries define an equivalent name) because they don't call merge logic. On merge, I'm only setting values when new_is_definition because I think it better matches the comment and resulting behavior. Note I now set them even for bad redefinitions; I think this matches the comment, and there's not a perfect choice here. I could change the flow back if preferred. Note this puts a spotlight on invalid nodes on imported decls, which I think I'm going to need to address now. This isn't addressed by ImportRef logic directly because the Function's decl_id is a FunctionDecl, rather than the ImportRef that led to it. While I could add the ImportRef link to each decl, I think adjusting the associated NodeId is a better approach.
- Loading branch information
Showing
11 changed files
with
748 additions
and
163 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.