Skip to content

Const suggestion check: a failing original compilation is compiled again for each suggestion #252

Open

Description

@SizzleUnrlsd

Follow-up of #217 and #239 (final review, M4; plan Task 3.2).

With --experimental-const-suggestion-check, the original compilation of a unit other than the suggestion's is cached per file and configuration (originalOf in src/analysis/ConstSuggestionCheck.cpp). A compilation that fails is not cached: the std::optional stays empty, so the next suggestion that needs the same unit compiles it again and fails again.

On the self-analysis, 4 such compilations fail. The verdicts are right; only the cost is repeated.

Fix: cache the failure as well (for example a std::optional that holds a failed state), so each failing unit is compiled once per run.

Validation: same verdicts on the suite, the T tests and the corpora; the number of compilations drops.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions