njames93 added inline comments.

================
Comment at: clang-tools-extra/clangd/tool/ClangdMain.cpp:812
+    EmptyDefaults.User = llvm::sys::Process::GetEnv("USER");
+    if (!EmptyDefaults.User)
+      EmptyDefaults.User = llvm::sys::Process::GetEnv("USEUSERNAMER");
----------------
sammccall wrote:
> do you think we should #ifdef this for windows?
> 
> maybe like
> ```
> User = llvm::sys::Process::GetEnv(
> #ifdef _WIN32
> "USERNAME"
> #else
> "USER"
> )
> ```
> 
> (or maybe always query USER but only query USERNAME on windows, or something 
> else?)
I'm not too sure how nicely that would play when using clang with mingw. given 
there is no harm in calling both I'd rather ere on the safe side.


================
Comment at: clang-tools-extra/clangd/tool/ClangdMain.cpp:813
+    if (!EmptyDefaults.User)
+      EmptyDefaults.User = llvm::sys::Process::GetEnv("USEUSERNAMER");
     tidy::ClangTidyOptions OverrideClangTidyOptions;
----------------
sammccall wrote:
> I think this is meant to be USERNAME?
Bad copy and paste error.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D90552

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to