sunho added inline comments.

================
Comment at: clang/lib/Lex/Lexer.cpp:211
+  L->BufferOffset =
+      StrData - InputFile.getBufferStart(); // FIXME: this is wrong
+  L->BufferSize = L->BufferOffset + TokLen;
----------------
v.g.vassilev wrote:
> Is that an outdated comment? If not maybe elaborate why this is wrong.
It's indeed outdated comment. I'll remove it.


================
Comment at: clang/lib/Lex/Lexer.cpp:1203
     if (L && !L->isLexingRawMode())
-      L->Diag(CP-2, diag::trigraph_ignored);
+      L->Diag(CP - 2 - L->getBuffer().data(), diag::trigraph_ignored);
     return 0;
----------------
shafik wrote:
> I wonder do we really need to do these pointer gymnastics, maybe making this 
> a member function would eliminate the need for it.
Yes, we can change it to offset here.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D143142

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

Reply via email to