From b1567c106f6baa4f34174c09bf8adf03d2c28cef Mon Sep 17 00:00:00 2001 From: Daniel Jasper Date: Mon, 19 Jan 2015 10:50:08 +0000 Subject: [PATCH] clang-format: Remove assert that isn't helpful. This assert would trigger on: #d , = } llvm-svn: 226446 --- clang/lib/Format/ContinuationIndenter.cpp | 1 - clang/unittests/Format/FormatTest.cpp | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/lib/Format/ContinuationIndenter.cpp b/clang/lib/Format/ContinuationIndenter.cpp index 4cc92b0..4b5ad59 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 8e770c2..e1484b7 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) { -- 2.7.4