Add an interesting unit test, found by changing --search-length-undef from the default. Program handles it correctly but good for ensuring correctness on further changes :)
Details
Diff Detail
- Build Status
Buildable 10961 Build 10961: arc lint + arc unit
Event Timeline
LGTM
unittests/tools/llvm-cfi-verify/FileAnalysis.cpp | ||
---|---|---|
654 ↗ | (On Diff #121356) | Maybe SearchLengthForUndef should be a field on FileAnalysis? |
unittests/tools/llvm-cfi-verify/FileAnalysis.cpp | ||
---|---|---|
654 ↗ | (On Diff #121356) | My thoughts are that SearchLengthForUndef should be a singleton across all instances of FileAnalysis. It just so happens that FileAnalysis is always a singleton (apart from these unit tests), and I'm not sure that duplicating this data is neccessary. WDYT? |
unittests/tools/llvm-cfi-verify/FileAnalysis.cpp | ||
---|---|---|
654 ↗ | (On Diff #121356) | Up to you, but it seems that making it a field would make your tests less error-prone, which to me means that it's probably the "right" architecture. |
unittests/tools/llvm-cfi-verify/FileAnalysis.cpp | ||
---|---|---|
654 ↗ | (On Diff #121356) | I think I'd prefer to have the flag closer to the place that it's used, rather than be a flag that's copied into each FileAnalysis instance at runtime and then passed through options injection into GraphBuilder. I think it makes the usage of it too far from the definition for somehting that (in a non-test environment) is unchanged after startup. Feel free to overwrite me on this though, I'll follow it up in a further patch if that's what you desire :) |