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

            Bug ID: 22255
           Summary: Crash on implicit member access in initializer in
                    dependent type
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++11
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified

This crashes:

template <class> void redundant_typename() {
  struct A {
    int pT = pT;
  };
};

void f() {
  redundant_typename<int>();
}


If the initializer is spelled `= this->pT;` instead, it works. That's because
the initializer is a CXXDependentScopeMemberExpr in that case, because
Sema::ActOnMemberAccessExpr() calls ActOnDependentMemberExpr() for dependent
members. Sema::BuildImplicitMemberExpr() doesn't do that -- adding code to do
that makes the crash go away, but I'm pretty unsure if that's the right fix.

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