This is an archive of the discontinued LLVM Phabricator instance.

[analyzer] SATest: Add a set of initial projects for testing
ClosedPublic

Authored by vsavchenko on Jun 10 2020, 10:31 AM.

Diff Detail

Event Timeline

vsavchenko created this revision.Jun 10 2020, 10:31 AM
NoQ added inline comments.Jun 18 2020, 7:12 AM
clang/utils/analyzer/.dockerignore
2

NO NeWlINE At EnD oF fILE

clang/utils/analyzer/projects/box2d/run_static_analyzer.cmd
2

Is there a flag to enable assertions or something like that? Usually we recommend people to enable assertions during analysis. It's also valuable to test that assertions are actually working.

Disabling assertions is in fact relatively good for reference results testing because all the false positives that they suppress are suddenly visible, and therefore the signal we receive from such testing is amplified significantly. But i wouldn't force such workflow on our solution-for-everyone because that requires a certain level of masochism in order to distinguish between "my patch introduced a false positive and it's bad" and "my patch introduced a false positive but it would have been suppressed by assertions and we do actually want to emit the warning in absence of assertions so it's good".

vsavchenko marked an inline comment as done.Jun 18 2020, 7:58 AM
vsavchenko added inline comments.
clang/utils/analyzer/projects/box2d/run_static_analyzer.cmd
2

CMake doesn't have a unified solution for "Release with assertions" type of build. It is usually done on per-project basis (like in LLVM). I guess rather than searching for such a flag for every project, we can indeed change it to Debug.

NoQ added inline comments.Jun 19 2020, 7:48 AM
clang/utils/analyzer/projects/box2d/run_static_analyzer.cmd
2

Maybe something like -DCMAKE_C_FLAGS=-UNDEBUG could also work (or use scan-build --force-analyze-debug-code which is basically the same thing) but choosing Debug indeed sounds like the sanest solution.

Change build type to Debug

Add a new line in .dockerignore

NoQ accepted this revision.Jun 24 2020, 4:54 PM

Thx!

This revision is now accepted and ready to land.Jun 24 2020, 4:54 PM
This revision was automatically updated to reflect the committed changes.