-
Notifications
You must be signed in to change notification settings - Fork 269
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle variable templates in DeclUnloader
Fixes #13815
- Loading branch information
Showing
3 changed files
with
128 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
//------------------------------------------------------------------------------ | ||
// CLING - the C++ LLVM-based InterpreterG :) | ||
// | ||
// This file is dual-licensed: you can choose to license it under the University | ||
// of Illinois Open Source License or the GNU Lesser General Public License. See | ||
// LICENSE.TXT for details. | ||
//------------------------------------------------------------------------------ | ||
|
||
// RUN: cat %s | %cling 2>&1 | FileCheck %s | ||
|
||
#include <type_traits> | ||
|
||
struct A { int v; }; | ||
std::is_default_constructible_v<A> | ||
// CHECK: (const bool) true | ||
|
||
struct B; | ||
std::is_default_constructible_v<B> | ||
// CHECK: incomplete type 'B' | ||
struct B { int v; }; | ||
std::is_default_constructible_v<B> | ||
// CHECK: (const bool) true | ||
|
||
template <typename T> struct C; | ||
template <> struct C<int>; | ||
std::is_default_constructible_v<C<int>> | ||
// CHECK: incomplete type 'C<int>' | ||
template <> struct C<int> { int v; }; | ||
std::is_default_constructible_v<C<int>> | ||
// CHECK: (const bool) true | ||
|
||
.q |