Skip to content

ir: Don't parse non-semantic-children cursor as inner structs. #486

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

Merged
merged 3 commits into from
Feb 10, 2017

Conversation

emilio
Copy link
Contributor

@emilio emilio commented Feb 7, 2017

@highfive
Copy link

highfive commented Feb 7, 2017

warning Warning warning

  • These commits modify unsafe code. Please review it carefully!

Copy link
Member

@fitzgen fitzgen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks!

src/ir/comp.rs Outdated
@@ -605,11 +605,17 @@ impl CompInfo {
CXCursor_UnionDecl |
CXCursor_ClassTemplate |
CXCursor_ClassDecl => {
// We can find non-semantic children here, see:
// https://github.com/servo/rust-bindgen/issues/482
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please leave a one or two sentence description of why/when we can find non-semantic children here, and only link the issue if you think it is still relevant with those sentences.

src/ir/comp.rs Outdated
// We can find non-semantic children here, see:
// https://github.com/servo/rust-bindgen/issues/482
if cur.semantic_parent() != cursor {
return CXChildVisit_Continue;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it worth lifting this check and early return up out to right before the match?

@fitzgen
Copy link
Member

fitzgen commented Feb 7, 2017

(r=me, but I will let you delegate to bors so you can decide how to respond to my review feedback)

@emilio emilio force-pushed the unresolved-nasty-thingie branch from 2a4bfc4 to 7b16c67 Compare February 8, 2017 10:10
@emilio
Copy link
Contributor Author

emilio commented Feb 8, 2017

@bors-servo r=fitzgen

  • Improved the comment.
  • I don't think the check is worth uplifting

Thanks for the review Nick! :)

@bors-servo
Copy link

📌 Commit 7b16c67 has been approved by fitzgen

@bors-servo
Copy link

🔒 Merge conflict

@bors-servo
Copy link

☔ The latest upstream changes (presumably #480) made this pull request unmergeable. Please resolve the merge conflicts.

@emilio
Copy link
Contributor Author

emilio commented Feb 8, 2017

@bors-servo r=fitzgen

@bors-servo
Copy link

📌 Commit 9f745ab has been approved by fitzgen

@bors-servo
Copy link

⌛ Testing commit 9f745ab with merge 5487e44...

bors-servo pushed a commit that referenced this pull request Feb 8, 2017
ir: Don't parse non-semantic-children cursor as inner structs.

r? @fitzgen
@bors-servo
Copy link

💔 Test failed - status-travis

@emilio
Copy link
Contributor Author

emilio commented Feb 8, 2017

Fixed a few places where we were passing parent_id down incorrectly.

@bors-servo r=fitzgen

@bors-servo
Copy link

📌 Commit 3476447 has been approved by fitzgen

@bors-servo
Copy link

☔ The latest upstream changes (presumably #491) made this pull request unmergeable. Please resolve the merge conflicts.

@emilio emilio force-pushed the unresolved-nasty-thingie branch from 3476447 to 331ecab Compare February 10, 2017 13:03
@emilio
Copy link
Contributor Author

emilio commented Feb 10, 2017

@bors-servo r=fitzgen

@bors-servo
Copy link

📌 Commit 331ecab has been approved by fitzgen

@bors-servo
Copy link

⌛ Testing commit 331ecab with merge 9409549...

bors-servo pushed a commit that referenced this pull request Feb 10, 2017
ir: Don't parse non-semantic-children cursor as inner structs.

r? @fitzgen
@bors-servo
Copy link

☀️ Test successful - status-travis
Approved by: fitzgen
Pushing 9409549 to master...

@bors-servo bors-servo merged commit 331ecab into rust-lang:master Feb 10, 2017
@emilio emilio deleted the unresolved-nasty-thingie branch April 19, 2017 08:49
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.

4 participants