diff options
| author | Vassil Vassilev <v.g.vassilev@gmail.com> | 2016-10-12 11:57:08 +0000 |
|---|---|---|
| committer | Vassil Vassilev <v.g.vassilev@gmail.com> | 2016-10-12 11:57:08 +0000 |
| commit | bb8fe3175a6ac29a36a62ed53bbc96bbc6d5bbc5 (patch) | |
| tree | dbaa612cc64edccf0fdf5e2ddc9bb34c0e7124b3 /clang/test/Modules/Inputs/PR28752/vector | |
| parent | 06cfa99268ecab69900300c237e010d01a0db881 (diff) | |
| download | bcm5719-llvm-bb8fe3175a6ac29a36a62ed53bbc96bbc6d5bbc5.tar.gz bcm5719-llvm-bb8fe3175a6ac29a36a62ed53bbc96bbc6d5bbc5.zip | |
Reinstate r283887 and r283882.
Original message:
"[modules] PR28752: Do not instantiate variable declarations which are not visible.
https://reviews.llvm.org/D24508
Patch developed in collaboration with Richard Smith!"
llvm-svn: 284008
Diffstat (limited to 'clang/test/Modules/Inputs/PR28752/vector')
| -rw-r--r-- | clang/test/Modules/Inputs/PR28752/vector | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/clang/test/Modules/Inputs/PR28752/vector b/clang/test/Modules/Inputs/PR28752/vector new file mode 100644 index 00000000000..fc5dafae1f9 --- /dev/null +++ b/clang/test/Modules/Inputs/PR28752/vector @@ -0,0 +1,28 @@ +#ifndef VECTOR +#define VECTOR +template <bool, typename> struct B; +template <typename _Tp> struct B<true, _Tp> { typedef _Tp type; }; +namespace std { +template <typename> struct D { + + template <typename _Alloc2> struct F { + static const bool value = 0; + }; + + template <typename _Alloc2> + typename B<F<_Alloc2>::value, _Alloc2>::type _S_select(_Alloc2); + template <typename _Alloc2> + static + typename B<!F<_Alloc2>::value, _Alloc2>::type _S_select(_Alloc2); +}; +template <typename _Alloc> +template <typename _Alloc2> +const bool D<_Alloc>::F<_Alloc2>::value; + +template <typename> class vector { +public: + vector(int); + vector(vector &) : vector(D<bool>::_S_select((bool)0)) {} +}; +} +#endif // VECTOR
\ No newline at end of file |

