llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-clangd @llvm/pr-subscribers-clang-tools-extra Author: Kazu Hirata (kazutakahirata) <details> <summary>Changes</summary> --- Full diff: https://github.com/llvm/llvm-project/pull/139456.diff 1 Files Affected: - (modified) clang-tools-extra/clangd/CompileCommands.cpp (+1-2) ``````````diff diff --git a/clang-tools-extra/clangd/CompileCommands.cpp b/clang-tools-extra/clangd/CompileCommands.cpp index 207e4c3e6722c..808d8998db4a8 100644 --- a/clang-tools-extra/clangd/CompileCommands.cpp +++ b/clang-tools-extra/clangd/CompileCommands.cpp @@ -404,8 +404,7 @@ enum DriverMode : unsigned char { DriverMode getDriverMode(const std::vector<std::string> &Args) { DriverMode Mode = DM_GCC; llvm::StringRef Argv0 = Args.front(); - if (Argv0.ends_with_insensitive(".exe")) - Argv0 = Argv0.drop_back(strlen(".exe")); + Argv0.consume_back_insensitive(".exe"); if (Argv0.ends_with_insensitive("cl")) Mode = DM_CL; for (const llvm::StringRef Arg : Args) { `````````` </details> https://github.com/llvm/llvm-project/pull/139456 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits