FTR I've upgraded ecj to the version 3.12.3 (upstream tag 4.6.3), which is the version currently used by Tomcat 8.5. I haven't been able to upgrade to the latest 3.13.x release (tag 4.7.x) because it requires the org.eclipse.core.runtime classes from the org.eclipse.equinox.common bundle [1] (these classes are in the eclipse package but I don't want to add more dependencies on it since we intend to remove it).
[1] https://github.com/eclipse/rt.equinox.bundles/tree/master/bundles/org.eclipse.equinox.common