================ @@ -2376,9 +2376,14 @@ NamedDecl *Sema::LazilyCreateBuiltin(IdentifierInfo *II, unsigned ID, return nullptr; } + // Warn for implicit uses of header dependent libraries, + // except in system headers. if (!ForRedeclaration && (Context.BuiltinInfo.isPredefinedLibFunction(ID) || - Context.BuiltinInfo.isHeaderDependentFunction(ID))) { + Context.BuiltinInfo.isHeaderDependentFunction(ID)) && + (!getDiagnostics().getSuppressSystemWarnings() || + !Context.getSourceManager().isInSystemHeader( + Context.getSourceManager().getSpellingLoc(Loc)))) { ---------------- Artem-B wrote:
I think we may want to narrow down the scope of which diagnostics we want to suppress and when. While we do know that we may need it for these builting for windows on ARM, I can not say whether we want to do that to other intrinsics for other targets. https://github.com/llvm/llvm-project/pull/138205 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits