Page MenuHomePhabricator

Don't parse elements of extended vectors as template names
Needs ReviewPublic

Authored by ahatanak on Jul 29 2019, 10:27 AM.

Details

Reviewers
rsmith
Summary

This patch attempts to fix the bug introduced in r360308, which is causing clang to reject the following piece of code:

typedef __attribute__((__ext_vector_type__(2))) float vector_float2;

bool foo123(vector_float2 &A, vector_float2 &B)
{
  return A.x < B.x && B.y > A.y;
}

The patch sets ObjectType to the type of the extended vector in Sema::ActOnStartCXXMemberReference so that Sema::isTemplateName, which is called later ,returns false.

rdar://problem/52619956

Diff Detail

Repository
rC Clang

Event Timeline

ahatanak created this revision.Jul 29 2019, 10:27 AM