[LLVMbugs] [Bug 17970] New: inaccurate source locations for params with complex types

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Nov 17 14:21:02 PST 2013


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

            Bug ID: 17970
           Summary: inaccurate source locations for params with complex
                    types
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: benny.kra at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

This is a bit hard to test because we don't use the source range anywhere right
now. It's giving me a headache when doing code rewriting.

I took the start and end locs of a parameter decl.
getParamDecl(0)->getLocStart() getParamDecl(0)->getLocEnd()

And they point into the source like this:
void conv1(float);
           ^    ^
void conv1(void (*)(int));
           ^           ^

For simple types we point at the closing paren, for complex types we point at
the last character of the type. I'm not sure which one is right but it should
be consistent.

-- 
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/20131117/c4c13930/attachment.html>


More information about the llvm-bugs mailing list