
Before `bc713f6a004723d1325bc16e1efc32d0ac82f939` landed, the analyzer crashed on this reduced example. It seems important to have bot `ctu` and `-analyzer-opt-analyze-headers` enabled in the example. This test file ensures that no regression happens in the future in this regard. Reviewed By: martong, NoQ Differential Revision: https://reviews.llvm.org/D96586
28 lines
646 B
C++
28 lines
646 B
C++
namespace llvm {
|
|
template <int, typename...>
|
|
class impl;
|
|
// basecase
|
|
template <int n>
|
|
class impl<n> {};
|
|
// recursion
|
|
template <int n, typename T, typename... TS>
|
|
class impl<n, T, TS...> : impl<n + 1, TS...> {
|
|
using child = impl<n + 1, TS...>;
|
|
using child::child; // no-crash
|
|
impl(T);
|
|
};
|
|
template <typename... TS>
|
|
class container : impl<0, TS...> {};
|
|
} // namespace llvm
|
|
namespace clang {
|
|
class fun {
|
|
llvm::container<int, float> k;
|
|
fun() {}
|
|
};
|
|
class DeclContextLookupResult {
|
|
static int *const SingleElementDummyList;
|
|
};
|
|
} // namespace clang
|
|
using namespace clang;
|
|
int *const DeclContextLookupResult::SingleElementDummyList = nullptr;
|