Mark choice of delay implementation with IWYU export pragma. (#300)

The Delay header is meant to provide the Delay implementation
to whoever is including it; it chooses the right implementation
via an include which this PR marks as providing a symbol that is
to be exported.

Without that annotation, tools such as `clang-tidy` or the `clangd` language server (as well as many other tools) will complain about headers not directly providing a symbol if users just include Delay.hh; With this annotation, they know.

Documentation about these IWYU pragmas:
https://clangd.llvm.org/design/include-cleaner#iwyu-pragmas
https://github.com/include-what-you-use/include-what-you-use/blob/master/docs/IWYUPragmas.md#iwyu-pragma-begin_exportsend_exports

Signed-off-by: Henner Zeller <h.zeller@acm.org>
This commit is contained in:
Henner Zeller 2025-10-04 17:50:11 +02:00 committed by GitHub
parent b553e636a0
commit 745ee606f9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 0 deletions

View File

@ -26,6 +26,7 @@
#include "StaConfig.hh" #include "StaConfig.hh"
// IWYU pragma: begin_exports
#if (SSTA == 1) #if (SSTA == 1)
// Delays are Normal PDFs. // Delays are Normal PDFs.
#include "DelayNormal1.hh" #include "DelayNormal1.hh"
@ -36,6 +37,7 @@
// Delays are floats. // Delays are floats.
#include "DelayFloat.hh" #include "DelayFloat.hh"
#endif #endif
// IWYU pragma: end_exports
namespace sta { namespace sta {