aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse/ParseObjc.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-03-16 06:04:47 +0000
committerDouglas Gregor <dgregor@apple.com>2010-03-16 06:04:47 +0000
commitc3d43b783dfb1a1502aa8b31ab1985cf237b1f77 (patch)
tree445d7e048d3f0c295914c11a6140da6e0aec0cf6 /lib/Parse/ParseObjc.cpp
parent6c790eac94101407acfd2c664400924cab45c0b1 (diff)
Don't consume tokens past the end-of-file in an @interface. Fixes
<rdar://problem/7735566>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98613 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseObjc.cpp')
-rw-r--r--lib/Parse/ParseObjc.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Parse/ParseObjc.cpp b/lib/Parse/ParseObjc.cpp
index 7ab0e71dc2..7b2b6e855b 100644
--- a/lib/Parse/ParseObjc.cpp
+++ b/lib/Parse/ParseObjc.cpp
@@ -375,6 +375,10 @@ void Parser::ParseObjCInterfaceDeclList(DeclPtrTy interfaceDecl,
AtEnd.setBegin(AtLoc);
AtEnd.setEnd(Tok.getLocation());
break;
+ } else if (DirectiveKind == tok::objc_not_keyword) {
+ Diag(Tok, diag::err_objc_unknown_at);
+ SkipUntil(tok::semi);
+ continue;
}
// Eat the identifier.