http://llvm.org/bugs/show_bug.cgi?id=12789
Bug #: 12789
Summary: Error recovery can trigger Assertion `Access !=
AS_none && "Access specifier is AS_none inside a
record decl"'
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
Running clang trunk on x86_64 on:
struct A {int b = ({int c,c;});};
in C++ mode produces:
t1.cpp:1:17: warning: in-class initialization of non-static data member is a
C++11 extension [-Wc++11-extensions]
struct A {int b = ({int c,c;});};
^
clang: /src/llvm-trunk-writable/tools/clang/lib/AST/DeclBase.cpp:669: void
clang::Decl::CheckAccessDeclContext() const: Assertion `Access != AS_none &&
"Access specifier is AS_none inside a record decl"' failed.
FWIW, in C mode this works fine, producing just the error:
t1.c:1:16: error: expected ';' at end of declaration list
struct A {int b = ({int c,c;});};
(credit to Craig Schroeder for the reduced test case).
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs