diff options
Diffstat (limited to 'clang/test/PCH/cxx-attrs-packexpansion.cpp')
-rw-r--r-- | clang/test/PCH/cxx-attrs-packexpansion.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/clang/test/PCH/cxx-attrs-packexpansion.cpp b/clang/test/PCH/cxx-attrs-packexpansion.cpp new file mode 100644 index 00000000000..6d292ec1e3e --- /dev/null +++ b/clang/test/PCH/cxx-attrs-packexpansion.cpp @@ -0,0 +1,25 @@ +// Test this without pch. +// RUN: %clang_cc1 -include %s -emit-llvm -o - %s + +// Test with pch. +// RUN: %clang_cc1 -emit-pch -o %t %s +// RUN: %clang_cc1 -include-pch %t -emit-llvm -o - %s + +#ifndef HEADER +#define HEADER + +template<typename T, typename... Types> +struct static_variant { + alignas(Types...) T storage[10]; +}; + +#else + +struct A { + static_variant<int> a; +}; +struct B { + static_variant<A> _b; +}; + +#endif |