[PATCH] D70863: [clangd] Try harder to find a plausible `clang` as argv0, particularly on Mac.

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 2 00:42:36 PST 2019


ilya-biryukov accepted this revision.
ilya-biryukov added a comment.
This revision is now accepted and ready to land.

The code LG, but my mac is at home, so I could not verify it.
@kbobyrev, would you mind running this on your machine?



================
Comment at: clang-tools-extra/clangd/GlobalCompilationDatabase.cpp:135
+    // On other platforms, just look for compilers on the PATH.
+    for (const char* Name : {"clang", "gcc", "ccc"})
+      if (auto PathCC = llvm::sys::findProgramByName(Name))
----------------
NIT: maybe add braces to the for statement?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70863/new/

https://reviews.llvm.org/D70863





More information about the cfe-commits mailing list