jfb marked an inline comment as done. jfb added inline comments.
================ Comment at: clang/lib/Driver/Driver.cpp:172 + case VFSMode::Unknown: + if (!this->VFS) { + LLVM_FALLTHROUGH; ---------------- JDevlieghere wrote: > jfb wrote: > > JDevlieghere wrote: > > > Is this really necessary? > > the `Driver` ctor takes a `VFS` parameter which some tools set (otherwise > > it defaults to `nullptr`), so if the command-line `VFS` isn't specified we > > want to leave whatever was passed in as-is. If the command line parameter > > is set the we'll obey that instead. > > > > So yes I think it's the right thing to do. > FWIW, I got confused by the indentation of the case element. Even though it's > in the if-case it just acts like a label. While clever, I think for the sake > of readability it might be worth just repeating `this->VFS = > llvm::vfs::createPhysicalFileSystem().release();`. Ah gotcha, updated. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65986/new/ https://reviews.llvm.org/D65986 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits