From cc3949d99af2b2ea2f31c1694eeef7cea0f484f0 Mon Sep 17 00:00:00 2001 From: Richard Trieu Date: Thu, 18 Feb 2016 22:34:54 +0000 Subject: Remove use of builtin comma operator. Cleanup for upcoming Clang warning -Wcomma. No functionality change intended. llvm-svn: 261271 --- clang/lib/Frontend/FrontendActions.cpp | 3 ++- clang/lib/Frontend/PrintPreprocessedOutput.cpp | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'clang/lib/Frontend') diff --git a/clang/lib/Frontend/FrontendActions.cpp b/clang/lib/Frontend/FrontendActions.cpp index 407ccea2e7d..060055fe115 100644 --- a/clang/lib/Frontend/FrontendActions.cpp +++ b/clang/lib/Frontend/FrontendActions.cpp @@ -707,7 +707,8 @@ void PrintPreprocessedAction::ExecuteAction() { } else if (*cur == 0x0A) // LF break; - ++cur, ++next; + ++cur; + ++next; } } 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; -- cgit v1.2.3