[clang] [Clang] fix crash by avoiding invalidation of extern main declaration during strictness checks (PR #104594)
Alexander Kornienko via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 16 08:06:54 PDT 2024
================
@@ -12233,7 +12233,6 @@ void Sema::CheckMain(FunctionDecl *FD, const DeclSpec &DS) {
FD->getDeclContext()->getRedeclContext()->isTranslationUnit())) {
Diag(FD->getLocation(), diag::ext_main_invalid_linkage_specification)
<< FD->getLanguageLinkage();
- FD->setInvalidDecl();
return;
----------------
alexfh wrote:
Should we proceed with other checks after this one?
https://github.com/llvm/llvm-project/pull/104594
More information about the cfe-commits
mailing list