| Summary: | Ast provided in codan checker out of sync with indexer | ||
|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Lukas Felber <l.felber> |
| Component: | cdt-codan | Assignee: | Project Inbox <cdt-core-inbox> |
| Status: | RESOLVED WONTFIX | QA Contact: | Elena Laskavaia <elaskavaia.cdt> |
| Severity: | normal | ||
| Priority: | P3 | CC: | cdtdoug, emanuel, jens.elmenthaler |
| Version: | 7.0 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
|
Description
Lukas Felber
I am not sure what you suggesting? AST is available for editor for unsaved changes, but indexer updates only on save. Not much I can about it. Well I do understand why the situation is as it is now. It would be very nice if the indexer could not only be updated on file change, but also with the unsave file before codan checkers are triggered. Otherwise chodan checker can only be implemented reliably if they do not use the indexer at all. And considering static analysis the indexer is a very mighty tool which codan should be able to make (reliable) use of. Sergey comment on the forum: "Although the index reflects the state of saved files only, it is possible to get ASTs for all dirty editors. When an index returns a file location corresponding to a dirty file, it should not be taken for the face value, but instead used as a trigger to do additional lookup in the AST of the corresponding dirty file. This is how the C/C++ Search works." resolved as won't fix because nothing I can do about it. It had to be programmed in a certain way to avoid this issue. |