http://llvm.org/bugs/show_bug.cgi?id=12222
Bug #: 12222
Summary: Change getSourceRange() to be optional and require
getLocStart() and getLocEnd()
Product: clang
Version: trunk
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P
Component: Frontend
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
Classification: Unclassified
Currently, Stmts are required to implement getSourceRange() and getLocStart()
and getLocEnd() are defined in terms of getSourceRange().
This is stupid, since quite commonly at least one of getLocStart() and
getLocEnd() is trivial, and computing an entire source range can be expensive.
We should implement getLocStart() and getLocEnd() for all Stmts and then drop
the default implementations and make them required, and then add a default
implementation of getSourceRange() that does the obvious thing.
Most classes can then get rid of their getSourceRange() implementation, except
for the few classes which can more efficiently compute the entire range at
once.
--
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs