forked from OSchip/llvm-project
44bbf20965
This patch adds macro expansion preview to hover info. Basically, the refactor infrastructure for expanding macro is used for this purpose. The following steps are added to getHoverContents for macros: 1. calling AST.getTokens().expansionStartingAt(...) to get expanded tokens 2. calling reformat(...) to format expanded tokens Some opinions are wanted: 1. Should we present macro expansion before definition in the hover card? 2. Should we truncate/ignore macro expansion if it's too long? For performance and presentation reason, it might not be a good idea to expand pages worth of tokens in hover card. If so, what's the preferred threshold? Also, some limitation applies: 1. Expansion isn't available in macro definition/arguments as the refactor code action isn't either. Differential Revision: https://reviews.llvm.org/D127082 |
||
---|---|---|
.. | ||
clang-apply-replacements | ||
clang-change-namespace | ||
clang-doc | ||
clang-include-fixer | ||
clang-move | ||
clang-query | ||
clang-reorder-fields | ||
clang-tidy | ||
clangd | ||
docs | ||
include-cleaner | ||
modularize | ||
pp-trace | ||
pseudo | ||
test | ||
tool-template | ||
unittests | ||
.gitignore | ||
CMakeLists.txt | ||
CODE_OWNERS.TXT | ||
LICENSE.TXT | ||
README.txt |
README.txt
//===----------------------------------------------------------------------===// // Clang Tools repository //===----------------------------------------------------------------------===// Welcome to the repository of extra Clang Tools. This repository holds tools that are developed as part of the LLVM compiler infrastructure project and the Clang frontend. These tools are kept in a separate "extra" repository to allow lighter weight checkouts of the core Clang codebase. All discussion regarding Clang, Clang-based tools, and code in this repository should be held using the standard Clang forum: https://discourse.llvm.org/c/clang Code review for this tree should take place on the standard Clang patch and commit lists: http://lists.llvm.org/mailman/listinfo/cfe-commits If you find a bug in these tools, please file it in the LLVM bug tracker: https://github.com/llvm/llvm-project/issues/