RFR: 8348427: DeferredLintHandler API should use JCTree instead of DiagnosticPosition [v2]
Maurizio Cimadamore
mcimadamore at openjdk.org
Thu Feb 6 21:47:17 UTC 2025
On Thu, 6 Feb 2025 19:19:18 GMT, Archie Cobbs <acobbs at openjdk.org> wrote:
> learn a little bit more about this. It looks like the only time immediate mode is used explicitly (i.e., other due to `DeferredLintHandler`'s default state) is when resolving imports ([here](https://github.com/openjdk/jdk/blob/89e5e7ab73472b7d02aac5b8b0c7e9f26db6ec32/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TypeEnter.java#L368)). In that case, of course, there can be no enclosing `@SuppressWarnings` so that makes sense.
Can we use a similar "flush" strategy ? E.g. make the warnings be part of an import declaration, and then process them as part of a flush?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/23281#issuecomment-2641123382
More information about the compiler-dev
mailing list