Refactor: remove redundant check for 'final' specifier when parsing class/struct definition.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142054 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Parse/ParseDeclCXX.cpp b/lib/Parse/ParseDeclCXX.cpp
index ceb988d..b9e2e9e 100644
--- a/lib/Parse/ParseDeclCXX.cpp
+++ b/lib/Parse/ParseDeclCXX.cpp
@@ -2072,20 +2072,11 @@
 
   // Parse the optional 'final' keyword.
   if (getLang().CPlusPlus && Tok.is(tok::identifier)) {
-    IdentifierInfo *II = Tok.getIdentifierInfo();
-    
-    // Initialize the contextual keywords.
-    if (!Ident_final) {
-      Ident_final = &PP.getIdentifierTable().get("final");
-      Ident_override = &PP.getIdentifierTable().get("override");
-    }
-      
-    if (II == Ident_final) {
-      FinalLoc = ConsumeToken();
+    assert(isCXX0XFinalKeyword() && "not a class definition");
+    FinalLoc = ConsumeToken();
 
-      if (!getLang().CPlusPlus0x) 
-        Diag(FinalLoc, diag::ext_override_control_keyword) << "final";
-    }
+    if (!getLang().CPlusPlus0x)
+      Diag(FinalLoc, diag::ext_override_control_keyword) << "final";
   }
 
   if (Tok.is(tok::colon)) {