diff options
author | Brad King <brad.king@kitware.com> | 2018-07-31 13:27:29 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-07-31 13:34:55 (GMT) |
commit | 276d3c7afe45f26232cf1e9664ad34037d28a52a (patch) | |
tree | 0e107b4d5e613379b056f710e3c74c32370b92ed /Utilities/IWYU | |
parent | 72f57845d3ad8cd401ca1c847ae8dd890d40a0b8 (diff) | |
download | CMake-276d3c7afe45f26232cf1e9664ad34037d28a52a.zip CMake-276d3c7afe45f26232cf1e9664ad34037d28a52a.tar.gz CMake-276d3c7afe45f26232cf1e9664ad34037d28a52a.tar.bz2 |
IWYU: Add workaround mapping for std::hash
When using GCC 8's standard library IWYU thinks that `<system_error>`
must be included to get `std::hash`. Add a mapping for `<utility>`.
Diffstat (limited to 'Utilities/IWYU')
-rw-r--r-- | Utilities/IWYU/mapping.imp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Utilities/IWYU/mapping.imp b/Utilities/IWYU/mapping.imp index 892cdcb..77bb572 100644 --- a/Utilities/IWYU/mapping.imp +++ b/Utilities/IWYU/mapping.imp @@ -52,6 +52,9 @@ #{ symbol: [ "std::pair", private, "<map>", public ] }, #{ symbol: [ "std::pair", private, "<set>", public ] }, + # HACK: iwyu wrongly thinks that <system_error> is needed for std::hash + { symbol: [ "std::hash", private, "<utility>", public ] }, + # __decay_and_strip is used internally in the C++11 standard library. # IWYU does not classify it as internal and suggests to add <type_traits>. # To ignore it, we simply map it to a file that is included anyway. |