http://llvm.org/bugs/show_bug.cgi?id=11852

             Bug #: 11852
           Summary: C++ parser crashes
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Frontend
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]
    Classification: Unclassified


C++ parser crashes on this illegal code:

struct S {
  S() : i(0) {}
  int i;

  void f() {}
};

void f() {
  S cs;
  int S::*pm = &S::i;
  cs.*pm = 1;

  void S::(*pf)() = S::f;
  (*pf)();
}

$ clang -cc1 -x c++ ptr-to-member.cpp

clang:
/home/xzx/llvm/tools/clang/lib/Parse/../../include/clang/Parse/Parser.h:1947:
void clang::Parser::DeclaratorScopeObj::EnterDeclaratorScope(): Assertion
`!EnteredScope && "Already entered the scope!"' failed.

-- 
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

Reply via email to