aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Format/BreakableToken.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2014-01-09 14:18:12 +0000
committerDaniel Jasper <djasper@google.com>2014-01-09 14:18:12 +0000
commit174b012524e33111bfad324c55a23be8b313698b (patch)
treeb702cce8ac3fe3517cbc7c69b8407c45eaed964d /clang/lib/Format/BreakableToken.cpp
parentdc32c1bf3a7b9b66d6c48039d915c980f478cf2b (diff)
downloadllvm-174b012524e33111bfad324c55a23be8b313698b.zip
llvm-174b012524e33111bfad324c55a23be8b313698b.tar.gz
llvm-174b012524e33111bfad324c55a23be8b313698b.tar.bz2
clang-format: Add @s when breaking NSString literals.
While it is allowed to not have an @ on subsequent lines, it seems general practice to add them. If undesired, the code author can easily remove them again and clang-format won't re-add them. llvm-svn: 198871
Diffstat (limited to 'clang/lib/Format/BreakableToken.cpp')
-rw-r--r--clang/lib/Format/BreakableToken.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Format/BreakableToken.cpp b/clang/lib/Format/BreakableToken.cpp
index 29deff9..8ca97d3 100644
--- a/clang/lib/Format/BreakableToken.cpp
+++ b/clang/lib/Format/BreakableToken.cpp
@@ -149,7 +149,7 @@ BreakableSingleLineToken::BreakableSingleLineToken(
encoding::Encoding Encoding, const FormatStyle &Style)
: BreakableToken(Tok, IndentLevel, InPPDirective, Encoding, Style),
StartColumn(StartColumn), Prefix(Prefix), Postfix(Postfix) {
- assert(Tok.TokenText.startswith(Prefix) && Tok.TokenText.endswith(Postfix));
+ assert(Tok.TokenText.endswith(Postfix));
Line = Tok.TokenText.substr(
Prefix.size(), Tok.TokenText.size() - Prefix.size() - Postfix.size());
}