diff options
author | Manuel Klimek <klimek@google.com> | 2013-02-06 16:08:09 +0000 |
---|---|---|
committer | Manuel Klimek <klimek@google.com> | 2013-02-06 16:08:09 +0000 |
commit | 7fc2db0acd3fb0f38db19764eef137ae3a9edc9f (patch) | |
tree | 58f84a07756a93f532ee681711bff169a2f9c6df /lib/Format/UnwrappedLineParser.cpp | |
parent | 9e9e6e0297a96e237b53e6be433749065bcea5f8 (diff) |
Much semicolon after namespaces.
We now leave the semicolon in the line of the closing brace in:
namespace {
...
};
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174514 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Format/UnwrappedLineParser.cpp')
-rw-r--r-- | lib/Format/UnwrappedLineParser.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Format/UnwrappedLineParser.cpp b/lib/Format/UnwrappedLineParser.cpp index f79cc712f4..5af60a47c5 100644 --- a/lib/Format/UnwrappedLineParser.cpp +++ b/lib/Format/UnwrappedLineParser.cpp @@ -505,6 +505,10 @@ void UnwrappedLineParser::parseNamespace() { nextToken(); if (FormatTok.Tok.is(tok::l_brace)) { parseBlock(/*MustBeDeclaration=*/ true, 0); + // Munch the semicolon after a namespace. This is more common than one would + // think. Puttin the semicolon into its own line is very ugly. + if (FormatTok.Tok.is(tok::semi)) + nextToken(); addUnwrappedLine(); } // FIXME: Add error handling. |