[LLVMbugs] [Bug 4443] New: macro expansion Expr has wrong source range
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Wed Jun 24 20:00:46 PDT 2009
http://llvm.org/bugs/show_bug.cgi?id=4443
Summary: macro expansion Expr has wrong source range
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
Consider the following code:
#define FOO(x) (x)
int main(void) {
int y = FOO(10);
return y;
}
If you look at the Expr corresponding to FOO(10) that initializes y, a
dumpAll() will look like:
(ParenExpr 0x1a15580 'int'
(IntegerLiteral 0x1a15560 'int' 10))
However, if you look at the source range between getLocStart() and getLocEnd(),
it will correspond only to "FOO" in the initializer, not to "FOO(10)".
Considering that Expr encompasses the ParenExpr and IntegerLiteral, the range
should include the complete "FOO(10)" expression.
--
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