kadircet marked 4 inline comments as done.
kadircet added inline comments.

================
Comment at: clang/lib/Lex/PPLexerChange.cpp:420
+         // Predefines file doesn't have a valid include location.
+         CurPPLexer->FID == getPredefinesFileID())) {
       // Notify SourceManager to record the number of FileIDs that were created
----------------
sammccall wrote:
> Can we ever get spurious equality here because both sides are 0?
the latter is set during `Preprocessor::EnterMainSourceFile()` which 
initializes the PP and all users seem to be calling it first, therefore I 
assumed it would alwyas be a valid file id.

putting a `&& getPredefinesFileID().isValid()` to be on the safe side.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D78649



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

Reply via email to