From 161381e12076cbeb45e0c7481e68d54fe8553eb0 Mon Sep 17 00:00:00 2001 From: John Thompson Date: Thu, 27 Jun 2013 18:52:23 +0000 Subject: [PATCH] Ran clang-format on Modularize.cpp to get a baseline for future changes. llvm-svn: 185092 --- clang-tools-extra/modularize/Modularize.cpp | 32 +++++++++++++-------- 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/clang-tools-extra/modularize/Modularize.cpp b/clang-tools-extra/modularize/Modularize.cpp index d367b9151ca6..7dca4d28ca5f 100644 --- a/clang-tools-extra/modularize/Modularize.cpp +++ b/clang-tools-extra/modularize/Modularize.cpp @@ -96,13 +96,14 @@ using namespace clang; using namespace llvm; // Option to specify a file name for a list of header files to check. -cl::opt -ListFileName(cl::Positional, - cl::desc("")); +cl::opt ListFileName( + cl::Positional, + cl::desc("")); // Collect all other arguments, which will be passed to the front end. -cl::list CC1Arguments( - cl::ConsumeAfter, cl::desc("...")); +cl::list + CC1Arguments(cl::ConsumeAfter, + cl::desc("...")); // Option to specify a prefix to be prepended to the header names. cl::opt HeaderPrefix( @@ -314,13 +315,14 @@ public: CurHeaderContents.clear(); } + private: DenseMap CurHeaderContents; DenseMap AllHeaderContents; }; -class CollectEntitiesVisitor : - public RecursiveASTVisitor { +class CollectEntitiesVisitor + : public RecursiveASTVisitor { public: CollectEntitiesVisitor(SourceManager &SM, EntityMap &Entities) : SM(SM), Entities(Entities) {} @@ -373,6 +375,7 @@ public: Entities.add(Name, isa(ND) ? Entry::EK_Tag : Entry::EK_Value, Loc); return true; } + private: SourceManager &SM; EntityMap &Entities; @@ -404,6 +407,7 @@ public: // Merge header contents. Entities.mergeCurHeaderContents(); } + private: EntityMap &Entities; Preprocessor &PP; @@ -412,11 +416,13 @@ private: class CollectEntitiesAction : public SyntaxOnlyAction { public: CollectEntitiesAction(EntityMap &Entities) : Entities(Entities) {} + protected: - virtual clang::ASTConsumer * - CreateASTConsumer(CompilerInstance &CI, StringRef InFile) { + virtual clang::ASTConsumer *CreateASTConsumer(CompilerInstance &CI, + StringRef InFile) { return new CollectEntitiesConsumer(Entities, CI.getPreprocessor()); } + private: EntityMap &Entities; }; @@ -428,6 +434,7 @@ public: virtual CollectEntitiesAction *create() { return new CollectEntitiesAction(Entities); } + private: EntityMap &Entities; }; @@ -526,9 +533,10 @@ int main(int argc, const char **argv) { errs() << "error: header '" << H->first->getName() << "' has different contents depending on how it was included\n"; for (unsigned I = 0, N = H->second.size(); I != N; ++I) { - errs() << "note: '" << H->second[I].Name << "' in " << H->second[I] - .Loc.File->getName() << " at " << H->second[I].Loc.Line << ":" - << H->second[I].Loc.Column << " not always provided\n"; + errs() << "note: '" << H->second[I].Name << "' in " + << H->second[I].Loc.File->getName() << " at " + << H->second[I].Loc.Line << ":" << H->second[I].Loc.Column + << " not always provided\n"; } }