Skip to content

Commit

Permalink
Add appropriate IWYU pragma
Browse files Browse the repository at this point in the history
Summary:
I'm getting lint warnings when I try to use F14Map.h because our include check thinks that I should be including folly/container/detail/F14MapFallback.h directly. However, if you look at that header it says This file is intended to be included only by F14Map.h.

As such, this pragma I added should let our linter know that F14Map.h is the right way to actually use stuff from F14MapFallback.h.

```
   Advice  (CLANGTIDY) facebook-unused-include-check
    seemingly used include folly/container/F14Map.h only serves as an umbrella
    to other headers; you may want to include those directly instead; info/
    bugs: https://fburl.com/include
```

See the pragma's definitions:
https://github.com/include-what-you-use/include-what-you-use/blob/master/docs/IWYUPragmas.md#iwyu-pragma-export

Reviewed By: ot

Differential Revision: D66304705

fbshipit-source-id: 106d04a1981e9694a8e3494b41e0556b4bd59773
  • Loading branch information
Daniel Abramowitz authored and facebook-github-bot committed Nov 22, 2024
1 parent e5ff6c0 commit 7d79235
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion folly/container/F14Map.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,14 @@

#include <folly/container/F14Map-fwd.h>
#include <folly/container/Iterator.h>
#include <folly/container/detail/F14MapFallback.h>
#include <folly/container/detail/F14Policy.h>
#include <folly/container/detail/F14Table.h>
#include <folly/container/detail/Util.h>

// If !FOLLY_F14_VECTOR_INTRINSICS_AVAILABLE, fallback definitions are exported
// in this file
#include <folly/container/detail/F14MapFallback.h> // IWYU pragma: export

namespace folly {

#if FOLLY_F14_VECTOR_INTRINSICS_AVAILABLE
Expand Down

0 comments on commit 7d79235

Please sign in to comment.