From 314fc2d182a99386d073ebc44f7924a7d99cba43 Mon Sep 17 00:00:00 2001 From: bungeman Date: Thu, 8 Mar 2018 14:10:42 -0500 Subject: [PATCH] is a part of . provides std::forward, std::move, and std::swap. These are defined to come from and not . In c++11 and later std::swap comes from , previously it came from . Fortunately, is a c++11 only header, so if any symbols are being seen in it, that's where they should come from. No test for this because mappings are non-portable. This was reported in #486. --- gcc.stl.headers.imp | 4 +--- iwyu_include_picker.cc | 4 +--- libcxx.imp | 2 +- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/gcc.stl.headers.imp b/gcc.stl.headers.imp index 625e448..b53e041 100644 --- a/gcc.stl.headers.imp +++ b/gcc.stl.headers.imp @@ -114,9 +114,7 @@ { include: ["", private, "", public ] }, { include: ["", private, "", public ] }, { include: ["", private, "", public ] }, - # This didn't come from the grep, but seems to be where swap() - # is defined? - { include: ["", private, "", public ] }, # for swap<>() + { include: ["", private, "", public ] }, # Hash and hashtable-based containers. { include: ["", private, "", public ] }, { include: ["", private, "", public ] }, diff --git a/iwyu_include_picker.cc b/iwyu_include_picker.cc index 840057f..55da73a 100644 --- a/iwyu_include_picker.cc +++ b/iwyu_include_picker.cc @@ -662,9 +662,7 @@ const IncludeMapEntry libstdcpp_include_map[] = { { "", kPrivate, "", kPublic }, { "", kPrivate, "", kPublic }, { "", kPrivate, "", kPublic }, - // This didn't come from the grep, but seems to be where swap() - // is defined? - { "", kPrivate, "", kPublic }, // for swap<>() + { "", kPrivate, "", kPublic }, // Hash and hashtable-based containers. { "", kPrivate, "", kPublic }, { "", kPrivate, "", kPublic }, diff --git a/libcxx.imp b/libcxx.imp index 7b1b61c..b65202a 100644 --- a/libcxx.imp +++ b/libcxx.imp @@ -4,7 +4,7 @@ { include: ["<__mutex_base>", private, "", public ] }, { symbol: [ "std::declval", private, "", public ] }, { symbol: [ "std::forward", private, "", public ] }, - { symbol: [ "std::move", private, "", public ] }, + { symbol: [ "std::move", private, "", public ] }, { symbol: [ "std::nullptr_t", private, "", public ] }, { symbol: [ "std::string", private, "", public ] }, ]