]> granicus.if.org Git - clang/commitdiff
The only caller of this knows that the current token is l_brace, so this can be an...
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Tue, 24 Jun 2008 22:31:41 +0000 (22:31 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Tue, 24 Jun 2008 22:31:41 +0000 (22:31 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52696 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Parse/ParseCXXInlineMethods.cpp

index b593f8966818fa8d2584e9314dddf2a097681e97..ca0003440fe04f90df7a317570d80558b8c402dc 100644 (file)
@@ -23,21 +23,10 @@ Parser::DeclTy *
 Parser::ParseCXXInlineMethodDef(AccessSpecifier AS, Declarator &D) {
   assert(D.getTypeObject(0).Kind == DeclaratorChunk::Function &&
          "This isn't a function declarator!");
+  assert(Tok.is(tok::l_brace) && "Current token not a '{'!");
 
   DeclTy *FnD = Actions.ActOnCXXMemberDeclarator(CurScope, AS, D, 0, 0, 0);
 
-  // We should have an opening brace now.
-  if (Tok.isNot(tok::l_brace)) {
-    Diag(Tok, diag::err_expected_fn_body);
-
-    // Skip over garbage, until we get to '{'.  Don't eat the '{'.
-    SkipUntil(tok::l_brace, true, true);
-    
-    // If we didn't find the '{', bail out.
-    if (Tok.isNot(tok::l_brace))
-      return FnD;
-  }
-  
   // Consume the tokens and store them for later parsing.
 
   getCurTopClassStack().push(LexedMethod(FnD));