From 745ee606f93f1f0b2a3d13629c644a2a573515f2 Mon Sep 17 00:00:00 2001 From: Henner Zeller Date: Sat, 4 Oct 2025 17:50:11 +0200 Subject: [PATCH] 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 --- include/sta/Delay.hh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/sta/Delay.hh b/include/sta/Delay.hh index 32491141..236158c9 100644 --- a/include/sta/Delay.hh +++ b/include/sta/Delay.hh @@ -26,6 +26,7 @@ #include "StaConfig.hh" +// IWYU pragma: begin_exports #if (SSTA == 1) // Delays are Normal PDFs. #include "DelayNormal1.hh" @@ -36,6 +37,7 @@ // Delays are floats. #include "DelayFloat.hh" #endif +// IWYU pragma: end_exports namespace sta {