summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format
diff options
context:
space:
mode:
authorManuel Klimek <klimek@google.com>2013-02-06 16:08:09 +0000
committerManuel Klimek <klimek@google.com>2013-02-06 16:08:09 +0000
commit046b9306d4b39b48dc74a84ce40a7f6931aea7d4 (patch)
tree0251fff3645a46debaed63123b4202df8ea14eb3 /clang/lib/Format
parentc485b4e5b8adf751794c2fab702b2ef62deb3fa7 (diff)
downloadbcm5719-llvm-046b9306d4b39b48dc74a84ce40a7f6931aea7d4.tar.gz
bcm5719-llvm-046b9306d4b39b48dc74a84ce40a7f6931aea7d4.zip
Much semicolon after namespaces.
We now leave the semicolon in the line of the closing brace in: namespace { ... }; llvm-svn: 174514
Diffstat (limited to 'clang/lib/Format')
-rw-r--r--clang/lib/Format/UnwrappedLineParser.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Format/UnwrappedLineParser.cpp b/clang/lib/Format/UnwrappedLineParser.cpp
index f79cc712f43..5af60a47c59 100644
--- a/clang/lib/Format/UnwrappedLineParser.cpp
+++ b/clang/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.
OpenPOWER on IntegriCloud