clang-format: Don't remove empty lines at the start of namespaces.
llvm-svn: 204462
diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp
index e3e959e..976b546 100644
--- a/clang/lib/Format/Format.cpp
+++ b/clang/lib/Format/Format.cpp
@@ -889,7 +889,8 @@
Newlines = 1;
// Remove empty lines after "{".
- if (PreviousLine && PreviousLine->Last->is(tok::l_brace))
+ if (PreviousLine && PreviousLine->Last->is(tok::l_brace) &&
+ PreviousLine->First->isNot(tok::kw_namespace))
Newlines = 1;
// Insert extra new line before access specifiers.