This is an archive of the discontinued LLVM Phabricator instance.

[Sema] Better fix for tags defined inside an enumeration (PR28903).
Needs ReviewPublic

Authored by vsapsai on Oct 20 2017, 12:03 PM.

Details

Reviewers
rsmith
Summary

When we encounter an opening parenthesis and parse the rest as type
cast, use DeclSpecContext DSC_type_specifier so we hit the existing check
that prevents defining tags in contexts where type specifier is expected.

This reverts implementation done in r313386, r313894, and keeps the tests.

rdar://problem/28530809

Event Timeline

vsapsai created this revision.Oct 20 2017, 12:03 PM

Ping. The change can be still applied on trunk without changes, all tests are passing.