diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-03-01 19:11:54 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-03-01 19:11:54 +0000 |
commit | 449d0a829007ea654912098e6a73134a2c529d61 (patch) | |
tree | 43bda28b43a8e329e08668cd7b1802a5ed8ee328 /test/SemaTemplate | |
parent | 96084f171f4824397dc48453146f0a9719cb9247 (diff) | |
download | clang-449d0a829007ea654912098e6a73134a2c529d61.tar.gz |
When looking for a redeclaration of a static variable, only look for redeclarations. Fixes PR6449
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97478 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaTemplate')
-rw-r--r-- | test/SemaTemplate/instantiate-static-var.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/SemaTemplate/instantiate-static-var.cpp b/test/SemaTemplate/instantiate-static-var.cpp index 789fe3db87..fda2b9ea30 100644 --- a/test/SemaTemplate/instantiate-static-var.cpp +++ b/test/SemaTemplate/instantiate-static-var.cpp @@ -92,3 +92,26 @@ struct SizeOf { void MyTest3() { Y3().Foo(X3<SizeOf<char>::value>()); } + +namespace PR6449 { + template<typename T> + struct X0 { + static const bool var = false; + }; + + template<typename T> + const bool X0<T>::var; + + template<typename T> + struct X1 : public X0<T> { + static const bool var = false; + }; + + template<typename T> + const bool X1<T>::var; + + template class X0<char>; + template class X1<char>; + +} + |