diff options
author | Chris Lattner <sabre@nondot.org> | 2007-07-23 23:21:34 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-07-23 23:21:34 +0000 |
commit | b638a309b61ccb80cd4c437b578d25d92f948fbf (patch) | |
tree | 673965c14f076527c6a14db2bec0095346600fb9 /Driver/PrintPreprocessedOutput.cpp | |
parent | dc0d73e6495404418acf8548875aeaff07791a74 (diff) |
Fix two paste-avoidance bugs I introduced last night. Patch
by Neil Booth. This fixes Preprocessor/output_paste_avoid.c
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40454 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Driver/PrintPreprocessedOutput.cpp')
-rw-r--r-- | Driver/PrintPreprocessedOutput.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Driver/PrintPreprocessedOutput.cpp b/Driver/PrintPreprocessedOutput.cpp index 87180f455e..d5c5b9a08b 100644 --- a/Driver/PrintPreprocessedOutput.cpp +++ b/Driver/PrintPreprocessedOutput.cpp @@ -426,7 +426,7 @@ bool PrintPPOutputPPCallbacks::AvoidConcat(const Token &PrevTok, 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 @@ void clang::DoPrintPreprocessedInput(unsigned MainFileID, Preprocessor &PP, } 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(' '); |