ilya-biryukov added inline comments.

================
Comment at: lib/Lex/Lexer.cpp:1667-1668
+      assert(CurPtr < BufferEnd && "eof at completion point");
+      while (isIdentifierBody(*CurPtr))
+        ++CurPtr;
+      BufferPtr = CurPtr;
----------------
aaron.ballman wrote:
> You should continue to assert that `CurPtr < BufferEnd` in this loop, no?
AFAIK, all buffers end with `'\0'`, so lexer usually loops without doing bound 
checking, e.g. a similar loop is at Lexer.cpp:1623.

It turned out the completion token is not added when completion point is at the 
end of the buffer, though, fixed that.


Repository:
  rC Clang

https://reviews.llvm.org/D44932



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

Reply via email to