aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>2016-09-13 20:04:35 +0000
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>2016-09-13 20:04:35 +0000
commit218c8743c8d5d18e42ee22afad2eaa9603575507 (patch)
tree60e5836be09a515fab27c756a8189c1cca78177d /clang/lib/CodeGen/CodeGenModule.cpp
parent85edca95c67db6f820d8f15ffb27b04d3eb1a4b1 (diff)
downloadllvm-218c8743c8d5d18e42ee22afad2eaa9603575507.zip
llvm-218c8743c8d5d18e42ee22afad2eaa9603575507.tar.gz
llvm-218c8743c8d5d18e42ee22afad2eaa9603575507.tar.bz2
[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/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions