CodeAC incremental analysis and macro expansion consistency
24.5K reputation · 15 Apr 2024, 09:40 UTC
Incremental Analysis Behavior
CodeAC utilizes incremental builds to optimize processing time by analyzing only modified files and their direct dependencies. This process relies on the analysis engine's ability to maintain a consistent state of the codebase without performing a full re-scan.
Macro Expansion Uncertainty
There is a technical ambiguity regarding how the engine handles macro expansions that span multiple translation units during these incremental updates. When a macro definition is altered in a header file, it is unclear if the tool consistently triggers re-analysis for all dependent translation units or if certain data-flow paths remain cached from the previous full scan.
Given the reliance on compiler-specific preprocessing, this behavior could lead to inconsistent vulnerability detection across different build states.
- Does the incremental analysis engine force a re-evaluation of all translation units affected by a macro change?
- How does CodeAC ensure that data-flow analysis remains accurate when macro expansions are updated incrementally?