diff options
author | John Thompson <John.Thompson.JTSoftware@gmail.com> | 2013-03-14 01:41:29 +0000 |
---|---|---|
committer | John Thompson <John.Thompson.JTSoftware@gmail.com> | 2013-03-14 01:41:29 +0000 |
commit | ce601e21d03cf2ad2d9eadb585756bd1b3fbba1f (patch) | |
tree | 4a0856fcca3bf84bf3d8f484390d1613d3635be9 /clang-tools-extra | |
parent | 5862c6dbfc2eba87ada99f7f4f8670f591722e2e (diff) | |
download | bcm5719-llvm-ce601e21d03cf2ad2d9eadb585756bd1b3fbba1f.tar.gz bcm5719-llvm-ce601e21d03cf2ad2d9eadb585756bd1b3fbba1f.zip |
Added future directions comment and a couple of fixme's.
llvm-svn: 176998
Diffstat (limited to 'clang-tools-extra')
-rw-r--r-- | clang-tools-extra/modularize/Modularize.cpp | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/clang-tools-extra/modularize/Modularize.cpp b/clang-tools-extra/modularize/Modularize.cpp index c446bfd17fd..c4da508a002 100644 --- a/clang-tools-extra/modularize/Modularize.cpp +++ b/clang-tools-extra/modularize/Modularize.cpp @@ -34,6 +34,29 @@ // // note: '(symbol)' in (file) at (row):(column) not always provided // +// Future directions: +// +// Basically, we want to add new checks for whatever we can check with respect +// to checking headers for module'ability. +// +// Some ideas: +// +// 1. Group duplicate definition messages into a single list. +// +// 2. Try to figure out the preprocessor conditional directives that +// contribute to problems. +// +// 3. Check for correct and consistent usage of extern "C" {} and other +// directives. Warn about #include inside extern "C" {}. +// +// 4. What else? +// +// General clean-up and refactoring: +// +// 1. The Location class seems to be something that we might +// want to design to be applicable to a wider range of tools, and stick it +// somewhere into Tooling/ in mainline +// //===----------------------------------------------------------------------===// #include "llvm/Config/config.h" @@ -58,6 +81,9 @@ using namespace clang::tooling; using namespace clang; using llvm::StringRef; +// FIXME: The Location class seems to be something that we might +// want to design to be applicable to a wider range of tools, and stick it +// somewhere into Tooling/ in mainline struct Location { const FileEntry *File; unsigned Line, Column; @@ -346,8 +372,9 @@ int main(int argc, const char **argv) { EntityMap Entities; ClangTool Tool(*Compilations, Headers); int HadErrors = Tool.run(new ModularizeFrontendActionFactory(Entities)); - + // Check for the same entity being defined in multiple places. + // FIXME: Could they be grouped into a list? for (EntityMap::iterator E = Entities.begin(), EEnd = Entities.end(); E != EEnd; ++E) { Location Tag, Value, Macro; @@ -375,6 +402,8 @@ int main(int argc, const char **argv) { // Complain about any headers that have contents that differ based on how // they are included. + // FIXME: Could we provide information about which preprocessor conditionals + // are involved? for (llvm::DenseMap<const FileEntry *, HeaderContents>::iterator H = Entities.HeaderContentMismatches.begin(), HEnd = Entities.HeaderContentMismatches.end(); |