diff options
author | Daniel Jasper <djasper@google.com> | 2015-05-10 08:00:25 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2015-05-10 08:00:25 +0000 |
commit | f0fd1c66df9cd7180c3735f283e6cd1c6bc3dcab (patch) | |
tree | 2c479c7328cfbb3d488180e51148b4d2cf8b6d85 /clang/lib/Format/Format.cpp | |
parent | 622c72ded5df46eb6a705cb6fbfc0e680294a590 (diff) | |
download | llvm-f0fd1c66df9cd7180c3735f283e6cd1c6bc3dcab.zip llvm-f0fd1c66df9cd7180c3735f283e6cd1c6bc3dcab.tar.gz llvm-f0fd1c66df9cd7180c3735f283e6cd1c6bc3dcab.tar.bz2 |
clang-format: Fix bug in escaped newline calculation.
This prevents clang-format from inadvertently joining stuff into macro
definitions as reported in llvm.org/PR23466.
llvm-svn: 236944
Diffstat (limited to 'clang/lib/Format/Format.cpp')
-rw-r--r-- | clang/lib/Format/Format.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp index aa24891..aec5bb4 100644 --- a/clang/lib/Format/Format.cpp +++ b/clang/lib/Format/Format.cpp @@ -1008,7 +1008,7 @@ private: // See whether there is an odd number of '\' before this. unsigned count = 0; for (; pos >= 0; --pos, ++count) - if (Text[count] != '\\') + if (Text[pos] != '\\') break; return count & 1; }; |