Skip to content

[HeuristicResolver] Tests should fail if parsed code has error diagnostics #155545

@HighCommander4

Description

@HighCommander4

Discovered this while reviewing #155143:

Test cases in HeuristicResolverTest.cpp pass even if the code being parsed in the test case has error diagnostics.

That's not the intention, as this has the potential to hide bugs in the test cases. Error diagnostics while parsing should cause the test case to fail.

In clangd tests, that's accomplished like this; we should do something similar. (The clangd test infra also has a mechanism to deliberately allow errors for a particular test case, to allow testing behaviour on invalid code. For HeuristicResolver, we can leave that for a later time if/when we need it.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang:frontendLanguage frontend issues, e.g. anything involving "Sema"

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions