From: Adrian Prantl Date: Mon, 29 Aug 2016 20:46:56 +0000 (+0000) Subject: Fix a bug preventing the cause of a module-out-of-date error from being printed X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fb7704603f6bd51d2178313f5e3685f5813a719a;p=clang Fix a bug preventing the cause of a module-out-of-date error from being printed git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@280009 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Serialization/ASTReader.cpp b/lib/Serialization/ASTReader.cpp index 14d22f6efd..753365bf02 100644 --- a/lib/Serialization/ASTReader.cpp +++ b/lib/Serialization/ASTReader.cpp @@ -3769,7 +3769,7 @@ ASTReader::ReadASTCore(StringRef FileName, // Otherwise, return an error. Diag(diag::err_module_file_out_of_date) << moduleKindForDiagnostic(Type) - << FileName << ErrorStr.empty() + << FileName << !ErrorStr.empty() << ErrorStr; return Failure; } diff --git a/test/Modules/explicit-build.cpp b/test/Modules/explicit-build.cpp index a6f6a6268c..df9c346588 100644 --- a/test/Modules/explicit-build.cpp +++ b/test/Modules/explicit-build.cpp @@ -199,6 +199,6 @@ // RUN: -fmodule-file=%t/c.pcm \ // RUN: %s -DHAVE_A -DHAVE_B -DHAVE_C 2>&1 | FileCheck --check-prefix=CHECK-MISMATCHED-B %s // -// CHECK-MISMATCHED-B: fatal error: module file '{{.*}}b.pcm' is out of date and needs to be rebuilt +// CHECK-MISMATCHED-B: fatal error: module file '{{.*}}b.pcm' is out of date and needs to be rebuilt: module file out of date // CHECK-MISMATCHED-B-NEXT: note: imported by module 'c' // CHECK-MISMATCHED-B-NOT: note: