summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseCXXInlineMethods.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2008-06-24 22:31:41 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2008-06-24 22:31:41 +0000
commita78145219359ff5c56b367e329cd0a174bd8a27b (patch)
tree9ea1609616497b7acd067b07f3ddf99e6d4fbea1 /clang/lib/Parse/ParseCXXInlineMethods.cpp
parent7bbb20e33813596bcfd5538510a8de0b7c8d5f29 (diff)
downloadbcm5719-llvm-a78145219359ff5c56b367e329cd0a174bd8a27b.tar.gz
bcm5719-llvm-a78145219359ff5c56b367e329cd0a174bd8a27b.zip
The only caller of this knows that the current token is l_brace, so this can be an assert; suggestion by Chris.
llvm-svn: 52696
Diffstat (limited to 'clang/lib/Parse/ParseCXXInlineMethods.cpp')
-rw-r--r--clang/lib/Parse/ParseCXXInlineMethods.cpp13
1 files changed, 1 insertions, 12 deletions
diff --git a/clang/lib/Parse/ParseCXXInlineMethods.cpp b/clang/lib/Parse/ParseCXXInlineMethods.cpp
index b593f896681..ca0003440fe 100644
--- a/clang/lib/Parse/ParseCXXInlineMethods.cpp
+++ b/clang/lib/Parse/ParseCXXInlineMethods.cpp
@@ -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));
OpenPOWER on IntegriCloud