From fdab9f1203eea48a7b8e4c55c7ceafc54653797c Mon Sep 17 00:00:00 2001 From: Serge Pavlov Date: Thu, 3 Nov 2022 12:26:49 +0700 Subject: [Clang] Check for response file existence prior to check for recursion As now errors in file operation are handled, check for file existence must be done prior to check for recursion, otherwise reported errors are misleading. Differential Revision: https://reviews.llvm.org/D136090 --- clang/unittests/Driver/ToolChainTest.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'clang/unittests/Driver/ToolChainTest.cpp') diff --git a/clang/unittests/Driver/ToolChainTest.cpp b/clang/unittests/Driver/ToolChainTest.cpp index b143cd6..b45bab0 100644 --- a/clang/unittests/Driver/ToolChainTest.cpp +++ b/clang/unittests/Driver/ToolChainTest.cpp @@ -596,9 +596,10 @@ TEST(ToolChainTest, ConfigInexistentInclude) { ASSERT_TRUE(C); ASSERT_TRUE(C->containsError()); EXPECT_EQ(1U, DiagConsumer->Errors.size()); - EXPECT_STREQ("cannot read configuration file '" USERCONFIG - "': cannot not open file '" UNEXISTENT "'", - DiagConsumer->Errors[0].c_str()); + EXPECT_STRCASEEQ("cannot read configuration file '" USERCONFIG + "': cannot not open file '" UNEXISTENT + "': no such file or directory", + DiagConsumer->Errors[0].c_str()); } #undef USERCONFIG -- cgit v1.1