diff --git a/docs/pages/release_notes.md b/docs/pages/release_notes.md
index d528319952..4c1d41105e 100644
--- a/docs/pages/release_notes.md
+++ b/docs/pages/release_notes.md
@@ -22,8 +22,8 @@ This is a {{ site.pmd.release_type }} release.
#### Improved Incremental Analysis
[Incremental Analysis](https://pmd.github.io/pmd-6.36.0/pmd_userdocs_incremental_analysis.html) has long helped
-our users obtain faster analysis results, however, it's implementation tended to be too cautious in detecting
-changes to the runtime and type resolution classpaths, producing more cache invalidations than were necessary.
+our users obtain faster analysis results, however, its implementation tended to be too cautious in detecting
+changes to the runtime and type resolution classpaths, producing more cache invalidations than necessary.
We have now improved the heuristics to remove several bogus invalidations, and slightly sped up the cache
usage along the way.
@@ -70,6 +70,7 @@ PMD will now ignore:
* [#3323](https://github.com/pmd/pmd/pull/3323): \[core] Adds fullDescription and tags in SARIF report
* java-bestpractices
* [#957](https://github.com/pmd/pmd/issues/957): \[java] GuardLogStatement: False positive with compile-time constant arguments
+ * [#3076](https://github.com/pmd/pmd/pull/3076): \[java] UnusedAssignment reports unused variable when used in increment expr
* [#3114](https://github.com/pmd/pmd/issues/3114): \[java] UnusedAssignment false positive when reporting unused variables
* [#3315](https://github.com/pmd/pmd/issues/3315): \[java] LiteralsFirstInComparisons false positive with two constants
* [#3341](https://github.com/pmd/pmd/issues/3341): \[java] JUnitTestsShouldIncludeAssert should support Junit 5
diff --git a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/rule/internal/DataflowPass.java b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/rule/internal/DataflowPass.java
index a1292e8d42..4ed0cc44b0 100644
--- a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/rule/internal/DataflowPass.java
+++ b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/rule/internal/DataflowPass.java
@@ -770,6 +770,7 @@ public final class DataflowPass {
@Override
public SpanInfo visit(ASTUnaryExpression node, SpanInfo data) {
+ super.visit(node, data);
data = acceptOpt(node.getOperand(), data);
if (node.getOperator().isPure()) {
diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/bestpractices/xml/UnusedAssignment.xml b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/bestpractices/xml/UnusedAssignment.xml
index 4ab81d0280..7f4341aa5e 100644
--- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/bestpractices/xml/UnusedAssignment.xml
+++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/bestpractices/xml/UnusedAssignment.xml
@@ -3438,6 +3438,28 @@ public class UnusedAssignmentNative {
}
]]>
+
+ [java] UnusedAssignment false positive in for-each assignment #3076
+ true
+ 0
+
+
[java] UnusedAssignment false positive when reporting unused variables #3114