summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra
diff options
context:
space:
mode:
authorJohn Thompson <John.Thompson.JTSoftware@gmail.com>2013-06-27 18:52:23 +0000
committerJohn Thompson <John.Thompson.JTSoftware@gmail.com>2013-06-27 18:52:23 +0000
commit161381e12076cbeb45e0c7481e68d54fe8553eb0 (patch)
tree1ae58437a93382f95a7fe18da1547d103a95d371 /clang-tools-extra
parent73c23a71820d561ee273ab3e4db555efd7c1fc38 (diff)
downloadbcm5719-llvm-161381e12076cbeb45e0c7481e68d54fe8553eb0.tar.gz
bcm5719-llvm-161381e12076cbeb45e0c7481e68d54fe8553eb0.zip
Ran clang-format on Modularize.cpp to get a baseline for future changes.
llvm-svn: 185092
Diffstat (limited to 'clang-tools-extra')
-rw-r--r--clang-tools-extra/modularize/Modularize.cpp32
1 files changed, 20 insertions, 12 deletions
diff --git a/clang-tools-extra/modularize/Modularize.cpp b/clang-tools-extra/modularize/Modularize.cpp
index d367b9151ca..7dca4d28ca5 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<std::string>
-ListFileName(cl::Positional,
- cl::desc("<name of file containing list of headers to check>"));
+cl::opt<std::string> ListFileName(
+ cl::Positional,
+ cl::desc("<name of file containing list of headers to check>"));
// Collect all other arguments, which will be passed to the front end.
-cl::list<std::string> CC1Arguments(
- cl::ConsumeAfter, cl::desc("<arguments to be passed to front end>..."));
+cl::list<std::string>
+ CC1Arguments(cl::ConsumeAfter,
+ cl::desc("<arguments to be passed to front end>..."));
// Option to specify a prefix to be prepended to the header names.
cl::opt<std::string> HeaderPrefix(
@@ -314,13 +315,14 @@ public:
CurHeaderContents.clear();
}
+
private:
DenseMap<const FileEntry *, HeaderContents> CurHeaderContents;
DenseMap<const FileEntry *, HeaderContents> AllHeaderContents;
};
-class CollectEntitiesVisitor :
- public RecursiveASTVisitor<CollectEntitiesVisitor> {
+class CollectEntitiesVisitor
+ : public RecursiveASTVisitor<CollectEntitiesVisitor> {
public:
CollectEntitiesVisitor(SourceManager &SM, EntityMap &Entities)
: SM(SM), Entities(Entities) {}
@@ -373,6 +375,7 @@ public:
Entities.add(Name, isa<TagDecl>(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";
}
}
OpenPOWER on IntegriCloud