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

Side by Side Diff: tools/clang/plugins/ChromeClassTester.h

Issue 212673008: Revert of Add a check to the FindBadConstructs.cpp clang plugin for bad enum last values. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | tools/clang/plugins/ChromeClassTester.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef TOOLS_CLANG_PLUGINS_CHROMECLASSTESTER_H_ 5 #ifndef TOOLS_CLANG_PLUGINS_CHROMECLASSTESTER_H_
6 #define TOOLS_CLANG_PLUGINS_CHROMECLASSTESTER_H_ 6 #define TOOLS_CLANG_PLUGINS_CHROMECLASSTESTER_H_
7 7
8 #include <set> 8 #include <set>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 private: 48 private:
49 void BuildBannedLists(); 49 void BuildBannedLists();
50 50
51 void CheckTag(clang::TagDecl*); 51 void CheckTag(clang::TagDecl*);
52 52
53 // Filtered versions of tags that are only called with things defined in 53 // Filtered versions of tags that are only called with things defined in
54 // chrome header files. 54 // chrome header files.
55 virtual void CheckChromeClass(clang::SourceLocation record_location, 55 virtual void CheckChromeClass(clang::SourceLocation record_location,
56 clang::CXXRecordDecl* record) = 0; 56 clang::CXXRecordDecl* record) = 0;
57 57
58 // Filtered versions of enum type that are only called with things defined
59 // in chrome header files.
60 virtual void CheckChromeEnum(clang::SourceLocation enum_location,
61 clang::EnumDecl* enum_decl) {
62 }
63
64 // Utility methods used for filtering out non-chrome classes (and ones we 58 // Utility methods used for filtering out non-chrome classes (and ones we
65 // deliberately ignore) in HandleTagDeclDefinition(). 59 // deliberately ignore) in HandleTagDeclDefinition().
66 std::string GetNamespaceImpl(const clang::DeclContext* context, 60 std::string GetNamespaceImpl(const clang::DeclContext* context,
67 const std::string& candidate); 61 const std::string& candidate);
68 bool InBannedDirectory(clang::SourceLocation loc); 62 bool InBannedDirectory(clang::SourceLocation loc);
69 bool IsIgnoredType(const std::string& base_name); 63 bool IsIgnoredType(const std::string& base_name);
70 64
71 // Attempts to determine the filename for the given SourceLocation. 65 // Attempts to determine the filename for the given SourceLocation.
72 // Returns false if the filename could not be determined. 66 // Returns false if the filename could not be determined.
73 bool GetFilename(clang::SourceLocation loc, std::string* filename); 67 bool GetFilename(clang::SourceLocation loc, std::string* filename);
(...skipping 11 matching lines...) Expand all
85 std::set<std::string> ignored_record_names_; 79 std::set<std::string> ignored_record_names_;
86 80
87 // List of decls to check once the current top-level decl is parsed. 81 // List of decls to check once the current top-level decl is parsed.
88 std::vector<clang::TagDecl*> pending_class_decls_; 82 std::vector<clang::TagDecl*> pending_class_decls_;
89 83
90 // TODO(tfarina): Remove once url/ directory compiles without warnings. 84 // TODO(tfarina): Remove once url/ directory compiles without warnings.
91 bool check_url_directory_; 85 bool check_url_directory_;
92 }; 86 };
93 87
94 #endif // TOOLS_CLANG_PLUGINS_CHROMECLASSTESTER_H_ 88 #endif // TOOLS_CLANG_PLUGINS_CHROMECLASSTESTER_H_
OLDNEW
« 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