[LLVMbugs] [Bug 19215] New: Undef in module included through pch causes assertion failure

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Mar 20 15:10:17 PDT 2014


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

            Bug ID: 19215
           Summary: Undef in module included through pch causes assertion
                    failure
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Modules
          Assignee: unassignedclangbugs at nondot.org
          Reporter: blangmuir at apple.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 12264
  --> http://llvm.org/bugs/attachment.cgi?id=12264&action=edit
reproducer

When we update the identifier info for a macro that has been undef'd, we set
its UndefLoc to the ImportLoc for the module.  However, if the undef is in a
module imported inside a pre-compiled header, that location will be invalid -
causing an assertion failure.

To reproduce:
1. download the attached reproducer and unzip it somewhere
2. run ./repro.sh with a recent clang in your path

I believe that this started in r202560, but I haven't actually bisected it.

As an interesting aside: there is no assertion failure if the macro name is
only one character long (change AB to A in the reproducer).

-- 
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/20140320/5c48d6d1/attachment.html>


More information about the llvm-bugs mailing list