Browse Source

IWYU: Map <*> headers to <cm/*> headers

For headers which exclusively contain things that were not present
in C++11.
Kyle Edwards 5 years ago
parent
commit
06c0d59c17
2 changed files with 6 additions and 2 deletions
  1. 0 1
      Tests/CMakeLib/testCMFilesystemPath.cxx
  2. 6 1
      Utilities/IWYU/mapping.imp

+ 0 - 1
Tests/CMakeLib/testCMFilesystemPath.cxx

@@ -8,7 +8,6 @@
 #include <vector>
 
 #include <cm/filesystem>
-#include <cm/iomanip>
 
 namespace {
 

+ 6 - 1
Utilities/IWYU/mapping.imp

@@ -27,7 +27,7 @@
   { include: [ "<bits/std_abs.h>", private, "<stdlib.h>", public ] },
   { include: [ "<bits/stdint-intn.h>", private, "<stdint.h>", public ] },
   { include: [ "<bits/stdint-uintn.h>", private, "<stdint.h>", public ] },
-  { include: [ "<bits/string_view.tcc>", private, "<string_view>", public ] },
+  { include: [ "<bits/string_view.tcc>", private, "<string_view>", private ] },
   { include: [ "<bits/time.h>", private, "<time.h>", public ] },
   { include: [ "<bits/types/clock_t.h>", private, "<time.h>", public ] },
   { include: [ "<bits/types/mbstate_t.h>", private, "<wchar.h>", public ] },
@@ -116,6 +116,11 @@
   { include: [ "<ostream>", public, "\"cmsys/FStream.hxx\"", public ] },
   { include: [ "<fstream>", public, "\"cmsys/FStream.hxx\"", public ] },
 
+  { include: [ "<filesystem>", private, "<cm/filesystem>", public ] },
+  { include: [ "<optional>", private, "<cm/optional>", public ] },
+  { include: [ "<shared_mutex>", private, "<cm/shared_mutex>", public ] },
+  { include: [ "<string_view>", private, "<cm/string_view>", public ] },
+
   # major and minor are used as macro arguments. Those are false matches.
   { symbol: [ "major", private, "\"cmVersion.h\"", public ] },
   { symbol: [ "minor", private, "\"cmVersion.h\"", public ] },