[LLVMbugs] [Bug 3684] New: Newline token has start of line flag.

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Sat Feb 28 05:35:34 PST 2009


           Summary: Newline token has start of line flag.
           Product: clang
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Basic
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: bolzoni at cs.unipr.it
                CC: llvmbugs at cs.uiuc.edu, bagnara at cs.unipr.it

Using the raw lexer newlines become a token. But the newline token itself has
start of line flag, not the one after.

/* multi purpose static space. */
unsigned char buffer[0xff] __attribute__((aligned));

int f();


becomes (in a nicely formatted output):
comment('/* multi purpose static space. */', [start_of_line])
unknown('\n', [start_of_line])
identifier('unsigned', [])
unknown(' ', [])
identifier('char', [])
unknown(' ', [])
identifier('buffer', [])
l_square([, [])
numeric_constant('0xff', [])
r_square(']', [])
unknown(' ', [])
identifier('__attribute__', [])
l_paren('(', [])
l_paren('(', [])
identifier('aligned', [])
r_paren(')', [])
r_paren(')', [])
semi(';', [])
unknown('\n', [start_of_line])
identifier('int', [])
unknown(' ', [])
identifier('f', [])
l_paren('(', [])
r_paren(')', [])
semi(';', [])
unknown('\n', [start_of_line])

as you can see all the newlines have the start of line flags.
I think it was intended that `the comment,' `unsigned,' and `int' need the
start of line flag.

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