diff options
| author | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2016-09-13 20:04:35 +0000 |
|---|---|---|
| committer | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2016-09-13 20:04:35 +0000 |
| commit | 218c8743c8d5d18e42ee22afad2eaa9603575507 (patch) | |
| tree | 60e5836be09a515fab27c756a8189c1cca78177d /clang/lib/Analysis/ReachableCode.cpp | |
| parent | 85edca95c67db6f820d8f15ffb27b04d3eb1a4b1 (diff) | |
| download | bcm5719-llvm-218c8743c8d5d18e42ee22afad2eaa9603575507.tar.gz bcm5719-llvm-218c8743c8d5d18e42ee22afad2eaa9603575507.zip | |
[SemaObjC] Be more strict while parsing type arguments and protocols
Fix a crash-on-invalid.
When parsing type arguments and protocols,
parseObjCTypeArgsOrProtocolQualifiers() calls ParseTypeName(), which tries to
find matching tokens for '[', '(', etc whenever they appear among potential
type names. If unmatched, ParseTypeName() yields a tok::eof token stream. This
leads to crashes since the parsing at this point is not expected to go beyond
the param list closing '>'.
Fix that by properly handling tok::eof in
parseObjCTypeArgsOrProtocolQualifiers() callers.
Differential Revision: https://reviews.llvm.org/D23852
rdar://problem/25063557
llvm-svn: 281383
Diffstat (limited to 'clang/lib/Analysis/ReachableCode.cpp')
0 files changed, 0 insertions, 0 deletions

