[LLVMbugs] [Bug 20795] New: Crash in invalid initialization list expression

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Aug 28 20:13:07 PDT 2014


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

            Bug ID: 20795
           Summary: Crash in invalid initialization list expression
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: rtrieu at google.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

struct X {
  int a;
  int &b;
};

struct Y {
  X x;
};

Y y = { 1 };  // Invalid initialization

Null deference happens at lib/Sema/SemaInit:486
InitListChecker::FillInEmptyInitForField

484      SemaRef.Diag(Loc, diag::err_init_reference_member_uninitialized)
485        << Field->getType()
486        << ILE->getSyntacticForm()->getSourceRange();
487      SemaRef.Diag(Field->getLocation(),
488                   diag::note_uninit_reference_member);

ILE->getSyntacticForm() returns a null pointer.  Found at trunk, also found in
3.4 release.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140829/bfcb778a/attachment.html>


More information about the llvm-bugs mailing list