summaryrefslogtreecommitdiffstats
path: root/cc
diff options
context:
space:
mode:
authordanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-11 04:36:20 +0000
committerdanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-11 04:36:20 +0000
commit46de9e716e27b2896ea5ce61930c059b57a09fde (patch)
treec0523abd512d26ba614405a27c3ce0bb35d3e5d1 /cc
parent3a4e726bcf9ea490452696375359792a3ee317fa (diff)
downloadchromium_src-46de9e716e27b2896ea5ce61930c059b57a09fde.zip
chromium_src-46de9e716e27b2896ea5ce61930c059b57a09fde.tar.gz
chromium_src-46de9e716e27b2896ea5ce61930c059b57a09fde.tar.bz2
cc: Make include-what-you-use know about base/hash_tables.h
For hash_map and hash_set, we should be including base/hash_tables.h instead of <hash_map> or <hash_set>. This teaches cpplint about this fact. NOTRY=true R=enne BUG= Review URL: https://chromiumcodereview.appspot.com/14137003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193570 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc')
-rw-r--r--cc/PRESUBMIT.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/cc/PRESUBMIT.py b/cc/PRESUBMIT.py
index cf9737e..f49515f 100644
--- a/cc/PRESUBMIT.py
+++ b/cc/PRESUBMIT.py
@@ -22,6 +22,14 @@ def CheckChangeLintsClean(input_api, output_api):
input_api.AffectedSourceFiles(source_filter)]
level = 1 # strict, but just warn
+ # Replace <hash_map> and <hash_set> as headers that need to be included
+ # with "base/hash_tables.h" instead.
+ cpplint._re_pattern_templates = [
+ (a,b,'base/hash_tables.h') if (header == '<hash_map>' or
+ header == '<hash_set>')
+ else (a,b,header)
+ for (a,b,header) in cpplint._re_pattern_templates]
+
for file_name in files:
cpplint.ProcessFile(file_name, level)