Support C++11 types in build/include_what_you_use
This is a cherry-pick of https://github.com/google/styleguide/pull/159
(plus some code that it depends on).
BUG=627514
TEST=cpplint_unittest.py
Review-Url: https://codereview.chromium.org/2146553003
diff --git a/cpplint.py b/cpplint.py
index 1b2a373..2f460a4 100755
--- a/cpplint.py
+++ b/cpplint.py
@@ -5244,12 +5244,15 @@
('<limits>', ('numeric_limits',)),
('<list>', ('list',)),
('<map>', ('map', 'multimap',)),
- ('<memory>', ('allocator',)),
+ ('<memory>', ('allocator', 'make_shared', 'make_unique', 'shared_ptr',
+ 'unique_ptr', 'weak_ptr')),
('<queue>', ('queue', 'priority_queue',)),
('<set>', ('set', 'multiset',)),
('<stack>', ('stack',)),
('<string>', ('char_traits', 'basic_string',)),
('<tuple>', ('tuple',)),
+ ('<unordered_map>', ('unordered_map', 'unordered_multimap')),
+ ('<unordered_set>', ('unordered_set', 'unordered_multiset')),
('<utility>', ('pair',)),
('<vector>', ('vector',)),
@@ -5264,7 +5267,7 @@
('<algorithm>', ('copy', 'max', 'min', 'min_element', 'sort',
'transform',
)),
- ('<utility>', ('swap',)),
+ ('<utility>', ('forward', 'make_pair', 'move', 'swap')),
)
_RE_PATTERN_STRING = re.compile(r'\bstring\b')