From f93ae0455c4d515be1ca663725a6e58d64a7e393 Mon Sep 17 00:00:00 2001 From: Gabor Kelemen Date: Sat, 3 Feb 2024 18:03:45 +0100 Subject: Check bridges with IWYU Only the parts tha build on x64 arch See tdf#42949 for motivation Change-Id: Ifa3c5107887f5ab7837beee83d9603e8c883a7a5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162961 Tested-by: Jenkins Reviewed-by: Thorsten Behrens --- bridges/IwyuFilter_bridges.yaml | 13 +++++++++++++ bridges/source/cpp_uno/gcc3_linux_x86-64/abi.cxx | 1 - bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx | 4 ---- bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx | 1 + bridges/source/cpp_uno/gcc3_linux_x86-64/rtti.cxx | 2 +- bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx | 2 -- bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx | 4 ---- bridges/source/cpp_uno/shared/bridge.cxx | 1 - bridges/source/cpp_uno/shared/component.cxx | 2 -- bridges/source/cpp_uno/shared/vtablefactory.cxx | 2 -- bridges/source/jni_uno/jni_base.h | 4 ---- bridges/source/jni_uno/jni_bridge.cxx | 2 +- bridges/source/jni_uno/jni_bridge.h | 7 ++----- bridges/source/jni_uno/jni_data.cxx | 1 + bridges/source/jni_uno/jni_info.cxx | 3 +-- bridges/source/jni_uno/jni_info.h | 1 - bridges/source/jni_uno/jni_java2uno.cxx | 5 +++-- bridges/source/jni_uno/jni_uno2java.cxx | 3 +-- 18 files changed, 24 insertions(+), 34 deletions(-) create mode 100644 bridges/IwyuFilter_bridges.yaml (limited to 'bridges') diff --git a/bridges/IwyuFilter_bridges.yaml b/bridges/IwyuFilter_bridges.yaml new file mode 100644 index 000000000000..071db0504370 --- /dev/null +++ b/bridges/IwyuFilter_bridges.yaml @@ -0,0 +1,13 @@ +--- +assumeFilename: bridges/source/cpp_uno/gcc3_linux_x86-64/abi.cxx +excludelist: + bridges/source/cpp_uno/gcc3_linux_x86-64/abi.hxx: + # No .hxx -> .h replacement in URE headers + - typelib/typedescription.hxx + bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx: + # No .hxx -> .h replacement in URE headers + - typelib/typedescription.hxx + bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx: + # Actually needed + - callvirtualmethod.hxx + - share.hxx diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/abi.cxx b/bridges/source/cpp_uno/gcc3_linux_x86-64/abi.cxx index 243e42d057e8..4f724dbb6861 100644 --- a/bridges/source/cpp_uno/gcc3_linux_x86-64/abi.cxx +++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/abi.cxx @@ -55,7 +55,6 @@ #include "abi.hxx" #include -#include using namespace x86_64; diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx index bd6d9e61796d..eb57c2ac92c5 100644 --- a/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx +++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx @@ -18,9 +18,6 @@ */ -#include - -#include #include #include @@ -36,7 +33,6 @@ #include "abi.hxx" #include "call.hxx" -#include "rtti.hxx" #include "share.hxx" using namespace ::com::sun::star::uno; diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx b/bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx index daee12731ef1..ed62f404f439 100644 --- a/bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx +++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx @@ -28,6 +28,7 @@ #include "rtti.hxx" #include "share.hxx" +#include using namespace ::std; using namespace ::com::sun::star::uno; diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/rtti.cxx b/bridges/source/cpp_uno/gcc3_linux_x86-64/rtti.cxx index 9bce77bc8468..eeff17303990 100644 --- a/bridges/source/cpp_uno/gcc3_linux_x86-64/rtti.cxx +++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/rtti.cxx @@ -20,6 +20,7 @@ #include #include +#include #include #include #include @@ -36,7 +37,6 @@ #include #include "rtti.hxx" -#include "share.hxx" namespace { diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx b/bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx index d7657bcc04be..6752eeaf6c3d 100644 --- a/bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx +++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx @@ -21,9 +21,7 @@ #include #include -#include -#include #ifndef _GLIBCXX_CDTOR_CALLABI // new in GCC 4.7 cxxabi.h #define _GLIBCXX_CDTOR_CALLABI #endif diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx index 496702120ab4..25277857f82e 100644 --- a/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx +++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx @@ -17,13 +17,9 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include - #include #include -#include - #include #include #include diff --git a/bridges/source/cpp_uno/shared/bridge.cxx b/bridges/source/cpp_uno/shared/bridge.cxx index 3753341ccde2..ddd34e4ed380 100644 --- a/bridges/source/cpp_uno/shared/bridge.cxx +++ b/bridges/source/cpp_uno/shared/bridge.cxx @@ -25,7 +25,6 @@ #include #include -#include #include #include #include diff --git a/bridges/source/cpp_uno/shared/component.cxx b/bridges/source/cpp_uno/shared/component.cxx index 0a2f1a25150f..26d37af506ac 100644 --- a/bridges/source/cpp_uno/shared/component.cxx +++ b/bridges/source/cpp_uno/shared/component.cxx @@ -22,8 +22,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/bridges/source/cpp_uno/shared/vtablefactory.cxx b/bridges/source/cpp_uno/shared/vtablefactory.cxx index 53b516cded5a..8d139091b4fc 100644 --- a/bridges/source/cpp_uno/shared/vtablefactory.cxx +++ b/bridges/source/cpp_uno/shared/vtablefactory.cxx @@ -25,12 +25,10 @@ #include #include #include -#include #include #include #include #include -#include #include #include diff --git a/bridges/source/jni_uno/jni_base.h b/bridges/source/jni_uno/jni_base.h index 0d02261adb2a..ce4f2833f6c7 100644 --- a/bridges/source/jni_uno/jni_base.h +++ b/bridges/source/jni_uno/jni_base.h @@ -26,14 +26,10 @@ #include #include -#include - -#include #include #include #include -#include #include diff --git a/bridges/source/jni_uno/jni_bridge.cxx b/bridges/source/jni_uno/jni_bridge.cxx index 5e09a8899690..c0465424ed4e 100644 --- a/bridges/source/jni_uno/jni_bridge.cxx +++ b/bridges/source/jni_uno/jni_bridge.cxx @@ -24,11 +24,11 @@ #include #include "jni_bridge.h" +#include "jni_helper.h" #include "jniunoenvironmentdata.hxx" #include #include -#include #include using namespace ::jni_uno; diff --git a/bridges/source/jni_uno/jni_bridge.h b/bridges/source/jni_uno/jni_bridge.h index ea55a139158b..ededca12c9f8 100644 --- a/bridges/source/jni_uno/jni_bridge.h +++ b/bridges/source/jni_uno/jni_bridge.h @@ -25,14 +25,11 @@ #include #include "jni_base.h" -#include "jni_helper.h" - -#include +#include "jni_info.h" #include #include - -#include +#include namespace jni_uno diff --git a/bridges/source/jni_uno/jni_data.cxx b/bridges/source/jni_uno/jni_data.cxx index 06e8467f7e7c..15abb31f5690 100644 --- a/bridges/source/jni_uno/jni_data.cxx +++ b/bridges/source/jni_uno/jni_data.cxx @@ -23,6 +23,7 @@ #include #include "jni_bridge.h" +#include "jni_helper.h" #include #include diff --git a/bridges/source/jni_uno/jni_info.cxx b/bridges/source/jni_uno/jni_info.cxx index a48412897d1b..a1a837545530 100644 --- a/bridges/source/jni_uno/jni_info.cxx +++ b/bridges/source/jni_uno/jni_info.cxx @@ -21,14 +21,13 @@ #include -#include "jni_bridge.h" +#include "jni_helper.h" #include #include #include #include -#include #include diff --git a/bridges/source/jni_uno/jni_info.h b/bridges/source/jni_uno/jni_info.h index 7a18e553e400..492531759574 100644 --- a/bridges/source/jni_uno/jni_info.h +++ b/bridges/source/jni_uno/jni_info.h @@ -30,7 +30,6 @@ #include #include -#include #include #include diff --git a/bridges/source/jni_uno/jni_java2uno.cxx b/bridges/source/jni_uno/jni_java2uno.cxx index 53f761e82657..600fbdbcee7e 100644 --- a/bridges/source/jni_uno/jni_java2uno.cxx +++ b/bridges/source/jni_uno/jni_java2uno.cxx @@ -23,11 +23,12 @@ #include #include -#include - #include "jni_bridge.h" +#include "jni_helper.h" #include "jniunoenvironmentdata.hxx" +#include + namespace jni_uno { diff --git a/bridges/source/jni_uno/jni_uno2java.cxx b/bridges/source/jni_uno/jni_uno2java.cxx index 98666dfc1929..83cedc1212dc 100644 --- a/bridges/source/jni_uno/jni_uno2java.cxx +++ b/bridges/source/jni_uno/jni_uno2java.cxx @@ -25,14 +25,13 @@ #include #include -#include - #include #include #include #include "jni_bridge.h" +#include "jni_helper.h" #include "jniunoenvironmentdata.hxx" namespace -- cgit