Skip to content

Commit 94bce16

Browse files
leo60228emilio
authored andcommitted
Change non-fatal errors to warnings
1 parent 3e2566d commit 94bce16

File tree

7 files changed

+11
-11
lines changed

7 files changed

+11
-11
lines changed

src/clang.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -796,7 +796,7 @@ impl ClangToken {
796796
// expressions, so we strip them down here.
797797
CXToken_Comment => return None,
798798
_ => {
799-
error!("Found unexpected token kind: {:?}", self);
799+
warn!("Found unexpected token kind: {:?}", self);
800800
return None;
801801
}
802802
};

src/codegen/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ impl CodeGenerator for Item {
449449
// TODO(emilio, #453): Figure out what to do when this happens
450450
// legitimately, we could track the opaque stuff and disable the
451451
// assertion there I guess.
452-
error!("Found non-whitelisted item in code generation: {:?}", self);
452+
warn!("Found non-whitelisted item in code generation: {:?}", self);
453453
}
454454

455455
result.set_seen(self.id());
@@ -3938,7 +3938,7 @@ pub(crate) fn codegen(
39383938
"Your dot file was generated successfully into: {}",
39393939
path
39403940
),
3941-
Err(e) => error!("{}", e),
3941+
Err(e) => warn!("{}", e),
39423942
}
39433943
}
39443944

src/codegen/struct_layout.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ impl<'a> StructLayoutTracker<'a> {
248248
);
249249

250250
if layout.size < self.latest_offset {
251-
error!(
251+
warn!(
252252
"Calculated wrong layout for {}, too more {} bytes",
253253
self.name,
254254
self.latest_offset - layout.size

src/ir/context.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -2400,15 +2400,15 @@ If you encounter an error missing from this list, please file an issue or a PR!"
24002400
self.codegen_items = Some(codegen_items);
24012401

24022402
for item in self.options().whitelisted_functions.unmatched_items() {
2403-
error!("unused option: --whitelist-function {}", item);
2403+
warn!("unused option: --whitelist-function {}", item);
24042404
}
24052405

24062406
for item in self.options().whitelisted_vars.unmatched_items() {
2407-
error!("unused option: --whitelist-var {}", item);
2407+
warn!("unused option: --whitelist-var {}", item);
24082408
}
24092409

24102410
for item in self.options().whitelisted_types.unmatched_items() {
2411-
error!("unused option: --whitelist-type {}", item);
2411+
warn!("unused option: --whitelist-type {}", item);
24122412
}
24132413
}
24142414

src/ir/item.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1428,7 +1428,7 @@ impl ClangItemParser for Item {
14281428
// ignore toplevel operator overloads
14291429
let spelling = cursor.spelling();
14301430
if !spelling.starts_with("operator") {
1431-
error!(
1431+
warn!(
14321432
"Unhandled cursor kind {:?}: {:?}",
14331433
cursor.kind(),
14341434
cursor

src/ir/ty.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -973,7 +973,7 @@ impl Type {
973973
let inner_type = match inner {
974974
Ok(inner) => inner,
975975
Err(..) => {
976-
error!(
976+
warn!(
977977
"Failed to parse template alias \
978978
{:?}",
979979
location
@@ -1196,7 +1196,7 @@ impl Type {
11961196
return Err(ParseError::Continue);
11971197
}
11981198
_ => {
1199-
error!(
1199+
warn!(
12001200
"unsupported type: kind = {:?}; ty = {:?}; at {:?}",
12011201
ty.kind(),
12021202
ty,

src/regex_set.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ impl RegexSet {
5858
self.set = match RxSet::new(items) {
5959
Ok(x) => Some(x),
6060
Err(e) => {
61-
error!("Invalid regex in {:?}: {:?}", self.items, e);
61+
warn!("Invalid regex in {:?}: {:?}", self.items, e);
6262
None
6363
}
6464
}

0 commit comments

Comments
 (0)