[PATCH] D37089: [Sema] Error out early for tags defined inside an enumeration.

Volodymyr Sapsai via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 28 13:00:59 PDT 2017


vsapsai added a comment.

It occurred to me that another approach for fixing the crash can be setting `IsTypeSpecifier` to `true` while we ParseCastExpression. According to

  cast-expression:
    unary-expression
    ( type-id ) cast-expression
  type-id:
    type-specifier-seq abstract-declarator[opt]

it looks reasonable to require `IsTypeSpecifier` during parsing part of cast expression inside parentheses.

What do you think? Is this approach worth pursuing? Does it sound better than the one offered initially?


https://reviews.llvm.org/D37089





More information about the cfe-commits mailing list