summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/PrintPreprocessedOutput.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Frontend/PrintPreprocessedOutput.cpp')
-rw-r--r--clang/lib/Frontend/PrintPreprocessedOutput.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/Frontend/PrintPreprocessedOutput.cpp b/clang/lib/Frontend/PrintPreprocessedOutput.cpp
index 88262ebef3e..5dd7980d81b 100644
--- a/clang/lib/Frontend/PrintPreprocessedOutput.cpp
+++ b/clang/lib/Frontend/PrintPreprocessedOutput.cpp
@@ -545,8 +545,10 @@ void PrintPPOutputPPCallbacks::HandleNewlinesInToken(const char *TokStr,
// If we have \n\r or \r\n, skip both and count as one line.
if (Len != 1 &&
(TokStr[1] == '\n' || TokStr[1] == '\r') &&
- TokStr[0] != TokStr[1])
- ++TokStr, --Len;
+ TokStr[0] != TokStr[1]) {
+ ++TokStr;
+ --Len;
+ }
}
if (NumNewlines == 0) return;
OpenPOWER on IntegriCloud