]> granicus.if.org Git - clang/commit
Unified token breaking logic for strings and block comments.
authorAlexander Kornienko <alexfh@google.com>
Mon, 15 Apr 2013 14:28:00 +0000 (14:28 +0000)
committerAlexander Kornienko <alexfh@google.com>
Mon, 15 Apr 2013 14:28:00 +0000 (14:28 +0000)
commit70ce7881fc30a39b795b2873f008e7eca72ba669
treef9190f278da3d6f81517e5f69243d13f3c46f15e
parent115ac5ac1281e6f301da4da6a5c669beae59ffcc
Unified token breaking logic for strings and block comments.

Summary:
Both strings and block comments are broken into lines in
breakProtrudingToken. Logic specific for strings or block comments is abstracted
in implementations of the BreakToken interface. Among other goodness, this
change fixes placement of backslashes after a block comment inside a
preprocessor directive (see removed FIXMEs in unit tests).

The code is far from being polished, and some parts of it will be changed for
line comments support.

Reviewers: klimek

Reviewed By: klimek

CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D665

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179526 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Format/BreakableToken.cpp [new file with mode: 0644]
lib/Format/BreakableToken.h [new file with mode: 0644]
lib/Format/CMakeLists.txt
lib/Format/Format.cpp
lib/Format/WhitespaceManager.cpp [new file with mode: 0644]
lib/Format/WhitespaceManager.h [new file with mode: 0644]
unittests/Format/FormatTest.cpp