r176717 - [PCH] When complaining that a header from the PCH was modified, also mention

Argyrios Kyrtzidis akyrtzi at gmail.com
Fri Mar 8 12:42:38 PST 2013


Author: akirtzidis
Date: Fri Mar  8 14:42:38 2013
New Revision: 176717

URL: http://llvm.org/viewvc/llvm-project?rev=176717&view=rev
Log:
[PCH] When complaining that a header from the PCH was modified, also mention
the filename of the PCH file.

Modified:
    cfe/trunk/include/clang/Basic/DiagnosticSerializationKinds.td
    cfe/trunk/lib/Serialization/ASTReader.cpp
    cfe/trunk/test/PCH/modified-header-error.c

Modified: cfe/trunk/include/clang/Basic/DiagnosticSerializationKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSerializationKinds.td?rev=176717&r1=176716&r2=176717&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticSerializationKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticSerializationKinds.td Fri Mar  8 14:42:38 2013
@@ -18,7 +18,7 @@ def err_fe_pch_malformed : Error<
 def err_fe_pch_malformed_block : Error<
     "malformed block record in PCH file: '%0'">, DefaultFatal;
 def err_fe_pch_file_modified : Error<
-    "file '%0' has been modified since the precompiled header was built">,
+    "file '%0' has been modified since the precompiled header '%1' was built">,
     DefaultFatal;
 def err_fe_pch_file_overridden : Error<
     "file '%0' from the precompiled header has been overridden">;

Modified: cfe/trunk/lib/Serialization/ASTReader.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTReader.cpp?rev=176717&r1=176716&r2=176717&view=diff
==============================================================================
--- cfe/trunk/lib/Serialization/ASTReader.cpp (original)
+++ cfe/trunk/lib/Serialization/ASTReader.cpp Fri Mar  8 14:42:38 2013
@@ -1602,7 +1602,7 @@ InputFile ASTReader::getInputFile(Module
 #endif
          )) {
       if (Complain)
-        Error(diag::err_fe_pch_file_modified, Filename);
+        Error(diag::err_fe_pch_file_modified, Filename, F.FileName);
       IsOutOfDate = true;
     }
 

Modified: cfe/trunk/test/PCH/modified-header-error.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/PCH/modified-header-error.c?rev=176717&r1=176716&r2=176717&view=diff
==============================================================================
--- cfe/trunk/test/PCH/modified-header-error.c (original)
+++ cfe/trunk/test/PCH/modified-header-error.c Fri Mar  8 14:42:38 2013
@@ -8,5 +8,5 @@
 
 #include "header2.h"
 
-// CHECK: fatal error: file {{.*}} has been modified since the precompiled header was built
+// CHECK: fatal error: file {{.*}} has been modified since the precompiled header {{.*}} was built
 // REQUIRES: shell





More information about the cfe-commits mailing list