The following changes were required to fix these tests:
- Change LLVM_ENABLE_PLUGINS to an option and move it to llvm/CMakeLists.txt with an appropriate default -- which matches the original default behavior.
- Move the plugins directory from clang/test/Analysis clang/lib/Analysis. It's not enough to add an exclude to the lit.local.cfg file because add_lit_testsuites recurses the tree and automatically adds the appropriate check- targets, which don't make sense for the plugins because they aren't tests and don't have RUN statements.
Here's a list of the clang-check-anlysis* targets with this change:
$ ninja -t targets all| sed -n "s/.*\/\(check[^:]*\):.*/\1/p" | sort -u | grep clang-analysis check-clang-analysis check-clang-analysis-checkers check-clang-analysis-copypaste check-clang-analysis-diagnostics check-clang-analysis-engine check-clang-analysis-exploration_order check-clang-analysis-html_diagnostics check-clang-analysis-html_diagnostics-relevant_lines check-clang-analysis-inlining check-clang-analysis-objc check-clang-analysis-unified-sources check-clang-analysis-z3
- Simplify the logic and only include the subdirectories under clang/lib/Analysis/plugins if LLVM_ENABLE_PLUGINS is set.
As far as i remember, this chunk of code is responsible for running the whole analyzer test suite with different parameters (with Z3 as a constraint manager instead of the ad-hoc range constraint manager), rather than running a smaller chunk of the suite.
@mikhail.ramalho, @ddcc - i think i should leave it up to you to decide if you want to keep this working. Right now these extra tests aren't run under any buildbot, and the facility that they're testing is probably never going to be used by actual users (as opposed to the z3 refutation). But i wouldn't love losing this facility because it's a great way of evaluating the static analyzer, i.e. figuring out how good *could* it have been with a good constraint solver, so that we had something to look forward to.