Skip to content

Commit 745ee60

Browse files
authored
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 <[email protected]>
1 parent b553e63 commit 745ee60

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

include/sta/Delay.hh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626

2727
#include "StaConfig.hh"
2828

29+
// IWYU pragma: begin_exports
2930
#if (SSTA == 1)
3031
// Delays are Normal PDFs.
3132
#include "DelayNormal1.hh"
@@ -36,6 +37,7 @@
3637
// Delays are floats.
3738
#include "DelayFloat.hh"
3839
#endif
40+
// IWYU pragma: end_exports
3941

4042
namespace sta {
4143

0 commit comments

Comments
 (0)