diff options
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/CodeGenCXX/cxx1y-variable-template.cpp | 6 | ||||
-rw-r--r-- | clang/test/CodeGenCXX/dllexport.cpp | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/clang/test/CodeGenCXX/cxx1y-variable-template.cpp b/clang/test/CodeGenCXX/cxx1y-variable-template.cpp index cd73817d850..dd8f28e4299 100644 --- a/clang/test/CodeGenCXX/cxx1y-variable-template.cpp +++ b/clang/test/CodeGenCXX/cxx1y-variable-template.cpp @@ -18,6 +18,12 @@ int init_arr(); template<typename T> template<typename U> template<typename V> int Outer<T>::Inner<U>::arr[sizeof(T) + sizeof(U) + sizeof(V)] = { init_arr() }; int *p = Outer<char[100]>::Inner<char[20]>::arr<char[3]>; +namespace PR35456 { +// CHECK: @_ZN7PR354561nILi0EEE = linkonce_odr global i32 0 +template<int> int n; +int *p = &n<0>; +} + // CHECK: @_ZN5OuterIA100_cE5InnerIA20_cE3arrIA3_cEE = linkonce_odr global [123 x i32] zeroinitializer // CHECK: @_ZGVN5OuterIA100_cE5InnerIA20_cE3arrIA3_cEE = linkonce_odr global diff --git a/clang/test/CodeGenCXX/dllexport.cpp b/clang/test/CodeGenCXX/dllexport.cpp index d79a19420ac..a446147b6cd 100644 --- a/clang/test/CodeGenCXX/dllexport.cpp +++ b/clang/test/CodeGenCXX/dllexport.cpp @@ -102,15 +102,9 @@ inline int __declspec(dllexport) inlineStaticLocalsFunc() { // Declarations are not exported. -// dllexport implies a definition. -// MSC-NOT: @"\01??$VarTmplDef@UExplicitInst_Exported@@@@3HA" -// GNU-NOT: @_Z10VarTmplDefI21ExplicitInst_ExportedE -template<typename T> __declspec(dllexport) int VarTmplDef; -INSTVAR(VarTmplDef<ExplicitInst_Exported>) - // MSC-DAG: @"\01??$VarTmplImplicitDef@UImplicitInst_Exported@@@@3HA" = external global // GNU-DAG: @_Z18VarTmplImplicitDefI21ImplicitInst_ExportedE = external global -template<typename T> __declspec(dllexport) int VarTmplImplicitDef; +template<typename T> __declspec(dllexport) extern int VarTmplImplicitDef; USEVAR(VarTmplImplicitDef<ImplicitInst_Exported>) // Export definition. |