Skip to content

IRGen: Ignore local variable declaration in inline c functions #33746

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

aschwaighofer
Copy link
Contributor

The existing code that walks back the declcontext parents did not work
for local declarations:

static inline void func() {
  extern int global;
  ...
}

The global's declaration context is the file context.

We would end up in code generation for the global decl and assert that
it is not a isFileVarDecl().

rdar://67951491

The existing code that walks back the declcontext parents did not work
for local declarations:

```
static inline void func() {
  extern int global;
  ...
}
```
The global's declaration context is the file context.

We would end up in code generation for the global decl and assert that
it is not a `isFileVarDecl()`.

rdar://67951491
@aschwaighofer
Copy link
Contributor Author

@swift-ci Please test

@rjmccall
Copy link
Contributor

rjmccall commented Sep 1, 2020

This seems to be the same as #33306. Most of the same comments apply.

@swift-ci
Copy link
Contributor

swift-ci commented Sep 1, 2020

Build failed
Swift Test OS X Platform
Git Sha - f923702

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants