[LLVMbugs] [Bug 11143] New: [3.0 regression] clang not mapping inline ask errors back to source

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Oct 15 22:02:07 PDT 2011


           Summary: [3.0 regression] clang not mapping inline ask errors
                    back to source
           Product: libraries
           Version: 1.0
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: release blocker
          Priority: P
         Component: Support Libraries
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: clattner at apple.com
                CC: llvmbugs at cs.uiuc.edu

As of Kevin's patch in r141814, we now are not mapping inline assembly errors
back to clang's diagnostic handler.  This prevents us from printing the source
location, and we don't realize that an error occurred, so we continue

$ cat t.c
void foo() {
  asm("movl 0(%rax), 0(%edx)");
$ clang t.c
<inline asm>:1:16: error: invalid operand for instruction
        movl 0(%rax), 0(%edx)
Undefined symbols for architecture x86_64:
  "_main", referenced from:
      start in crt1.10.6.o

This is what we used to get:

$ old-clang t.c
t.c:3:7: error: invalid operand for instruction
  asm("movl 0(%rax), 0(%edx)");
<inline asm>:1:16: note: instantiated into assembly here
        movl 0(%rax), 0(%edx)
1 error generated.

It looks like the bug is in around MCParser/AsmParser.cpp:1269, not passing
diagnostics into the LLVMContext's register diagnostic handler anymore.  This
needs to be fixed for LLVM 3.0

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