Skip to content

Bad diagnostic after --: no such file or directory X, did you mean X #137760

Open
@HolyBlackCat

Description

@HolyBlackCat

A little diagnostic bug.

If you do clang++ -- -fsyntax-only, Clang says:

error: no such file or directory: '-fsyntax-only'; did you mean '-fsyntax-only'?

It shouldn't do this for obvious reasons. did you mean '-some-flag' should only trigger for parameters before the --.

Tested on Clang 20 and trunk.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions