Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1416)

Unified Diff: tools/clang/plugins/ChromeClassTester.h

Issue 10808078: Clang plugin: defer checking of tag decls until after top-level decl fully parsed (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/clang/plugins/ChromeClassTester.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/clang/plugins/ChromeClassTester.h
diff --git a/tools/clang/plugins/ChromeClassTester.h b/tools/clang/plugins/ChromeClassTester.h
index f6d2e680ec268d2debddb663e975cdab1aad850a..9dffe99406ca2c806674813363fa5a492b450189 100644
--- a/tools/clang/plugins/ChromeClassTester.h
+++ b/tools/clang/plugins/ChromeClassTester.h
@@ -23,6 +23,7 @@ class ChromeClassTester : public clang::ASTConsumer {
// clang::ASTConsumer:
virtual void HandleTagDeclDefinition(clang::TagDecl* tag);
+ virtual bool HandleTopLevelDecl(clang::DeclGroupRef);
protected:
clang::CompilerInstance& instance() { return instance_; }
@@ -48,6 +49,8 @@ class ChromeClassTester : public clang::ASTConsumer {
private:
void BuildBannedLists();
+ void CheckTag(clang::TagDecl*);
+
// Filtered versions of tags that are only called with things defined in
// chrome header files.
virtual void CheckChromeClass(clang::SourceLocation record_location,
@@ -75,6 +78,9 @@ class ChromeClassTester : public clang::ASTConsumer {
// List of types that we don't check.
std::set<std::string> ignored_record_names_;
+
+ // List of decls to check once the current top-level decl is parsed.
+ std::vector<clang::TagDecl*> pending_class_decls_;
};
#endif // TOOLS_CLANG_PLUGINS_CHROMECLASSTESTER_H_
« no previous file with comments | « no previous file | tools/clang/plugins/ChromeClassTester.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698