================ @@ -547,18 +547,20 @@ static void PrintVersion(raw_ostream &OS) { // Dump the configuration. static int dumpConfig(bool IsSTDIN) { std::unique_ptr<llvm::MemoryBuffer> Code; - // We can't read the code to detect the language if there's no file name. - if (!IsSTDIN) { - // Read in the code in case the filename alone isn't enough to detect the - // language. - ErrorOr<std::unique_ptr<MemoryBuffer>> CodeOrErr = - MemoryBuffer::getFileOrSTDIN(FileNames[0]); - if (std::error_code EC = CodeOrErr.getError()) { - llvm::errs() << EC.message() << "\n"; - return 1; - } - Code = std::move(CodeOrErr.get()); + + // FileNames should have at least "-" in it even if no file was specified. ---------------- bhamiltoncx wrote:
OK, changed to "must". https://github.com/llvm/llvm-project/pull/79051 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits