AST: Properly calculate the linkage of a IndirectFieldDecl
authorDavid Majnemer <david.majnemer@gmail.com>
Wed, 10 Dec 2014 22:58:14 +0000 (22:58 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Wed, 10 Dec 2014 22:58:14 +0000 (22:58 +0000)
commit18fac3b1dd8026953dbac543c85696cd9388ba42
tree0ebab8aa0383d26a6f503467df1ea786e4ba4c00
parent41d7656d5a7a41b95af7a3c6a1e13f5a4571c2b9
AST: Properly calculate the linkage of a IndirectFieldDecl

getLVForNamespaceScopeDecl believed that it wasn't possible for it to
ever see an IndirectFieldDecl.  However, this can occur when determining
whether or not something is a redeclaration of a member of an anonymous
static union.

This fixes PR21858.

llvm-svn: 223975
clang/lib/AST/Decl.cpp
clang/test/SemaCXX/anonymous-union.cpp