aaron.ballman added a comment.

The review says you abandoned it -- was that accidental?



================
Comment at: clang-tidy/modernize/ReplaceGenericFunctorCallCheck.cpp:72
+
+    const Expr *Obj = BinOp->getLHS();
+    const std::string ObjName =
----------------
boga95 wrote:
> I found an interesting behavior with source location:
> 
> ```
> const SourceManager *Source = Result.SourceManager;
> 
> const char *StartPos = Source->getCharacterData(Obj->getLocStart());
> const char *EndPos = Source->getCharacterData(Obj->getLocEnd());
> ```
> `StartPos` and `EndPos` point to the exact same location. Is this the 
> expected behavior or it is a bug?
That is expected behavior -- the source location points to the insertion point 
of the token and if there's only one token in the source range, two two 
locations will point to the same place.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D52281/new/

https://reviews.llvm.org/D52281



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to