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

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

Issue 1372833002: Update the clang plugin to optionally enforce rules for Blink code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ooookay, emplace it is Created 5 years, 2 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
« 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 bool IsIgnoredType(const std::string& base_name); 78 bool IsIgnoredType(const std::string& base_name);
79 79
80 // Attempts to determine the filename for the given SourceLocation. 80 // Attempts to determine the filename for the given SourceLocation.
81 // Returns false if the filename could not be determined. 81 // Returns false if the filename could not be determined.
82 bool GetFilename(clang::SourceLocation loc, std::string* filename); 82 bool GetFilename(clang::SourceLocation loc, std::string* filename);
83 83
84 clang::CompilerInstance& instance_; 84 clang::CompilerInstance& instance_;
85 clang::DiagnosticsEngine& diagnostic_; 85 clang::DiagnosticsEngine& diagnostic_;
86 86
87 // List of banned namespaces. 87 // List of banned namespaces.
88 std::vector<std::string> banned_namespaces_; 88 std::set<std::string> banned_namespaces_;
89
90 // List of directories allowed even though their parent directories are in
91 // |banned_directories_|, below.
92 std::set<std::string> allowed_directories_;
89 93
90 // List of banned directories. 94 // List of banned directories.
91 std::vector<std::string> banned_directories_; 95 std::set<std::string> banned_directories_;
92 96
93 // List of types that we don't check. 97 // List of types that we don't check.
94 std::set<std::string> ignored_record_names_; 98 std::set<std::string> ignored_record_names_;
95 99
96 // List of decls to check once the current top-level decl is parsed. 100 // List of decls to check once the current top-level decl is parsed.
97 std::vector<clang::TagDecl*> pending_class_decls_; 101 std::vector<clang::TagDecl*> pending_class_decls_;
98 }; 102 };
99 103
100 #endif // TOOLS_CLANG_PLUGINS_CHROMECLASSTESTER_H_ 104 #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