Commit 6eadc8f1 authored by Shafik Yaghmour's avatar Shafik Yaghmour
Browse files

[Clang] Fix crash in Parser::ParseDirectDeclarator by adding check that token...

[Clang] Fix crash in Parser::ParseDirectDeclarator by adding check that token is not an annotation token

In Parser::ParseDirectDeclarator(...) in some cases ill-formed code can cause an
annotation token to end up where it was not expected. The fix is to add a
!Tok.isAnnotation() guard before attempting to access identifier info.

This fixes: https://github.com/llvm/llvm-project/issues/64836

Differential Revision: https://reviews.llvm.org/D158804
parent 063cd554
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment