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

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

Issue 185543003: Remove check_url_directory flag from clang plugin. (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
11 #include "clang/AST/ASTConsumer.h" 11 #include "clang/AST/ASTConsumer.h"
12 #include "clang/AST/TypeLoc.h" 12 #include "clang/AST/TypeLoc.h"
13 #include "clang/Frontend/CompilerInstance.h" 13 #include "clang/Frontend/CompilerInstance.h"
14 14
15 // A class on top of ASTConsumer that forwards classes defined in Chromium 15 // A class on top of ASTConsumer that forwards classes defined in Chromium
16 // headers to subclasses which implement CheckChromeClass(). 16 // headers to subclasses which implement CheckChromeClass().
17 class ChromeClassTester : public clang::ASTConsumer { 17 class ChromeClassTester : public clang::ASTConsumer {
18 public: 18 public:
19 explicit ChromeClassTester(clang::CompilerInstance& instance, 19 explicit ChromeClassTester(clang::CompilerInstance& instance);
20 bool check_url_directory);
21 virtual ~ChromeClassTester(); 20 virtual ~ChromeClassTester();
22 21
23 // clang::ASTConsumer: 22 // clang::ASTConsumer:
24 virtual void HandleTagDeclDefinition(clang::TagDecl* tag); 23 virtual void HandleTagDeclDefinition(clang::TagDecl* tag);
25 virtual bool HandleTopLevelDecl(clang::DeclGroupRef group_ref); 24 virtual bool HandleTopLevelDecl(clang::DeclGroupRef group_ref);
26 25
27 protected: 26 protected:
28 clang::CompilerInstance& instance() { return instance_; } 27 clang::CompilerInstance& instance() { return instance_; }
29 clang::DiagnosticsEngine& diagnostic() { return diagnostic_; } 28 clang::DiagnosticsEngine& diagnostic() { return diagnostic_; }
30 29
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 std::vector<std::string> banned_namespaces_; 78 std::vector<std::string> banned_namespaces_;
80 79
81 // List of banned directories. 80 // List of banned directories.
82 std::vector<std::string> banned_directories_; 81 std::vector<std::string> banned_directories_;
83 82
84 // List of types that we don't check. 83 // List of types that we don't check.
85 std::set<std::string> ignored_record_names_; 84 std::set<std::string> ignored_record_names_;
86 85
87 // List of decls to check once the current top-level decl is parsed. 86 // List of decls to check once the current top-level decl is parsed.
88 std::vector<clang::TagDecl*> pending_class_decls_; 87 std::vector<clang::TagDecl*> pending_class_decls_;
89
90 // TODO(tfarina): Remove once url/ directory compiles without warnings.
91 bool check_url_directory_;
92 }; 88 };
93 89
94 #endif // TOOLS_CLANG_PLUGINS_CHROMECLASSTESTER_H_ 90 #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