]> granicus.if.org Git - clang/commit
Handle zero-width and double-width characters in string literals and comments.
authorAlexander Kornienko <alexfh@google.com>
Thu, 5 Sep 2013 14:08:34 +0000 (14:08 +0000)
committerAlexander Kornienko <alexfh@google.com>
Thu, 5 Sep 2013 14:08:34 +0000 (14:08 +0000)
commit0b62cc30c9aa462184de0435dc083d944a41d67f
treeeda31e19d3265b07413dd9e4a1e870d0dd2bd916
parentdeb77991a2bef594285864d72cb2bf90dec706ff
Handle zero-width and double-width characters in string literals and comments.

Summary:
Count column width instead of the number of code points. This also
includes correct handling of tabs inside string literals and comments (with an
exception of multiline string literals/comments, where tabs are present before
the first escaped newline).

Reviewers: djasper, klimek

Reviewed By: klimek

CC: cfe-commits, klimek
Differential Revision: http://llvm-reviews.chandlerc.com/D1601

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190052 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Format/Format.h
lib/Format/BreakableToken.cpp
lib/Format/BreakableToken.h
lib/Format/ContinuationIndenter.cpp
lib/Format/Encoding.h
lib/Format/Format.cpp
lib/Format/FormatToken.h
lib/Format/WhitespaceManager.cpp
unittests/Format/FormatTest.cpp