kadircet added inline comments.

================
Comment at: clang/lib/Lex/Lexer.cpp:2749
+    // most useful answer is "yes, this file has a header guard".
+    if (!ConditionalStack.empty())
+      MIOpt.ExitTopLevelConditional();
----------------
I think we should put this behind a PPOpt to make sure we don't regress the 
rest of the world, as I fear this part of the code might not be well tested.


================
Comment at: clang/lib/Serialization/ASTReader.cpp:6155
+      // To avoid doing this on every miss, require the bare filename to match.
+      if (Pos == Table->end() && M.Kind == clang::serialization::MK_Preamble &&
+          llvm::sys::path::filename(FE->getName()) ==
----------------
do we have other (apart from `isFileMultiIncludeGuarded`) things that depend on 
HFI for main file being correctly deserialized?

If it is only the include guard, maybe we can store that info in control block 
and later on restore it when reading HFI for main file in 
`HeaderSearch::getExistingFileInfo`?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D78038



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D78038: [clangd] W... Sam McCall via Phabricator via cfe-commits
    • [PATCH] D78038: [clan... Kadir Cetinkaya via Phabricator via cfe-commits

Reply via email to