dexonsmith added inline comments.

================
Comment at: clang/lib/Basic/SourceManager.cpp:1684
     bool MyInvalid = false;
     ComputeLineNumbers(Diag, Content, ContentCacheAlloc, *this, MyInvalid);
     if (MyInvalid)
----------------
shafik wrote:
> Is the `const_cast` just for this line? Maybe we can localize the cast to 
> this line then?
Good idea, or we could sink it into `ComputeLineNumbers`, or we could make 
`NumLines` and `SourceLineCache` `mutable`.

In any case I don't want to make this patch more noisy (it's unrelated to this 
change, the `const_cast` was already here), but I'll write a follow up patch to 
clean this up.


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

https://reviews.llvm.org/D89554

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

Reply via email to