From 71fbebd1dc3a24e2478bb5704d9ac20f36cbf704 Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 10 Jul 2019 11:38:48 -0400 Subject: IWYU: Fix handling of standard header An old workaround for `std::allocator_traits<>::value_type` lints from IWYU on `std::vector<>` usage breaks IWYU's handling of ``. Convert the workaround to use the same approach we already use for a workaround of `std::__decay_and_strip<>::::__type` lints. Then update the `` inclusions to follow the now-correct IWYU lints. --- Utilities/IWYU/mapping.imp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'Utilities/IWYU') diff --git a/Utilities/IWYU/mapping.imp b/Utilities/IWYU/mapping.imp index 0393ff199e..4e00214f91 100644 --- a/Utilities/IWYU/mapping.imp +++ b/Utilities/IWYU/mapping.imp @@ -42,10 +42,17 @@ { symbol: [ "std::istringstream", private, "", public ] }, { symbol: [ "std::ostringstream", private, "", public ] }, - # HACK: iwyu suggests those two files each time vector[] is used. + # HACK: iwyu suggests and each time vector[] is used. # https://github.com/include-what-you-use/include-what-you-use/issues/166 { include: [ "", private, "", public ] }, - { include: [ "", public, "", public ] }, + { symbol: [ "std::allocator_traits >::value_type", private, "", public ] }, + { symbol: [ "std::allocator_traits >::value_type", private, "", public ] }, + { symbol: [ "std::allocator_traits >::value_type", private, "", public ] }, + { symbol: [ "std::allocator_traits >::value_type", private, "", public ] }, + { symbol: [ "std::allocator_traits >::value_type", private, "", public ] }, + { symbol: [ "std::allocator_traits > >::value_type", private, "", public ] }, + { symbol: [ "std::allocator_traits, std::allocator > > > >::value_type", private, "", public ] }, + { symbol: [ "std::allocator_traits >::value_type", private, "", public ] }, # TODO: enable this block and remove some includes? #{ symbol: [ "std::pair", private, "", public ] }, -- cgit v1.2.1