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
nik marked 2 inline comments as done.
nik added inline comments.
Herald added a subscriber: jdoerfert.
Herald added a project: clang.
Comment at: include/clang/Lex/Preprocessor.h:391
} PreambleConditionalStack;
+ bool PreambleGenerationFailed = false;
ilya-
nik updated this revision to Diff 186813.
nik added a comment.
Addressed comments.
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D53866/new/
https://reviews.llvm.org/D53866
Files:
include/clang/Basic/DiagnosticLexKinds.td
lib/Basic/SourceManager.cpp
lib/Lex
ilya-biryukov added inline comments.
Comment at: include/clang/Basic/DiagnosticLexKinds.td:432
+def err_pp_including_mainfile_for_preamble : Error<
+ "main file cannot be included recursively for preamble">, DefaultFatal;
def err_pp_empty_filename : Error<"empty filename">;
---
nik updated this revision to Diff 176941.
nik added a comment.
Added a dedicated diagnostic.
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D53866/new/
https://reviews.llvm.org/D53866
Files:
include/clang/Basic/DiagnosticLexKinds.td
include/clang/Lex/Preproces
nik marked 2 inline comments as done and an inline comment as not done.
nik added inline comments.
Comment at: include/clang/Lex/Preprocessor.h:391
} PreambleConditionalStack;
+ bool PreambleGenerationFailed = false;
ilya-biryukov wrote:
> nik wrote:
> > il
ilya-biryukov added inline comments.
Comment at: include/clang/Lex/Preprocessor.h:391
} PreambleConditionalStack;
+ bool PreambleGenerationFailed = false;
nik wrote:
> ilya-biryukov wrote:
> > There's a mechanism to handle preamble with errors, see
> > `Pr