[cfe-commits] r38642 - /cfe/cfe/trunk/Driver/clang.cpp

sabre at cs.uiuc.edu sabre at cs.uiuc.edu
Wed Jul 11 09:23:27 PDT 2007


Author: sabre
Date: Wed Jul 11 11:23:26 2007
New Revision: 38642

URL: http://llvm.org/viewvc/llvm-project?rev=38642&view=rev
Log:
Print tokens using the logical location.  This implements
test/Preprocessor/_Pragma-dependency.c

Modified:
    cfe/cfe/trunk/Driver/clang.cpp

Modified: cfe/cfe/trunk/Driver/clang.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/Driver/clang.cpp?rev=38642&r1=38641&r2=38642&view=diff

==============================================================================
--- cfe/cfe/trunk/Driver/clang.cpp (original)
+++ cfe/cfe/trunk/Driver/clang.cpp Wed Jul 11 11:23:26 2007
@@ -136,12 +136,12 @@
   
   if (Pos.isValid()) {
     LineNo = SourceMgr.getLineNumber(Pos);
-    FileID  = Pos.getFileID();
+    FileID  = SourceMgr.getLogicalLoc(Pos).getFileID();
     
     // First, if this diagnostic is not in the main file, print out the
     // "included from" lines.
-    if (LastWarningLoc != SourceMgr.getIncludeLoc(Pos.getFileID())) {
-      LastWarningLoc = SourceMgr.getIncludeLoc(Pos.getFileID());
+    if (LastWarningLoc != SourceMgr.getIncludeLoc(FileID)) {
+      LastWarningLoc = SourceMgr.getIncludeLoc(FileID);
       PrintIncludeStack(LastWarningLoc);
     }
   





More information about the cfe-commits mailing list