Browse Source

Merge topic 'c++11-iwyu-decay-and-strip'

60afab9e IWYU: add mapping for std::__decay_and_strip

Acked-by: Kitware Robot <[email protected]>
Merge-request: !889
Brad King 8 years ago
parent
commit
048f0065bf
1 changed files with 13 additions and 0 deletions
  1. 13 0
      Utilities/IWYU/mapping.imp

+ 13 - 0
Utilities/IWYU/mapping.imp

@@ -53,6 +53,19 @@
   # This will still correctly require "cm_auto_ptr.hxx" for CM_AUTO_PTR.
   { symbol: [ "cm::auto_ptr", private, "\"cmConfigure.h\"", 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.
+  # TODO: Can this be simplified with an @-expression?
+  #{ symbol: [ "@std::__decay_and_strip<.*>::__type", private, "\"cmConfigure.h\"", public ] },
+  { symbol: [ "std::__decay_and_strip<cmCommand *&>::__type", private, "\"cmConfigure.h\"", public ] },
+  { symbol: [ "std::__decay_and_strip<cmGeneratorTarget *&>::__type", private, "\"cmConfigure.h\"", public ] },
+  { symbol: [ "std::__decay_and_strip<cmFindCommon::PathLabel &>::__type", private, "\"cmConfigure.h\"", public ] },
+  { symbol: [ "std::__decay_and_strip<std::basic_string<char> &>::__type", private, "\"cmConfigure.h\"", public ] },
+  { symbol: [ "std::__decay_and_strip<const std::basic_string<char> &>::__type", private, "\"cmConfigure.h\"", public ] },
+  { symbol: [ "std::__decay_and_strip<cmFindPackageCommand::PathLabel &>::__type", private, "\"cmConfigure.h\"", public ] },
+  { symbol: [ "std::__decay_and_strip<__gnu_cxx::__normal_iterator<const cmCTestTestHandler::cmCTestTestProperties *, std::vector<cmCTestTestHandler::cmCTestTestProperties, std::allocator<cmCTestTestHandler::cmCTestTestProperties> > > &>::__type", private, "\"cmConfigure.h\"", public ] },
+
   # Wrappers for headers added in TR1 / C++11
   # { include: [ "<array>", public, "\"cm_array.hxx\"", public ] },
   # { include: [ "<functional>", public, "\"cm_functional.hxx\"", public ] },