Skip to content
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

Handle _Static_assert gracefully. Closes #276 #277

Merged
merged 7 commits into from
Jul 9, 2020
Prev Previous commit
Next Next commit
Update c2rust-transpile/src/c_ast/iterators.rs
Co-authored-by: ahomescu <ah@immunant.com>
  • Loading branch information
thedataking and ahomescu committed Jul 9, 2020
commit 51e1f114c8fe2640c3ecb8097cea81debf36ebad
2 changes: 1 addition & 1 deletion c2rust-transpile/src/c_ast/iterators.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ fn immediate_decl_children(kind: &CDeclKind) -> Vec<SomeId> {
MacroObject { .. } | MacroFunction { .. } => vec![],
NonCanonicalDecl { canonical_decl } => intos![canonical_decl],
StaticAssert { assert_expr, message } => {
if message.is_some() {
if let Some(message) = message {
intos![assert_expr, message.unwrap()]
thedataking marked this conversation as resolved.
Show resolved Hide resolved
} else {
intos![assert_expr]
Expand Down