[llvm-bugs] [Bug 28913] New: "The backtrack pos points inside the annotated tokens!" assert hit for wrong syntax

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Aug 9 06:02:00 PDT 2016


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

            Bug ID: 28913
           Summary: "The backtrack pos points inside the annotated
                    tokens!" assert hit for wrong syntax
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: shahar at ceemple.com
                CC: llvm-bugs at lists.llvm.org, yaron.keren at gmail.com
    Classification: Unclassified

Created attachment 16918
  --> https://llvm.org/bugs/attachment.cgi?id=16918&action=edit
Test code

Clang trunk version, built in release with asserts enabled, hits the following
assert:

clang-4.0: ../tools/clang/lib/Lex/PPCaching.cpp:109: void
clang::Preprocessor::AnnotatePreviousCachedTokens(const clang::Token &):
Assertion `(BacktrackPositions.empty() || BacktrackPositions.back() < i) &&
"The backtrack pos points inside the annotated tokens!"' failed.

When compiling the following syntactically wrong code:

  class A {}; 
  template < int > class B : A
    B < >  

Note that syntax errors are emitted properly prior to crashing.

-- 
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/20160809/714d775b/attachment.html>


More information about the llvm-bugs mailing list