diff options
| author | Richard Trieu <rtrieu@google.com> | 2016-02-18 22:34:54 +0000 |
|---|---|---|
| committer | Richard Trieu <rtrieu@google.com> | 2016-02-18 22:34:54 +0000 |
| commit | 3fae4abaf20d1904925b72dc0ecea31daf59a2aa (patch) | |
| tree | 088b250356e3a1fcb7643127554152d2acd9f04b /lib/Basic/SourceManager.cpp | |
| parent | b85dafb9b7bee1e51a4f86d8e7e5af054b96b3f8 (diff) | |
Remove use of builtin comma operator.
Cleanup for upcoming Clang warning -Wcomma. No functionality change intended.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261271 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Basic/SourceManager.cpp')
| -rw-r--r-- | lib/Basic/SourceManager.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/Basic/SourceManager.cpp b/lib/Basic/SourceManager.cpp index 416031d4ad..92f473a380 100644 --- a/lib/Basic/SourceManager.cpp +++ b/lib/Basic/SourceManager.cpp @@ -1258,15 +1258,19 @@ FoundSpecialChar: if (Buf[0] == '\n' || Buf[0] == '\r') { // If this is \n\r or \r\n, skip both characters. - if ((Buf[1] == '\n' || Buf[1] == '\r') && Buf[0] != Buf[1]) - ++Offs, ++Buf; - ++Offs, ++Buf; + if ((Buf[1] == '\n' || Buf[1] == '\r') && Buf[0] != Buf[1]) { + ++Offs; + ++Buf; + } + ++Offs; + ++Buf; LineOffsets.push_back(Offs); } else { // Otherwise, this is a null. If end of file, exit. if (Buf == End) break; // Otherwise, skip the null. - ++Offs, ++Buf; + ++Offs; + ++Buf; } } |
