sammccall accepted this revision. sammccall added a comment. Still LG
================ 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"); ---------------- njames93 wrote: > 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. OK. I'd still suggest #ifdefing the USERNAME part, since that's not meaningful in any sense outside windows. 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