From e5fdbcc9da3855f5301f62d2d7ba39ad039ce7d4 Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 21 Nov 2017 14:20:37 -0500 Subject: IWYU: Add more mappings for std::__decay_and_strip IWYU incorrectly classifies this internal STL type as not internal, and suggests including `` for it. Work around the problem by mapping the offending names to a file that we always include. See include-what-you-use issue 434. --- Utilities/IWYU/mapping.imp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Utilities/IWYU/mapping.imp b/Utilities/IWYU/mapping.imp index 3240edf..6477d59 100644 --- a/Utilities/IWYU/mapping.imp +++ b/Utilities/IWYU/mapping.imp @@ -52,11 +52,13 @@ # __decay_and_strip is used internally in the C++11 standard library. # IWYU does not classify it as internal and suggests to add . # To ignore it, we simply map it to a file that is included anyway. + # Use '-Xiwyu -v7' to see the fully qualified names that need this. # TODO: Can this be simplified with an @-expression? #{ symbol: [ "@std::__decay_and_strip<.*>::__type", private, "\"cmConfigure.h\"", public ] }, { symbol: [ "std::__decay_and_strip::__type", private, "\"cmConfigure.h\"", public ] }, { symbol: [ "std::__decay_and_strip::__type", private, "\"cmConfigure.h\"", public ] }, { symbol: [ "std::__decay_and_strip::__type", private, "\"cmConfigure.h\"", public ] }, + { symbol: [ "std::__decay_and_strip::__type", private, "\"cmConfigure.h\"", public ] }, { symbol: [ "std::__decay_and_strip &>::__type", private, "\"cmConfigure.h\"", public ] }, { symbol: [ "std::__decay_and_strip &>::__type", private, "\"cmConfigure.h\"", public ] }, { symbol: [ "std::__decay_and_strip::__type", private, "\"cmConfigure.h\"", public ] }, -- cgit v0.12