diff options
Diffstat (limited to 'clang/test/PCH')
| -rw-r--r-- | clang/test/PCH/cxx-templates.cpp | 8 | ||||
| -rw-r--r-- | clang/test/PCH/cxx-templates.h | 3 |
2 files changed, 11 insertions, 0 deletions
diff --git a/clang/test/PCH/cxx-templates.cpp b/clang/test/PCH/cxx-templates.cpp index d50eee0623c..e241701f50d 100644 --- a/clang/test/PCH/cxx-templates.cpp +++ b/clang/test/PCH/cxx-templates.cpp @@ -108,3 +108,11 @@ namespace cyclic_module_load { template int local_extern::f<int[]>(); // expected-note {{in instantiation of}} #endif template int local_extern::g<int[]>(); + +namespace MemberSpecializationLocation { +#ifndef NO_ERRORS + // expected-note@cxx-templates.h:* {{previous}} + template<> float A<int>::n; // expected-error {{redeclaration of 'n' with a different type}} +#endif + int k = A<int>::n; +} diff --git a/clang/test/PCH/cxx-templates.h b/clang/test/PCH/cxx-templates.h index c4a84472769..68b252e7974 100644 --- a/clang/test/PCH/cxx-templates.h +++ b/clang/test/PCH/cxx-templates.h @@ -358,3 +358,6 @@ namespace rdar15468709c { } } +namespace MemberSpecializationLocation { + template<typename T> struct A { static int n; }; +} |

