[LLVMbugs] [Bug 12789] New: Error recovery can trigger Assertion `Access != AS_none && "Access specifier is AS_none inside a record decl"'

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu May 10 12:42:26 PDT 2012


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: unassignedclangbugs at nondot.org
        ReportedBy: hfinkel at anl.gov
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    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.



More information about the llvm-bugs mailing list