[cfe-commits] [PATCH] Add unit tests for source locations of AST nodes
philipjcraig at gmail.com
Wed Oct 24 06:20:18 PDT 2012
Comment at: unittests/AST/SourceLocationTest.cpp:99
@@ +98,3 @@
+/// By default, Node.getSourceLocation() is checked. This can be changed
+/// by overriding getLocation().
+template <typename NodeType>
Philip Craig wrote:
> Manuel Klimek wrote:
> > Are you already seeing a use case for this (as in: one of the next patches you do will use this) or is this purely speculative?
> It's needed to test any location that isn't an endpoint of the range of a node. A good example is BinaryOperator::getOperatorLoc().
I should clarify that this patch is just a response to some other commits, and I have no plans to add more tests currently, but I do want to make it easy for others to add tests as they fix bugs.
More information about the cfe-commits