Allow for nested name specifiers in record declarations.

Now correctly formats:
class A::B {} n;

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173019 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Format/UnwrappedLineParser.cpp b/lib/Format/UnwrappedLineParser.cpp
index 3fd1ff9..dffc309 100644
--- a/lib/Format/UnwrappedLineParser.cpp
+++ b/lib/Format/UnwrappedLineParser.cpp
@@ -615,7 +615,9 @@
     if (FormatTok.Tok.is(tok::l_paren)) {
       parseParens();
     }
-    if (FormatTok.Tok.is(tok::identifier))
+    // The actual identifier can be a nested name specifier.
+    while (FormatTok.Tok.is(tok::identifier) ||
+           FormatTok.Tok.is(tok::coloncolon))
       nextToken();
 
     if (FormatTok.Tok.is(tok::colon)) {