diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2016-11-09 02:47:07 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2016-11-09 02:47:07 +0000 |
commit | f95a000421cc56a8693cd1a63fc5b2defb351279 (patch) | |
tree | 84e41a8b4adde87c1ea5abe31f054f446687bbb4 /clang/lib/Parse/ParseObjc.cpp | |
parent | 0f1ddfa8465291349a380469549b9d8eeea994e2 (diff) | |
download | bcm5719-llvm-f95a000421cc56a8693cd1a63fc5b2defb351279.tar.gz bcm5719-llvm-f95a000421cc56a8693cd1a63fc5b2defb351279.zip |
[index] Fix issue with protocol name locations in conformance list of an ObjC class when they come from a typedef.
The ObjC class protocol list assumes there is an associated location for each protocol but no location is provided
when the protocol list comes from a typedef, and we end up with a buffer overflow when trying to get locations for the protocol names.
Fixes crash of rdar://28980278.
llvm-svn: 286331
Diffstat (limited to 'clang/lib/Parse/ParseObjc.cpp')
-rw-r--r-- | clang/lib/Parse/ParseObjc.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Parse/ParseObjc.cpp b/clang/lib/Parse/ParseObjc.cpp index 980ea77d84a..42081a29ad9 100644 --- a/clang/lib/Parse/ParseObjc.cpp +++ b/clang/lib/Parse/ParseObjc.cpp @@ -369,7 +369,8 @@ Decl *Parser::ParseObjCAtInterfaceDeclaration(SourceLocation AtLoc, } if (Tok.isNot(tok::less)) - Actions.ActOnTypedefedProtocols(protocols, superClassId, superClassLoc); + Actions.ActOnTypedefedProtocols(protocols, protocolLocs, + superClassId, superClassLoc); Decl *ClsType = Actions.ActOnStartClassInterface(getCurScope(), AtLoc, nameId, nameLoc, |