summaryrefslogtreecommitdiffstats
path: root/bin/find-unneeded-includes
diff options
context:
space:
mode:
Diffstat (limited to 'bin/find-unneeded-includes')
-rwxr-xr-xbin/find-unneeded-includes9
1 files changed, 8 insertions, 1 deletions
diff --git a/bin/find-unneeded-includes b/bin/find-unneeded-includes
index de91a3570231..7cc933ff6c9a 100755
--- a/bin/find-unneeded-includes
+++ b/bin/find-unneeded-includes
@@ -145,8 +145,15 @@ def processIWYUOutput(iwyuOutput, moduleRules):
toRemove.append("%s:%s: %s" % (currentFileName, lineno, include))
continue
+ match = re.match("- (.*); // lines (.*)-.*", line)
+ if match:
+ fwdDecl = match.group(1)
+ lineno = match.group(2)
+ if not ignoreRemoval(fwdDecl, toAdd, currentFileName, moduleRules):
+ toRemove.append("%s:%s: %s" % (currentFileName, lineno, fwdDecl))
+
for remove in toRemove:
- print("ERROR: %s: remove not needed include" % remove)
+ print("ERROR: %s: remove not needed include / forward declaration" % remove)
return len(toRemove)