llvm/clang/unittests/Basic/CMakeLists.txt
Jan Svoboda 40c261c41c [clang][cli] Generate and round-trip language options
This patch implements generation of remaining language options and tests it by performing parse-generate-parse round trip (on by default for assert builds, off otherwise).

This patch also correctly reports failures in `parseSanitizerKinds`, which is necessary for emitting diagnostics when an invalid sanitizer is passed to `-fsanitize=` during round-trip.

This patch also removes TableGen marshalling classes from two options:
* `fsanitize_blacklist` When parsing: it's first initialized via the generated code, but then also changed by manually written code, which is confusing.
* `fopenmp` When parsing: it's first initialized via generated code, but then conditionally changed by manually written code. This is also confusing. Moreover, we need to do some extra checks when generating it, which would be really cumbersome in TableGen. (Specifically, not emitting it when `-fopenmp-simd` was present.)

Reviewed By: dexonsmith

Differential Revision: https://reviews.llvm.org/D95793
2021-02-09 10:18:55 +01:00

21 lines
318 B
CMake

set(LLVM_LINK_COMPONENTS
Support
)
add_clang_unittest(BasicTests
CharInfoTest.cpp
DiagnosticTest.cpp
FileEntryTest.cpp
FileManagerTest.cpp
LineOffsetMappingTest.cpp
SanitizersTest.cpp
SourceManagerTest.cpp
)
clang_target_link_libraries(BasicTests
PRIVATE
clangAST
clangBasic
clangLex
)