summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2015-01-19 10:50:08 +0000
committerDaniel Jasper <djasper@google.com>2015-01-19 10:50:08 +0000
commitb1567c106f6baa4f34174c09bf8adf03d2c28cef (patch)
tree0a67c3eddcc5243513398292f2e9b030f1419cf7
parent7a95ce4399a988821ce2637fd37d1dac93bc2e31 (diff)
downloadbcm5719-llvm-b1567c106f6baa4f34174c09bf8adf03d2c28cef.tar.gz
bcm5719-llvm-b1567c106f6baa4f34174c09bf8adf03d2c28cef.zip
clang-format: Remove assert that isn't helpful.
This assert would trigger on: #d , = } llvm-svn: 226446
-rw-r--r--clang/lib/Format/ContinuationIndenter.cpp1
-rw-r--r--clang/unittests/Format/FormatTest.cpp1
2 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Format/ContinuationIndenter.cpp b/clang/lib/Format/ContinuationIndenter.cpp
index 4cc92b02a9e..4b5ad599734 100644
--- a/clang/lib/Format/ContinuationIndenter.cpp
+++ b/clang/lib/Format/ContinuationIndenter.cpp
@@ -783,7 +783,6 @@ void ContinuationIndenter::moveStatePastFakeLParens(LineState &State,
void ContinuationIndenter::moveStatePastFakeRParens(LineState &State) {
for (unsigned i = 0, e = State.NextToken->FakeRParens; i != e; ++i) {
unsigned VariablePos = State.Stack.back().VariablePos;
- assert(State.Stack.size() > 1);
if (State.Stack.size() == 1) {
// Do not pop the last element.
break;
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index 8e770c2e9cd..e1484b7239c 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -2596,6 +2596,7 @@ TEST_F(FormatTest, MacroDefinitionsWithIncompleteCode) {
verifyFormat("#pragma omp threadprivate( \\\n"
" y)), // expected-warning",
getLLVMStyleWithColumns(28));
+ verifyFormat("#d, = };");
}
TEST_F(FormatTest, MacrosWithoutTrailingSemicolon) {
OpenPOWER on IntegriCloud