[cfe-commits] r40454 - /cfe/trunk/Driver/PrintPreprocessedOutput.cpp

Chris Lattner sabre at nondot.org
Mon Jul 23 16:21:34 PDT 2007


Author: lattner
Date: Mon Jul 23 18:21:34 2007
New Revision: 40454

URL: http://llvm.org/viewvc/llvm-project?rev=40454&view=rev
Log:
Fix two paste-avoidance bugs I introduced last night.  Patch
by Neil Booth.  This fixes Preprocessor/output_paste_avoid.c

Modified:
    cfe/trunk/Driver/PrintPreprocessedOutput.cpp

Modified: cfe/trunk/Driver/PrintPreprocessedOutput.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Driver/PrintPreprocessedOutput.cpp?rev=40454&r1=40453&r2=40454&view=diff

==============================================================================
--- cfe/trunk/Driver/PrintPreprocessedOutput.cpp (original)
+++ cfe/trunk/Driver/PrintPreprocessedOutput.cpp Mon Jul 23 18:21:34 2007
@@ -426,7 +426,7 @@
     if (Tok.getKind() == tok::equal ||
         Tok.getKind() == tok::equalequal)
       return true;
-    ConcatInfo &= ~ConcatInfo;
+    ConcatInfo &= ~aci_avoid_equal;
   }
   
   if (ConcatInfo == 0) return false;
@@ -540,7 +540,7 @@
     } else if (Tok.hasLeadingSpace() || 
                // If we haven't emitted a token on this line yet, PrevTok isn't
                // useful to look at and no concatenation could happen anyway.
-               (!Callbacks->hasEmittedTokensOnThisLine() &&
+               (Callbacks->hasEmittedTokensOnThisLine() &&
                 // Don't print "-" next to "-", it would form "--".
                 Callbacks->AvoidConcat(PrevTok, Tok))) {
       OutputChar(' ');





More information about the cfe-commits mailing list