[LLVMbugs] [Bug 3365] New: getSourceRange() doesn't contain full DeclStmt

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Tue Jan 20 16:29:36 PST 2009


           Summary: getSourceRange() doesn't contain full DeclStmt
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: AST
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: alexei.svitkine at gmail.com
                CC: llvmbugs at cs.uiuc.edu

When the following line is parsed (in some context):

int i = 0, *p = (int *) 0x100, c;

The result is:

(DeclStmt 0x1d06f80
  0x1d06e70 "int i =
    (IntegerLiteral 0x1d06ea0 'int' 0)"  0x1d06ee0 "int *p =
    (CStyleCastExpr 0x1d06f30 'int *'
      (IntegerLiteral 0x1d06f10 'int' 256))"  0x1d06f50 "int c"

That is, the DeclStmt contains the three nested Decls. However,
getSourceRange() spans only the first 'int' portion of the line, which seems
incorrect to me.

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