]> granicus.if.org Git - clang/commitdiff
Untabify.
authorRichard Smith <richard-llvm@metafoo.co.uk>
Fri, 8 Nov 2013 19:03:29 +0000 (19:03 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Fri, 8 Nov 2013 19:03:29 +0000 (19:03 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194274 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Parse/ParseDeclCXX.cpp

index 000d0768f8d9362757876e6bc7485cbf47249492..c0e17d7a5b6f26274c6bd4306d778e1fb762bf02 100644 (file)
@@ -1492,35 +1492,31 @@ void Parser::ParseClassSpecifier(tok::TokenKind TagTokKind,
         // but it actually has a definition. Most likely, this was
         // meant to be an explicit specialization, but the user forgot
         // the '<>' after 'template'.
-       // It this is friend declaration however, since it cannot have a
-       // template header, it is most likely that the user meant to
-       // remove the 'template' keyword.
+        // It this is friend declaration however, since it cannot have a
+        // template header, it is most likely that the user meant to
+        // remove the 'template' keyword.
         assert((TUK == Sema::TUK_Definition || TUK == Sema::TUK_Friend) &&
-              "Expected a definition here");
-
-       if (TUK == Sema::TUK_Friend) {
-         Diag(DS.getFriendSpecLoc(), 
-              diag::err_friend_explicit_instantiation);
-         TemplateParams = 0;
-       } else {
-         SourceLocation LAngleLoc
-           = PP.getLocForEndOfToken(TemplateInfo.TemplateLoc);
-         Diag(TemplateId->TemplateNameLoc,
-              diag::err_explicit_instantiation_with_definition)
-           << SourceRange(TemplateInfo.TemplateLoc)
-           << FixItHint::CreateInsertion(LAngleLoc, "<>");
-         
-         // Create a fake template parameter list that contains only
-         // "template<>", so that we treat this construct as a class
-         // template specialization.
-         FakedParamLists.push_back(
-           Actions.ActOnTemplateParameterList(0, SourceLocation(),
-                                              TemplateInfo.TemplateLoc,
-                                              LAngleLoc,
-                                              0, 0,
-                                              LAngleLoc));
-         TemplateParams = &FakedParamLists;
-       }
+               "Expected a definition here");
+
+        if (TUK == Sema::TUK_Friend) {
+          Diag(DS.getFriendSpecLoc(), diag::err_friend_explicit_instantiation);
+          TemplateParams = 0;
+        } else {
+          SourceLocation LAngleLoc =
+              PP.getLocForEndOfToken(TemplateInfo.TemplateLoc);
+          Diag(TemplateId->TemplateNameLoc,
+               diag::err_explicit_instantiation_with_definition)
+              << SourceRange(TemplateInfo.TemplateLoc)
+              << FixItHint::CreateInsertion(LAngleLoc, "<>");
+
+          // Create a fake template parameter list that contains only
+          // "template<>", so that we treat this construct as a class
+          // template specialization.
+          FakedParamLists.push_back(Actions.ActOnTemplateParameterList(
+              0, SourceLocation(), TemplateInfo.TemplateLoc, LAngleLoc, 0, 0,
+              LAngleLoc));
+          TemplateParams = &FakedParamLists;
+        }
       }
 
       // Build the class template specialization.
@@ -1566,7 +1562,7 @@ void Parser::ParseClassSpecifier(tok::TokenKind TagTokKind,
   } else {
     if (TUK != Sema::TUK_Declaration && TUK != Sema::TUK_Definition)
       ProhibitAttributes(attrs);
-    
+
     if (TUK == Sema::TUK_Definition &&
         TemplateInfo.Kind == ParsedTemplateInfo::ExplicitInstantiation) {
       // If the declarator-id is not a template-id, issue a diagnostic and