diff options
author | David Majnemer <david.majnemer@gmail.com> | 2014-12-10 22:58:14 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2014-12-10 22:58:14 +0000 |
commit | 18fac3b1dd8026953dbac543c85696cd9388ba42 (patch) | |
tree | 0ebab8aa0383d26a6f503467df1ea786e4ba4c00 /clang/test/SemaCXX/anonymous-union.cpp | |
parent | 41d7656d5a7a41b95af7a3c6a1e13f5a4571c2b9 (diff) | |
download | bcm5719-llvm-18fac3b1dd8026953dbac543c85696cd9388ba42.tar.gz bcm5719-llvm-18fac3b1dd8026953dbac543c85696cd9388ba42.zip |
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
Diffstat (limited to 'clang/test/SemaCXX/anonymous-union.cpp')
-rw-r--r-- | clang/test/SemaCXX/anonymous-union.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/anonymous-union.cpp b/clang/test/SemaCXX/anonymous-union.cpp index fde27b049d8..3b568fd8704 100644 --- a/clang/test/SemaCXX/anonymous-union.cpp +++ b/clang/test/SemaCXX/anonymous-union.cpp @@ -84,6 +84,10 @@ static union { float float_val2; }; +void PR21858() { + void int_val2(); +} + void f() { int_val2 = 0; float_val2 = 0.0; |