When building a qualified reference to a member of an anonymous struct
commit76a11f8abd26c4c3d5f90f201962122b7b6d3e84
authorDouglas Gregor <doug.gregor@gmail.com>
Fri, 18 Feb 2011 02:44:58 +0000 (18 02:44 +0000)
committerDouglas Gregor <doug.gregor@gmail.com>
Fri, 18 Feb 2011 02:44:58 +0000 (18 02:44 +0000)
tree5b169b9931e29a6887585e601acea9c4c6ee8833
parent8b5ad8369f6cbb47072ec638ec8e1f482ac17132
When building a qualified reference to a member of an anonymous struct
or union, place the qualifier on the outermost member reference
expression, which actually contains the entity name.

Fixes PR9188/<rdar://problem/8990184>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125822 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaExpr.cpp
test/SemaTemplate/instantiate-anonymous-union.cpp