bin/find-unneeded-includes      |   10 ++++-----
 include/IwyuFilter_include.yaml |   44 ----------------------------------------
 2 files changed, 5 insertions(+), 49 deletions(-)

New commits:
commit 49875a0162dc73ed856ab6614bcdb6155897893f
Author:     Gabor Kelemen <[email protected]>
AuthorDate: Mon Feb 9 15:15:41 2026 +0100
Commit:     Gabor Kelemen <[email protected]>
CommitDate: Wed Feb 18 19:51:24 2026 +0100

    Remove obsolete IWYU exclusions related to include/connectivity/
    
    Found with bin/find-unneeded-includes --headersfwd --recursive 
include/connectivity/
    
    There were no new replacement suggestions
    
    Change-Id: I1548849490d1bad36c46c8dca0f914dfb4960bc0
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199383
    Tested-by: Jenkins
    Reviewed-by: Gabor Kelemen <[email protected]>

diff --git a/include/IwyuFilter_include.yaml b/include/IwyuFilter_include.yaml
index 003ba340e614..f321e4f98a6b 100644
--- a/include/IwyuFilter_include.yaml
+++ b/include/IwyuFilter_include.yaml
@@ -529,53 +529,9 @@ excludelist:
     - cppuhelper/supportsservice.hxx
     # Needed for HAVE_FEATURE_JAVA
     - rtl/ref.hxx
-    include/connectivity/ConnectionWrapper.hxx:
-    # base class has to be a complete type
-    - com/sun/star/lang/XUnoTunnel.hpp
-    - com/sun/star/lang/XServiceInfo.hpp
-    include/connectivity/conncleanup.hxx:
-    # base class has to be a complete type
-    - com/sun/star/beans/XPropertyChangeListener.hpp
-    - com/sun/star/sdbc/XRowSetListener.hpp
-    include/connectivity/parameters.hxx:
-    # base class has to be a complete type
-    - com/sun/star/sdb/XSingleSelectQueryComposer.hpp
-    include/connectivity/paramwrapper.hxx:
-    # base class has to be a complete type
-    - com/sun/star/container/XEnumerationAccess.hpp
-    - com/sun/star/container/XIndexAccess.hpp
     include/connectivity/sdbcx/VCollection.hxx:
     # base class has to be a complete type
-    - com/sun/star/container/XNameAccess.hpp
-    - com/sun/star/container/XIndexAccess.hpp
-    - com/sun/star/container/XEnumerationAccess.hpp
-    - com/sun/star/container/XContainer.hpp
-    - com/sun/star/sdbc/XColumnLocate.hpp
-    - com/sun/star/util/XRefreshable.hpp
-    - com/sun/star/sdbcx/XDataDescriptorFactory.hpp
-    - com/sun/star/sdbcx/XAppend.hpp
-    - com/sun/star/sdbcx/XDrop.hpp
-    - com/sun/star/lang/XServiceInfo.hpp
     - com/sun/star/beans/XPropertySet.hpp
-    include/connectivity/sdbcx/VColumn.hxx:
-    # base class has to be a complete type
-    - com/sun/star/container/XNamed.hpp
-    - com/sun/star/lang/XServiceInfo.hpp
-    - com/sun/star/sdbcx/XDataDescriptorFactory.hpp
-    include/connectivity/sdbcx/VTable.hxx:
-    # base class has to be a complete type
-    - com/sun/star/container/XNamed.hpp
-    - com/sun/star/lang/XServiceInfo.hpp
-    - com/sun/star/sdbcx/XAlterTable.hpp
-    - com/sun/star/sdbcx/XColumnsSupplier.hpp
-    - com/sun/star/sdbcx/XDataDescriptorFactory.hpp
-    - com/sun/star/sdbcx/XIndexesSupplier.hpp
-    - com/sun/star/sdbcx/XKeysSupplier.hpp
-    - com/sun/star/sdbcx/XRename.hpp
-    include/connectivity/sdbcx/VView.hxx:
-    # base class has to be a complete type
-    - com/sun/star/container/XNamed.hpp
-    - com/sun/star/lang/XServiceInfo.hpp
     include/drawinglayer/primitive2d/baseprimitive2d.hxx:
     # base class has to be a complete type
     - com/sun/star/graphic/XPrimitive2D.hpp
commit 77048c10d2c7c5c8cddd0f21b691651c9b402cb4
Author:     Gabor Kelemen <[email protected]>
AuthorDate: Mon Feb 9 13:16:56 2026 +0100
Commit:     Gabor Kelemen <[email protected]>
CommitDate: Wed Feb 18 19:51:12 2026 +0100

    bin/find-unneeded-includes: warn about obsolete header exclusions...
    
    only in headersfwd mode.
    This check ran in --headers mode as well, giving contradicting advice
    compared to headersfwd mode.
    
    Apply the check only in headersfwd mode for consistency
    
    Change-Id: Icf58bbb6c47d0a736c2da5d253fe292d6e58a427
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199381
    Tested-by: Jenkins
    Reviewed-by: Gabor Kelemen <[email protected]>

diff --git a/bin/find-unneeded-includes b/bin/find-unneeded-includes
index 99b69b2ded65..1c8a674cc066 100755
--- a/bin/find-unneeded-includes
+++ b/bin/find-unneeded-includes
@@ -151,7 +151,7 @@ def unwrapInclude(include):
     return include[1:-1]
 
 
-def processIWYUOutput(iwyuOutput, moduleRules, fileName, noexclude, 
checknamespaces, finderrors, removefwdd):
+def processIWYUOutput(iwyuOutput, moduleRules, fileName, noexclude, 
checknamespaces, finderrors, removefwdd, headersfwd):
     inAdd = False
     toAdd = []
     inRemove = False
@@ -264,7 +264,7 @@ def processIWYUOutput(iwyuOutput, moduleRules, fileName, 
noexclude, checknamespa
                     # check if a hpp files hdl pair is now considered necessary
                     # then there is no need for an explicit exclusion
                     hdlMatch = re.match(".*.hdl", include)
-                    if hdlMatch:
+                    if hdlMatch and headersfwd:
                         hdl = include.replace(".hdl", ".hpp")
                         if hdl in excludelistRules[realFileName]:
                             print("WARNING:", hdl, "excluded header can be 
removed from exclusion list of file:", realFileName)
@@ -452,13 +452,13 @@ def processIWYUOutput(iwyuOutput, moduleRules, fileName, 
noexclude, checknamespa
     return len(toRemove)
 
 
-def run_tool(task_queue, failed_files, noexclude, checknamespaces, finderrors, 
removefwdd):
+def run_tool(task_queue, failed_files, noexclude, checknamespaces, finderrors, 
removefwdd, headersfwd):
     while True:
         invocation, moduleRules = task_queue.get()
         if not len(failed_files):
             print("[IWYU] " + invocation.split(' ')[-1])
             p = subprocess.Popen(invocation, shell=True, 
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
-            retcode = 
processIWYUOutput(p.communicate()[0].decode('utf-8').splitlines(), moduleRules, 
invocation.split(' ')[-1], noexclude, checknamespaces, finderrors, removefwdd)
+            retcode = 
processIWYUOutput(p.communicate()[0].decode('utf-8').splitlines(), moduleRules, 
invocation.split(' ')[-1], noexclude, checknamespaces, finderrors, removefwdd, 
headersfwd)
             if finderrors:
                 if p.returncode == 1:
                     print("Running the IWYU process returned error code:
" + invocation)
@@ -609,7 +609,7 @@ def tidy(compileCommands, paths, noexclude, 
checknamespaces, finderrors, removef
         task_queue = queue.Queue(max_task)
         failed_files = []
         for _ in range(max_task):
-            t = threading.Thread(target=run_tool, args=(task_queue, 
failed_files, noexclude, checknamespaces, finderrors, removefwdd))
+            t = threading.Thread(target=run_tool, args=(task_queue, 
failed_files, noexclude, checknamespaces, finderrors, removefwdd, headersfwd))
             t.daemon = True
             t.start()
 

Reply via email to