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

2019-02-14 Thread Nikolai Kosjar via Phabricator via cfe-commits
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())) { +

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

2019-02-14 Thread Nikolai Kosjar via Phabricator via cfe-commits
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

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

2019-02-14 Thread Nikolai Kosjar via Phabricator via cfe-commits
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;

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

2018-12-07 Thread Ilya Biryukov via Phabricator via cfe-commits
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">;

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

2018-12-06 Thread Nikolai Kosjar via Phabricator via cfe-commits
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

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

2018-12-06 Thread Nikolai Kosjar via Phabricator via cfe-commits
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: > >

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

2018-12-05 Thread Ilya Biryukov via Phabricator via cfe-commits
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 > >