summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Parse')
-rw-r--r--clang/lib/Parse/ParseObjc.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/clang/lib/Parse/ParseObjc.cpp b/clang/lib/Parse/ParseObjc.cpp
index 17450747e0d..baf2667a54f 100644
--- a/clang/lib/Parse/ParseObjc.cpp
+++ b/clang/lib/Parse/ParseObjc.cpp
@@ -224,7 +224,7 @@ Parser::DeclTy *Parser::ParseObjCAtInterfaceDeclaration(
///
void Parser::ParseObjCInterfaceDeclList(DeclTy *interfaceDecl,
tok::ObjCKeywordKind contextKey) {
- llvm::SmallVector<DeclTy*, 32> allMethods;
+ llvm::SmallVector<DeclTy*, 32> allMethods;
llvm::SmallVector<DeclTy*, 16> allProperties;
tok::ObjCKeywordKind MethodImplKind = tok::objc_not_keyword;
SourceLocation AtEndLoc;
@@ -314,8 +314,11 @@ void Parser::ParseObjCInterfaceDeclList(DeclTy *interfaceDecl,
}
}
/// Insert collected methods declarations into the @interface object.
- Actions.ActOnAtEnd(AtEndLoc, interfaceDecl, &allMethods[0], allMethods.size(),
- &allProperties[0], allProperties.size());
+ Actions.ActOnAtEnd(AtEndLoc, interfaceDecl,
+ allMethods.empty() ? 0 : &allMethods[0],
+ allMethods.size(),
+ allProperties.empty() ? 0 : &allProperties[0],
+ allProperties.size());
}
/// Parse property attribute declarations.
OpenPOWER on IntegriCloud