[llvm-bugs] [Bug 37189] New: clang::Lexer::getLocForEndOfToken is off by one when at end of a doubly nested template list.

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Apr 20 13:30:32 PDT 2018


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

            Bug ID: 37189
           Summary: clang::Lexer::getLocForEndOfToken is off by one when
                    at end of a doubly nested template list.
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: edward.brown.96 at live.co.uk
                CC: llvm-bugs at lists.llvm.org

template <typename T> class C{};
template <int> class D{};
D<C<int>> f;
       ^
       Loc points here.

Calling Lexer::getLocForEndOfToken(Loc, 0, Context.getSourceManager(),          
                                   Context.getLangOpts());

Returns the source location indicated below.

template <typename T> class C{};
template <int> class D{};
D<C<int>> f;
         ^

-- 
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/20180420/27eda585/attachment.html>


More information about the llvm-bugs mailing list