diff options
| author | Chandler Carruth <chandlerc@gmail.com> | 2010-02-13 10:17:50 +0000 |
|---|---|---|
| committer | Chandler Carruth <chandlerc@gmail.com> | 2010-02-13 10:17:50 +0000 |
| commit | 6b4756a224ba5779d80f47a48fa5447082284982 (patch) | |
| tree | 31f0f21581a436a57f1cba1ca50c4a632b3fdd2d /clang/test/SemaTemplate/explicit-instantiation.cpp | |
| parent | 8408c126c18d487477abbc4e748b138f6c5e9c19 (diff) | |
| download | bcm5719-llvm-6b4756a224ba5779d80f47a48fa5447082284982.tar.gz bcm5719-llvm-6b4756a224ba5779d80f47a48fa5447082284982.zip | |
Skip implicit instantiation of templated variables where a more recent
redeclaration provides an explicit instantiation or is invalid.
llvm-svn: 96097
Diffstat (limited to 'clang/test/SemaTemplate/explicit-instantiation.cpp')
| -rw-r--r-- | clang/test/SemaTemplate/explicit-instantiation.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/test/SemaTemplate/explicit-instantiation.cpp b/clang/test/SemaTemplate/explicit-instantiation.cpp index 227856f1a8e..de51f0992ba 100644 --- a/clang/test/SemaTemplate/explicit-instantiation.cpp +++ b/clang/test/SemaTemplate/explicit-instantiation.cpp @@ -76,3 +76,10 @@ template void print_type<double>(double*); // PR5069 template<int I> void foo0 (int (&)[I + 1]) { } template void foo0<2> (int (&)[3]); + +namespace explicit_instantiation_after_implicit_instantiation { + template <int I> struct X0 { static int x; }; + template <int I> int X0<I>::x; + void test1() { (void)&X0<1>::x; } + template struct X0<1>; +} |

