From 5921e04efd9341ec915338b00149ea832b02b430 Mon Sep 17 00:00:00 2001 From: Douglas Gregor <dgregor@apple.com> Date: Fri, 22 Mar 2013 07:08:56 +0000 Subject: [PATCH] Add future directions for modules git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177707 91177308-0d34-0410-b5e6-96231b3b80d8 --- docs/Modules.rst | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/Modules.rst b/docs/Modules.rst index 3b2df535cde..ea4b7a48969 100644 --- a/docs/Modules.rst +++ b/docs/Modules.rst @@ -655,6 +655,22 @@ The module maps will be written using the `module map language`_, which provides To detect and help address some of these problems, the ``clang-tools-extra`` repository contains a ``modularize`` tool that parses a set of given headers and attempts to detect these problems and produce a report. See the tool's in-source documentation for information on how to check your system or library headers. +Future Directions +================= +Modules is an experimental feature, and there is much work left to do to make it both real and useful. Here are a few ideas: + +**Detect unused module imports** + Unlike with ``#include`` directives, it should be fairly simple to track whether a directly-imported module has ever been used. By doing so, Clang can emit ``unused import`` or ``unused #include`` diagnostics, including Fix-Its to remove the useless imports/includes. + +**Fix-Its for missing imports** + It's fairly common for one to make use of some API while writing code, only to get a compiler error about "unknown type" or "no function named" because the corresponding header has not been included. Clang should detect such cases and auto-import the required module (with a Fix-It!). + +**Improve modularize** + The modularize tool is both extremely important (for deployment) and extremely crude. It needs better UI, better detection of problems (especially for C++), and perhaps an assistant mode to help write module maps for you. + +**C++ Support** + Modules clearly has to work for C++, or we'll never get to use it for the Clang code base. + Where To Learn More About Modules ================================= The Clang source code provides additional information about modules: -- GitLab