[LLVMbugs] [Bug 12222] New: Change getSourceRange() to be optional and require getLocStart() and getLocEnd()
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Mar 9 13:53:37 PST 2012
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: unassignedclangbugs at nondot.org
ReportedBy: daniel at zuster.org
CC: llvmbugs at cs.uiuc.edu
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.
More information about the llvm-bugs
mailing list