[PATCH] First revision of the dynamic ASTMatcher library
Manuel Klimek
klimek at google.com
Thu May 2 23:10:24 PDT 2013
================
Comment at: lib/ASTMatchers/Dynamic/Parser.cpp:88-89
@@ +87,4 @@
+
+ Result.Location.End.Line = Line;
+ Result.Location.End.Column = column() - 1;
+ return Result;
----------------
Dmitri Gribenko wrote:
> This makes 'End' inclusive. In my opinion, this is not intuitive and not consistent with STL-like half-open ranges.
>
> If you decide to make 'End' non-inclusive, you can also factor out a function to get a 'current' location (this piece of code is repeated twice in getNextToken()).
IIRC source ranges have an inclusive end in clang (they usually point at the beginning of the last token of a range).
http://llvm-reviews.chandlerc.com/D714
BRANCH
svn
ARCANIST PROJECT
clang
More information about the cfe-commits
mailing list