================
@@ -490,6 +490,18 @@ bool Preprocessor::HandleEndOfFile(Token &Result, bool
isEndOfMacro) {
SourceMgr.getFileEntryForID(CurPPLexer->getFileID())))
FoundPCHThroughHeader = true;
+ if (CurPPLexer) {
+ if (OptionalFileEntryRef File = CurPPLexer->getFileEntry()) {
+ if (auto MaybeMessage = HeaderInfo.getHeaderDeprecationMessage(*File);
+ MaybeMessage) {
+ std::string_view Message = *MaybeMessage;
+ Diag(SourceMgr.getIncludeLoc(CurPPLexer->getFileID()),
+ diag::warn_pragma_deprecated_header)
+ << !Message.empty() << Message;
----------------
cor3ntin wrote:
Can we avoid duplicating this code?
https://github.com/llvm/llvm-project/pull/168041
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits