MaskRay added inline comments.
================ Comment at: clang/lib/Frontend/CompilerInvocation.cpp:2348 + llvm::sys::Process::GetEnv("NO_COLOR"); + NoColor && !NoColor->empty() && NoColor->at(0) != '\0') { + // If the user set the NO_COLOR environment variable, we'll honor that ---------------- MaskRay wrote: > cor3ntin wrote: > > ` NoColor->at(0) != '\0'` seem very superfluous. do you have examples of > > scenario that would produce a null terminator? > `GetEnv` returned std::string originates from a C string. Just > `!NoColor->empty()` is sufficient. Also, basic_string::at may throw an exception, which may be undesired. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152285/new/ https://reviews.llvm.org/D152285 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits