[llvm] [workflows] Add post-commit job that periodically runs the clang static analyzer (PR #94106)

Artem Dergachev via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 6 11:23:41 PDT 2024


haoNoQ wrote:

Ok looks like something crashed? The log isn't very informative, could also be out-of-memory or something of that nature. can we pass some flags to make it generate reproducers?

Actually `scan-build` does this out of the box by re-running the crashed invocation and put the crash dump and the repros into the results folder, in a sub-folder named `failures`. We could do the same in our launcher script, and then `scan-build --generate-index-only` might even pick them up and show them on the `index.html` page!

It may also be a good idea to `|| true` the static analyzer invocation, so that static analyzer crashes don't block the rest of the build. Static analyzer invocations don't depend on each other, their output doesn't need to "link" to each other, so it's ok to ignore these crashes. Also it's not like we're using a freshly built clang we can fix to unblock ourselves.

Side note, if we used the clang-tidy workflow with compilation databases, it'd naturally allow us to use freshly built clang for analysis, because all analysis would be run strictly after the normal build is finished. (We could use that workflow even without `clang-tidy`, just grep all run-lines from the compilation database and add `--analyze` etc. to them.)

https://github.com/llvm/llvm-project/pull/94106


More information about the llvm-commits mailing list