[LLVMbugs] [Bug 8601] New: poor location information for 'invalid const' diagnostic

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Nov 14 12:56:17 PST 2010


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

           Summary: poor location information for 'invalid const'
                    diagnostic
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: clattner at apple.com
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


I got this today:


ARMMCInstLower.cpp:29:18: error: type qualifier is not allowed on this function
static MCOperand GetSymbolRef(const MachineOperand &MO, const MCSymbol *Symbol,
                 ^

This made my scratch my head and wonder what clang was talking about.  It turns
out that I defined the function as:

static MCOperand GetSymbolRef(const MachineOperand &MO, const MCSymbol *Symbol,
                              AsmPrinter &Printer) const {


The diagnostic should point at the 'const', not at the symbol name.  Bonus
points for saying "'const' type qualifier is not allowed on this function".

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