This is an archive of the discontinued LLVM Phabricator instance.

[analyzer] [NFC] Reverse the argument order for "diff" in tests
ClosedPublic

Authored by george.karpenkov on Jan 4 2019, 3:47 PM.

Details

Summary

The current argument order has "expected" and "actual" the wrong way around,
so that the diff shows the change from expected to actual, not from actual to expected.

Namely, if the expected diagnostics contains the string "foo", but the analyzer emits "bar",
we really want to see:

- foo
+ bar

not

- bar
+ foo

since adapting to most changes would require applying that diff to the expected output.

Diff Detail

Repository
rL LLVM

Event Timeline

george.karpenkov edited the summary of this revision. (Show Details)Jan 4 2019, 3:47 PM

Always bothered me! Is there a way to squeeze this into %diff_plist?

Always bothered me! Is there a way to squeeze this into %diff_plist?

I am not sure: it's a simple expansion, not a function call. I don't think adding an extra "-" is a problem though.

NoQ accepted this revision.Jan 9 2019, 12:23 PM

Yup, i appreciate :)

This revision is now accepted and ready to land.Jan 9 2019, 12:23 PM
This revision was automatically updated to reflect the committed changes.