mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-02-04 00:06:50 +00:00
6b23626192
Summary: The goal of this tool is fairly simple, look up unknown identifiers in a global database and add the corresponding #include line. It accomplishes this by hooking into Sema as an ExternalSemaSource and responding to typo correction callbacks. This means we can see the unknown identifier before it's being munged by error recovery. This doesn't work perfectly yet as some typo corrections don't emit callbacks (delayed typos), but I think this is fixable. We also handle only one include at a time as this is meant to be run directly from the editing environment eventually. Adding multiple includes at the same time is tricky because of error recovery. This version only has a a dummy database, so all you can do is fixing missing includes of <string>, but the indexer to build a database will follow soon. Reviewers: djasper Subscribers: ioeric, hokein, cfe-commits Differential Revision: http://reviews.llvm.org/D19314 llvm-svn: 266870
26 lines
718 B
CMake
26 lines
718 B
CMake
add_subdirectory(clang-apply-replacements)
|
|
add_subdirectory(clang-rename)
|
|
add_subdirectory(modularize)
|
|
if(CLANG_ENABLE_STATIC_ANALYZER)
|
|
add_subdirectory(clang-tidy)
|
|
endif()
|
|
|
|
add_subdirectory(clang-query)
|
|
add_subdirectory(include-fixer)
|
|
add_subdirectory(pp-trace)
|
|
add_subdirectory(tool-template)
|
|
|
|
# Add the common testsuite after all the tools.
|
|
# TODO: Support tests with more granularity when features are off?
|
|
if(CLANG_ENABLE_STATIC_ANALYZER AND CLANG_INCLUDE_TESTS)
|
|
add_subdirectory(test)
|
|
add_subdirectory(unittests)
|
|
endif()
|
|
|
|
option(CLANG_TOOLS_EXTRA_INCLUDE_DOCS "Generate build targets for the Clang Extra Tools docs."
|
|
${LLVM_INCLUDE_DOCS})
|
|
if( CLANG_TOOLS_EXTRA_INCLUDE_DOCS )
|
|
add_subdirectory(docs)
|
|
endif()
|
|
|