[llvm-bugs] [Bug 27831] New: clang_getSpellingLocation() doesn't actually return the spelling location

via llvm-bugs llvm-bugs at lists.llvm.org
Sat May 21 12:34:42 PDT 2016


https://llvm.org/bugs/show_bug.cgi?id=27831

            Bug ID: 27831
           Summary: clang_getSpellingLocation() doesn't actually return
                    the spelling location
           Product: clang
           Version: 3.8
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: libclang
          Assignee: unassignedclangbugs at nondot.org
          Reporter: jonathanmueller.dev at gmail.com
                CC: klimek at google.com, llvm-bugs at lists.llvm.org
    Classification: Unclassified

>From the Github mirror in the source code of clang_getSpellingLocation():

const SourceManager &SM =
  *static_cast<const SourceManager*>(location.ptr_data[0]);
// FIXME: This should call SourceManager::getSpellingLoc().
SourceLocation SpellLoc = SM.getFileLoc(Loc);

Found here:
https://github.com/llvm-mirror/clang/blob/4ab9d6e02b29c24ca44638cc61b52cde2df4a888/tools/libclang/CXSourceLocation.cpp#L328-L331

I'm guessing that should call SourceManager::getSpellingLoc()? :D
Right now this is an exact copy of clang_getFileLocation().

The FIXME has been there since Branch release_33.

-- 
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/20160521/b0029445/attachment.html>


More information about the llvm-bugs mailing list