Skip to content

Enhance Clang AST dumping #469

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 2 commits into from
Feb 3, 2017

Conversation

fitzgen
Copy link
Member

@fitzgen fitzgen commented Feb 2, 2017

This commit extends our existing Clang AST dumping to include more information,
such as a cursor's canonical, referenced, and declarations cursors if they
exist. It prints out most of the information that libclang gives us directly,
but not the information that we attempt to (re)construct on top of the libclang
APIs.

r? @emilio or @Yamakaky

This commit extends our existing Clang AST dumping to include more information,
such as a cursor's canonical, referenced, and declarations cursors if they
exist. It prints out most of the information that libclang gives us directly,
but not the information that we attempt to (re)construct on top of the libclang
APIs.
@highfive
Copy link

highfive commented Feb 2, 2017

warning Warning warning

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

@emilio
Copy link
Contributor

emilio commented Feb 2, 2017

I'm kinda wary this could be too verbose for big files, but it's probably easy enough to allow cutting it down with an option if we need so, either here or in a followup.

r=me with or without the above, thanks Nick :)

@fitzgen
Copy link
Member Author

fitzgen commented Feb 2, 2017

I already try to only display information if it exists, is valid, and isn't the same as the original cursor or original type.

Agreed that we can add a --verbose-clang-ast if we find that we need to in practice.

@bors-servo r=emilio

@bors-servo
Copy link

📌 Commit 42b721d has been approved by emilio

This can lead to infinite loops with forward declarations and blow the stack.
@fitzgen
Copy link
Member Author

fitzgen commented Feb 2, 2017

@bors-servo r=emilio

(Added a small commit that fixes a potential infinite recursion when dumping the AST, this is purely code removal)

@bors-servo
Copy link

📌 Commit 67ba2ad has been approved by emilio

@bors-servo
Copy link

💡 This pull request was already approved, no need to approve it again.

@bors-servo
Copy link

📌 Commit 67ba2ad has been approved by emilio

@bors-servo
Copy link

⌛ Testing commit 67ba2ad with merge 4c45407...

bors-servo pushed a commit that referenced this pull request Feb 3, 2017
Enhance Clang AST dumping

This commit extends our existing Clang AST dumping to include more information,
such as a cursor's canonical, referenced, and declarations cursors if they
exist. It prints out most of the information that libclang gives us directly,
but not the information that we attempt to (re)construct on top of the libclang
APIs.

r? @emilio or @Yamakaky
@bors-servo
Copy link

☀️ Test successful - status-travis
Approved by: emilio
Pushing 4c45407 to master...

@bors-servo bors-servo merged commit 67ba2ad into rust-lang:master Feb 3, 2017
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