kadircet added a comment. tests look good, but please upload the logs to the bug report for investigation.
================ Comment at: clang-tools-extra/clangd/QueryDriverDatabase.cpp:137 + llvm::StringRef Arg = CommandLine[I]; + if (llvm::any_of(FlagsToPreserve, [&Arg](auto &&S) { return S == Arg; })) { + Args.push_back(Arg); ---------------- s/auto/llvm::StringRef same for the other two lambdas below ================ Comment at: clang-tools-extra/clangd/QueryDriverDatabase.cpp:139 + Args.push_back(Arg); + } else if (llvm::any_of(ArgsToPreserve, + [&Arg](auto &&S) { return S == Arg; }) && ---------------- instead of having the third case, you can check whether the `Arg.startswith(S)`, then call `Arg.consume_front(S)` to drop the prefix and check for emptiness or starting with equals. ================ Comment at: clang-tools-extra/clangd/test/system-include-extractor.test:10 # RUN: echo '[ "$0" = "%t.dir/my_driver.sh" ] || exit' >> %t.dir/my_driver.sh +# RUN: echo '[[ " $* " =~ " -nostdinc " ]] || exit' >> %t.dir/my_driver.sh +# RUN: echo '[[ " $* " =~ " --sysroot /my/sysroot/path " ]] || exit' >> %t.dir/my_driver.sh ---------------- could you rather make use of `[ -z "${args##"-nostdinc"}" ]` to be compatible with non-bash shells ? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73453/new/ https://reviews.llvm.org/D73453 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits