[clang-tools-extra] r176883 - Review feedback change per Edwin: Move non-public members to end of classes.
Vane, Edwin
edwin.vane at intel.com
Wed Mar 13 11:29:30 PDT 2013
Did you look at the idea of using CommonOptionsParser? If it doesn't apply for some reason that's fine but for tool consistency it would be nice.
-----Original Message-----
From: cfe-commits-bounces at cs.uiuc.edu [mailto:cfe-commits-bounces at cs.uiuc.edu] On Behalf Of John Thompson
Sent: Tuesday, March 12, 2013 2:52 PM
To: cfe-commits at cs.uiuc.edu
Subject: [clang-tools-extra] r176883 - Review feedback change per Edwin: Move non-public members to end of classes.
Author: jtsoftware
Date: Tue Mar 12 13:51:47 2013
New Revision: 176883
URL: http://llvm.org/viewvc/llvm-project?rev=176883&view=rev
Log:
Review feedback change per Edwin: Move non-public members to end of classes.
Modified:
clang-tools-extra/trunk/modularize/Modularize.cpp
Modified: clang-tools-extra/trunk/modularize/Modularize.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/modularize/Modularize.cpp?rev=176883&r1=176882&r2=176883&view=diff
==============================================================================
--- clang-tools-extra/trunk/modularize/Modularize.cpp (original)
+++ clang-tools-extra/trunk/modularize/Modularize.cpp Tue Mar 12
+++ 13:51:47 2013
@@ -145,9 +145,6 @@ struct HeaderEntry { typedef std::vector<HeaderEntry> HeaderContents;
class EntityMap : public llvm::StringMap<llvm::SmallVector<Entry, 2> > {
- llvm::DenseMap<const FileEntry *, HeaderContents> CurHeaderContents;
- llvm::DenseMap<const FileEntry *, HeaderContents> AllHeaderContents;
-
public:
llvm::DenseMap<const FileEntry *, HeaderContents> HeaderContentMismatches;
@@ -197,14 +194,14 @@ public:
CurHeaderContents.clear();
}
+private:
+ llvm::DenseMap<const FileEntry *, HeaderContents> CurHeaderContents;
+ llvm::DenseMap<const FileEntry *, HeaderContents> AllHeaderContents;
};
class CollectEntitiesVisitor
: public RecursiveASTVisitor<CollectEntitiesVisitor>
{
- SourceManager &SM;
- EntityMap &Entities;
-
public:
CollectEntitiesVisitor(SourceManager &SM, EntityMap &Entities)
: SM(SM), Entities(Entities) { }
@@ -249,12 +246,12 @@ public:
Entities.add(Name, isa<TagDecl>(ND)? Entry::Tag : Entry::Value, Loc);
return true;
}
+private:
+ SourceManager &SM;
+ EntityMap &Entities;
};
class CollectEntitiesConsumer : public ASTConsumer {
- EntityMap &Entities;
- Preprocessor &PP;
-
public:
CollectEntitiesConsumer(EntityMap &Entities, Preprocessor &PP)
: Entities(Entities), PP(PP) { }
@@ -280,30 +277,32 @@ public:
// Merge header contents.
Entities.mergeCurHeaderContents();
}
+private:
+ EntityMap &Entities;
+ Preprocessor &PP;
};
class CollectEntitiesAction : public SyntaxOnlyAction {
- EntityMap &Entities;
-
+public:
+ CollectEntitiesAction(EntityMap &Entities) : Entities(Entities) { }
protected:
virtual clang::ASTConsumer *CreateASTConsumer(CompilerInstance &CI,
StringRef InFile) {
return new CollectEntitiesConsumer(Entities, CI.getPreprocessor());
}
-
-public:
- CollectEntitiesAction(EntityMap &Entities) : Entities(Entities) { }
+private:
+ EntityMap &Entities;
};
class ModularizeFrontendActionFactory : public FrontendActionFactory {
- EntityMap &Entities;
-
public:
ModularizeFrontendActionFactory(EntityMap &Entities) : Entities(Entities) { }
virtual CollectEntitiesAction *create() {
return new CollectEntitiesAction(Entities);
}
+private:
+ EntityMap &Entities;
};
int main(int argc, const char **argv) {
_______________________________________________
cfe-commits mailing list
cfe-commits at cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
More information about the cfe-commits
mailing list