diff options
author | Nico Weber <nicolasweber@gmx.de> | 2013-01-12 07:00:16 +0000 |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2013-01-12 07:00:16 +0000 |
commit | c7a56342bd94dd4f57a443fca1c82286d3cb8229 (patch) | |
tree | 87f6cfc281423c201e7350a8e17fc80674311845 | |
parent | 19de5613ea4322377f7460258f2033dde291b609 (diff) | |
download | bcm5719-llvm-c7a56342bd94dd4f57a443fca1c82286d3cb8229.tar.gz bcm5719-llvm-c7a56342bd94dd4f57a443fca1c82286d3cb8229.zip |
Formatter: Remove a redundant CurrentLineType check.
The containing if checks for this already. No functionality change.
llvm-svn: 172306
-rw-r--r-- | clang/lib/Format/Format.cpp | 4 | ||||
-rw-r--r-- | clang/unittests/Format/FormatTest.cpp | 1 |
2 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp index 0c486e0be3d..89fbf61da0d 100644 --- a/clang/lib/Format/Format.cpp +++ b/clang/lib/Format/Format.cpp @@ -1176,8 +1176,8 @@ private: if (Right.is(tok::identifier) && !Right.Children.empty() && Right.Children[0].is(tok::colon) && Left.is(tok::identifier)) return true; - if (CurrentLineType == LT_ObjCMethodDecl && Right.is(tok::identifier) && - Left.is(tok::l_paren) && Left.Parent->is(tok::colon)) + if (Right.is(tok::identifier) && Left.is(tok::l_paren) && + Left.Parent->is(tok::colon)) // Don't break this identifier as ':' or identifier // before it will break. return false; diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index 90bdb67cffb..84ce0c1e06d 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -1515,7 +1515,6 @@ TEST_F(FormatTest, FormatObjCMethodExpr) { verifyFormat("[self stuffWithInt:a ? (e ? f : g) : c];"); verifyFormat("[cond ? obj1 : obj2 methodWithParam:param]"); - verifyFormat("arr[[self indexForFoo:a]];"); verifyFormat("throw [self errorFor:a];"); verifyFormat("@throw [self errorFor:a];"); |