Skip to content

Turn the two noisiest error!s into warn!s #80

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

Closed
wants to merge 1 commit into from

Conversation

fitzgen
Copy link
Member

@fitzgen fitzgen commented Oct 12, 2016

r? @emilio

@@ -468,7 +468,7 @@ impl Type {
return Err(ParseError::Recurse);
}

error!("invalid type {:?}", ty);
warn!("invalid type {:?}", ty);
Copy link
Contributor

Choose a reason for hiding this comment

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

This can be an error, but it is not if ty.spelling().is_empty(), so I think we want to wrap that in an if.

@@ -444,7 +444,7 @@ impl ClangItemParser for Item {
if cursor.kind() == clangll::CXCursor_UnexposedDecl {
Err(ParseError::Recurse)
} else {
error!("Unhandled cursor kind: {}", ::clang::kind_to_str(cursor.kind()));
warn!("Unhandled cursor kind: {}", ::clang::kind_to_str(cursor.kind()));
Copy link
Contributor

@emilio emilio Oct 12, 2016

Choose a reason for hiding this comment

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

We should keep this, and if we don't care about some specific cursor, like MacroExpansion, we should do something like:

match cursor.kind() {
    kind @ CXCursor_MacroExpansion | /* others? */ => debug!("Ignoring cursor kind {}", ::clang::kind_to_str(kind)),
    other => error!("Unhandled cursor kind: {}", ::clang::kind_to_str(kind)),
}

@bors-servo
Copy link

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

@fitzgen
Copy link
Member Author

fitzgen commented Oct 26, 2016

I don't think we want this change.

@fitzgen fitzgen closed this Oct 26, 2016
@fitzgen fitzgen deleted the noisy-error-to-warning branch October 26, 2016 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants