]> granicus.if.org Git - clang/commit
Use the same set of whitespace characters for all operations in BreakableToken.
authorAlexander Kornienko <alexfh@google.com>
Thu, 20 Jun 2013 13:58:37 +0000 (13:58 +0000)
committerAlexander Kornienko <alexfh@google.com>
Thu, 20 Jun 2013 13:58:37 +0000 (13:58 +0000)
commit8afa39b271d94969891dba014e0fc545b4873479
tree6a218fd8ba7c11198f6f3028db8e56a58ae0c96e
parent1a68afd5bbecd05a3bb22854954aa4e5448c4470
Use the same set of whitespace characters for all operations in BreakableToken.

Summary:
Fixes a problem where \t,\v or \f could lead to a crash when placed as
a first character in a line comment. The cause is that rtrim and ltrim handle
these characters, but our code didn't, so some invariants could be broken.

Reviewers: klimek

Reviewed By: klimek

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184425 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Format/BreakableToken.cpp
unittests/Format/FormatTest.cpp