Skip to content

Commit

Permalink
Add IWYU pragmas in header meant to export other headers.
Browse files Browse the repository at this point in the history
clang-tidy usually would complain if not a direct header for a particular
symbol is included.

The uhdm.h header is meant as a 'catchall' header that provides all
the symbols in all the headers is includes. So mark them as such so that
toolings understand that this is the intention.

A common way is to use the IWYU pragmas for that:
https://github.com/include-what-you-use/include-what-you-use/blob/master/docs/IWYUPragmas.md#iwyu-pragma-begin_exportsend_exports
  • Loading branch information
hzeller committed Nov 13, 2024
1 parent 857f68d commit ddca367
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions templates/uhdm.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@
#ifndef UHDM_UHDM_H
#define UHDM_UHDM_H

#include <string>
#include <vector>
#include <set>
// IWYU pragma: begin_exports

#include <uhdm/sv_vpi_user.h>
#include <uhdm/vhpi_user.h>
Expand All @@ -41,4 +39,6 @@

#include <uhdm/Serializer.h>

// IWYU pragma: end_exports

#endif // UHDM_UHDM_H

0 comments on commit ddca367

Please sign in to comment.