summaryrefslogtreecommitdiffstats
path: root/lib/Parse/ParseObjc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Parse/ParseObjc.cpp')
-rw-r--r--lib/Parse/ParseObjc.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/Parse/ParseObjc.cpp b/lib/Parse/ParseObjc.cpp
index 1d29f31..2e0cd6d 100644
--- a/lib/Parse/ParseObjc.cpp
+++ b/lib/Parse/ParseObjc.cpp
@@ -428,7 +428,7 @@ void Parser::ParseObjCPropertyAttribute(ObjCDeclSpec &DS) {
return;
}
- if (II->getName()[0] == 's') {
+ if (II->getNameStart()[0] == 's') {
DS.setPropertyAttributes(ObjCDeclSpec::DQ_PR_setter);
DS.setSetterName(Tok.getIdentifierInfo());
ConsumeToken(); // consume method name
@@ -1371,8 +1371,11 @@ Parser::DeclPtrTy Parser::ParseObjCMethodDefinition() {
"parsing Objective-C method");
// parse optional ';'
- if (Tok.is(tok::semi))
+ if (Tok.is(tok::semi)) {
+ if (ObjCImpDecl)
+ Diag(Tok, diag::warn_semicolon_before_method_nody);
ConsumeToken();
+ }
// We should have an opening brace now.
if (Tok.isNot(tok::l_brace)) {
OpenPOWER on IntegriCloud