mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-25 04:26:07 +00:00

Summary: Fixes https://github.com/clangd/clangd/issues/309 Subscribers: ilya-biryukov, kadircet, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D77194
26 lines
420 B
C++
26 lines
420 B
C++
// 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
|