[PATCH] D53866: [Preamble] Stop generating preamble for circular #includes

Nikolai Kosjar via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 14 04:03:04 PST 2019


nik marked an inline comment as done.
nik added inline comments.


================
Comment at: lib/Basic/SourceManager.cpp:1592
         SourceFileName = llvm::sys::path::filename(SourceFile->getName());
-        if (*SourceFileName == llvm::sys::path::filename(MainFile->getName())) {
+        if (MainFile && *SourceFileName == llvm::sys::path::filename(MainFile->getName())) {
           SourceFileUID = getActualFileUID(SourceFile);
----------------
I've added the nullptr check here as LibclangReparseTest.ReparseWithModule fails/crashes otherwise.


Repository:
  rC Clang

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

https://reviews.llvm.org/D53866





More information about the cfe-commits mailing list