jhuber6 marked 2 inline comments as done. jhuber6 added inline comments.
================ Comment at: clang/lib/Driver/Driver.cpp:337 + std::string Nearest; + if (getOpts().findNearest("-" + ArgString, Nearest, IncludedFlagsBitmask, + ExcludedFlagsBitmask) == 1) ---------------- tra wrote: > This looks for all 1-symbol mismatches. and may trigger on differences other > than `--option` vs `-option`. E.g. if user passes `-oip-link` (which looks > like something we may see in real life), we'll try to find the nearest for > `--oip-link` and will get a distance-1 match for the existing option > `--hip-link`. > > We may need to verify that the nearest match that we've found is indeed due > to a missing leading `dash`. > You're right, I changed it to use the raw string from the input. Since it's joined it will be the full string, so if we append a `-` to it and the edit length is zero then we know for a fact that it's due to a missing dash. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135389/new/ https://reviews.llvm.org/D135389 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits