From c902405f5f78a6efe7e69a4117133508b794abd0 Mon Sep 17 00:00:00 2001 From: firewave Date: Thu, 10 Aug 2023 11:55:19 +0200 Subject: [PATCH] fixed `misc-include-cleaner` clang-tidy warnings --- main.cpp | 7 ++++++- simplecpp.cpp | 7 +++++++ test.cpp | 11 +++++++++-- 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/main.cpp b/main.cpp index 7516085f..da66f59e 100644 --- a/main.cpp +++ b/main.cpp @@ -18,9 +18,14 @@ #include "simplecpp.h" +#include +#include #include #include -#include +#include +#include +#include +#include int main(int argc, char **argv) { diff --git a/simplecpp.cpp b/simplecpp.cpp index ced7ab93..bf94e60d 100755 --- a/simplecpp.cpp +++ b/simplecpp.cpp @@ -24,6 +24,7 @@ #include #include +#include #include #include #include @@ -33,13 +34,18 @@ #include // IWYU pragma: keep #include #include +#include +#include +#include #include // IWYU pragma: keep #include #include +#include #if __cplusplus >= 201103L #include #endif #include +#include #ifdef SIMPLECPP_WINDOWS #include @@ -3132,6 +3138,7 @@ static void getLocaltime(struct tm <ime) time_t t; time(&t); #ifndef _WIN32 + // NOLINTNEXTLINE(misc-include-cleaner) - false positive localtime_r(&t, <ime); #else localtime_s(<ime, &t); diff --git a/test.cpp b/test.cpp index 4d38db37..5c7142c0 100644 --- a/test.cpp +++ b/test.cpp @@ -16,11 +16,18 @@ * License along with this library. If not, see . */ +#include "simplecpp.h" + +#include +#include +#include +#include #include -#include +#include #include +#include +#include #include -#include "simplecpp.h" static int numberOfFailedAssertions = 0;