Skip to content

Incomplete template function causes clang to crash #37257

Closed
@llvmbot

Description

@llvmbot
Bugzilla Link 37909
Version trunk
OS Windows NT
Reporter LLVM Bugzilla Contributor
CC @DougGregor

Extended Description

The following C++ test case causes clang to crash:
Assertion failed: !isIncompleteType() && "This doesn't make sense for incomplete types", file C:\src\llvm_package_333363\llvm\tools\clang\lib\AST\Type.cpp, line 1984

--------- test.cc ------------------------------
template
T&& create();

template<class T, class... Args>
void test() {
T t(create()...); // { dg-error "incomplete" }
(void) t;
}

int main() {
test<int[]>();
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzillac++clang:frontendLanguage frontend issues, e.g. anything involving "Sema"confirmedVerified by a second partycrash-on-invalid

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions