[PATCH] D50740: [SourceManager] isPointWithin: avoid using isBeforeInTranslationUnit, compare buffer offsets directly for lexical correctness

Jan Korous via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 16 04:02:18 PDT 2018


jkorous added a comment.

Hi Alex, nice work!

I am just wondering if it would be beneficial to assert Loc and End are in the same file. It might help to catch bugs.

I also stumbled upon this function but not sure it makes things significantly cleaner here:
https://clang.llvm.org/doxygen/SourceLocation_8h_source.html#l00175

LGTM otherwise.


Repository:
  rC Clang

https://reviews.llvm.org/D50740





More information about the cfe-commits mailing list