OscarRodriguezPrieto / ProgQuery

ProgQuery is a system to extract useful syntactic and semantic information from source code programs and store it in a graph database for posterior querying.
MIT License
15 stars 4 forks source link

Try-resources with expressions caused errors during CFG analysis #39

Open OscarRodriguezPrieto opened 2 years ago

OscarRodriguezPrieto commented 2 years ago

We expect try-resources only with variable declarations. In the CFG analysis, we link try statement with the statements in the resources clause if any. Since, actually, (identifiers) and other expressions are supported as try-resources, the CFG analysis fails when it finds an Expression that is not a statement. The solution will be ignoring those resources for the CFG if they are not statements.