================
Comment at: tools/clang-format/ClangFormat.cpp:175
@@ +174,3 @@
+ if (!Offsets.empty() || !Lengths.empty()) {
+ llvm::errs() << "error: can not use -lines with -offset/-length\n";
+ return true;
----------------
nit: cannot
================
Comment at: tools/clang-format/ClangFormat.cpp:190
@@ +189,3 @@
+ SourceLocation Start = Sources.translateLineCol(ID, FromLine, 1);
+ SourceLocation End = Sources.translateLineCol(ID, ToLine, (unsigned)-1);
+ if (Start.isInvalid() || End.isInvalid())
----------------
(unsigned)-1?????
I think just using Sources.translateLineCol(ID, ToLine, 1) should almost always
lead to the same result (but I am not 100% sure).
How about:
Sources.translateLineCol(ID, ToLine + 1, 1).getLocWithOffset(-1)?
http://llvm-reviews.chandlerc.com/D1160
BRANCH
svn
ARCANIST PROJECT
clang
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits