akyrtzi added inline comments.

================
Comment at: clang/lib/Lex/PPLexerChange.cpp:136
                            PPCallbacks::EnterFile, FileType);
+    FileID PrevFID;
+    SourceLocation EnterLoc;
----------------
akyrtzi wrote:
> benlangmuir wrote:
> > Why does `LexedFileChanged` have `PrevFID` set, but `FileChanged` does not 
> > (it has a default argument of `FileID()`?  I would have expected that when 
> > you call both `FileChanged` and `LexedFileChanged` for the same event this 
> > would match.
> I didn't want to change the "contract" of `FileChanged()` as part of these 
> changes but it's probably unlikely that someone depends on `FileID` being 
> invalid, I'll give it a try.
I'm passing a `PrevFID` value for `FileChanged()` as well and I only had to 
update one test.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D128947

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

Reply via email to