Also add a build file for clang/lib/ASTMatchers/Dynamic, which is only needed by tests (and clang/tools/extra).
Also make llvm/utils/gn/build/sync_source_lists_from_cmake.py check that every CMakeLists.txt file below {lld,clang}/unittests has a corresponding BUILD.gn file, so we notice if new test binaries get added (since the failure mode for missing GN build files for tests is just the tests silently not running in the GN build).
Also add a unittest() macro for defining unit test targets, and add a lengthy comment there about where the unit test binaries go and why.
With this, the build files for //clang are complete.
What if someone explicitly sets output_dir in the invoker? We should either preserve that value or assert with an error message that overriding output_dir in unittests is unsupported.