LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 7905 - clang c++ crash with compound literal with array with templated element type
Summary: clang c++ crash with compound literal with array with templated element type
Status: RESOLVED FIXED
Alias: None
Product: clang
Classification: Unclassified
Component: C++ (show other bugs)
Version: unspecified
Hardware: PC Linux
: P normal
Assignee: Unassigned Clang Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-14 21:05 PDT by Eli Friedman
Modified: 2010-11-08 13:17 PST (History)
4 users (show)

See Also:
Fixed By Commit(s):


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eli Friedman 2010-08-14 21:05:41 PDT
Testcase:
template <typename T> struct M;
void foo() {
  (M<short> []) {{3}};
}

Crashes with:
clang: /home/eli/llvmgbuild/tools/clang/lib/AST/../../include/clang/AST/DeclCXX.h:382: const clang::CXXRecordDecl::DefinitionData& clang::CXXRecordDecl::data() const: Assertion `DefinitionData && "queried property of class with no definition"' failed.
Comment 1 Eli Friedman 2010-08-14 21:06:24 PDT
Erm, the valid version of the testcase:
template <typename T> struct M { T m; };
void foo() {
  (M<short> []) {{3}};
}
Comment 2 Argyrios Kyrtzidis 2010-11-08 13:17:11 PST
Fixed at r118428.