aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse/ParseObjc.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2013-03-19 20:27:40 +0000
committerFariborz Jahanian <fjahanian@apple.com>2013-03-19 20:27:40 +0000
commit5bba867123a788085b677fb4b12f21917dec5c51 (patch)
tree0ad238c482525ad52f5ae0ab280f429acf9df265 /lib/Parse/ParseObjc.cpp
parentc30eb51b639e132af458fbf7647eefae6edb93ac (diff)
Objective-C [qoi]: Provide improved parse diagnostics when
closing rbrace is missing in an ObjC class declaration. Can do beter than this, but it involves addition of overhead which will be present in correct code. // rdar://6854840 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177435 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 ddb6a707f5..b95b41f722 100644
--- a/lib/Parse/ParseObjc.cpp
+++ b/lib/Parse/ParseObjc.cpp
@@ -1288,6 +1288,10 @@ void Parser::ParseObjCClassInstanceVariables(Decl *interfaceDecl,
visibility = Tok.getObjCKeywordID();
ConsumeToken();
continue;
+ case tok::objc_end:
+ Diag(Tok, diag::err_objc_unexpected_atend);
+ ConsumeToken();
+ continue;
default:
Diag(Tok, diag::err_objc_illegal_visibility_spec);
continue;